update snapshot

This commit is contained in:
Jade (Rose) Rowland 2025-01-02 22:39:56 -05:00
parent 7b914e7f22
commit 1d144faed7
2 changed files with 34 additions and 7 deletions

View File

@ -3101,7 +3101,6 @@ Pattern.prototype.xfade = function (pos, b) {
return xfade(this, pos, b);
};
/**
* creates a structure pattern from divisions of a cycle
* especially useful for creating rhythms
@ -3112,11 +3111,9 @@ Pattern.prototype.xfade = function (pos, b) {
* @example
* s("sd").os("4:12", 16)
*/
export const {onSubCycle, onSub, os} = register(['onSubCycle', 'onSub', 'os'], (times, div, pat) => {
export const { onSubCycle, onSub, os } = register(['onSubCycle', 'onSub', 'os'], (times, div, pat) => {
if (typeof times === 'number') {
times = [times]
times = [times];
}
return stack(
...times.map(t => pat.pressBy(_mod(t, div)/div).duration(1/div))
)}
)
return stack(...times.map((t) => pat.pressBy(_mod(t, div) / div).duration(1 / div)));
});

View File

@ -4902,6 +4902,36 @@ exports[`runs examples > example "often" example index 0 1`] = `
]
`;
exports[`runs examples > example "onSubCycle" example index 0 1`] = `
[
"[ 0/1 → 1/1 | s:bd duration:0.0625 ]",
"[ 7/16 → 1/1 | s:bd duration:0.0625 ]",
"[ 5/8 → 1/1 | s:bd duration:0.0625 ]",
"[ 1/1 → 2/1 | s:bd duration:0.0625 ]",
"[ 23/16 → 2/1 | s:bd duration:0.0625 ]",
"[ 13/8 → 2/1 | s:bd duration:0.0625 ]",
"[ 2/1 → 3/1 | s:bd duration:0.0625 ]",
"[ 39/16 → 3/1 | s:bd duration:0.0625 ]",
"[ 21/8 → 3/1 | s:bd duration:0.0625 ]",
"[ 3/1 → 4/1 | s:bd duration:0.0625 ]",
"[ 55/16 → 4/1 | s:bd duration:0.0625 ]",
"[ 29/8 → 4/1 | s:bd duration:0.0625 ]",
]
`;
exports[`runs examples > example "onSubCycle" example index 1 1`] = `
[
"[ 1/4 → 1/1 | s:sd duration:0.0625 ]",
"[ 3/4 → 1/1 | s:sd duration:0.0625 ]",
"[ 5/4 → 2/1 | s:sd duration:0.0625 ]",
"[ 7/4 → 2/1 | s:sd duration:0.0625 ]",
"[ 9/4 → 3/1 | s:sd duration:0.0625 ]",
"[ 11/4 → 3/1 | s:sd duration:0.0625 ]",
"[ 13/4 → 4/1 | s:sd duration:0.0625 ]",
"[ 15/4 → 4/1 | s:sd duration:0.0625 ]",
]
`;
exports[`runs examples > example "orbit" example index 0 1`] = `
[
"[ 0/1 → 1/6 | s:hh delay:0.5 delaytime:0.25 orbit:1 ]",