pick now accepts lookup tables, with alternate cycle squeezing behaviour as new inhabit function (#918)
- the args for `pick` are now reversed (breaking change!) - `pick` is also now a method on the inhabited pattern - `pick` now also accepts a lookup table - `inhabit` added with same behaviour as `pick`, except cycles from source patterns are squeezed into events of inhabited patterns - Also some general doc tidying, sorry for the noise.. - There is now also `pickmod` and `inhabitmod`, for wrapping indexes around rather than clamping them
This commit is contained in:
parent
9ba7b9b4d4
commit
873a412179
6 changed files with 248 additions and 48 deletions
|
|
@ -2408,6 +2408,40 @@ exports[`runs examples > example "hush" example index 0 1`] = `
|
|||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "inhabit" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/8 | s:bd ]",
|
||||
"[ 3/8 → 1/2 | s:bd ]",
|
||||
"[ 3/4 → 7/8 | s:bd ]",
|
||||
"[ 1/1 → 3/2 | s:cp ]",
|
||||
"[ 3/2 → 2/1 | s:sd ]",
|
||||
"[ 2/1 → 17/8 | s:bd ]",
|
||||
"[ 2/1 → 5/2 | s:cp ]",
|
||||
"[ 19/8 → 5/2 | s:bd ]",
|
||||
"[ 5/2 → 3/1 | s:sd ]",
|
||||
"[ 11/4 → 23/8 | s:bd ]",
|
||||
"[ 3/1 → 25/8 | s:bd ]",
|
||||
"[ 27/8 → 7/2 | s:bd ]",
|
||||
"[ 15/4 → 31/8 | s:bd ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "inhabit" example index 1 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/4 | s:bd ]",
|
||||
"[ 3/4 → 1/1 | s:bd ]",
|
||||
"[ 3/2 → 7/4 | s:bd ]",
|
||||
"[ 2/1 → 33/16 | s:bd ]",
|
||||
"[ 35/16 → 9/4 | s:bd ]",
|
||||
"[ 19/8 → 39/16 | s:bd ]",
|
||||
"[ 5/2 → 11/4 | s:sd ]",
|
||||
"[ 11/4 → 3/1 | s:sd ]",
|
||||
"[ 3/1 → 25/8 | s:bd ]",
|
||||
"[ 27/8 → 7/2 | s:bd ]",
|
||||
"[ 15/4 → 31/8 | s:bd ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "inside" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/8 | note:D3 ]",
|
||||
|
|
@ -3601,10 +3635,61 @@ exports[`runs examples > example "pick" example index 0 1`] = `
|
|||
"[ 9/4 → 5/2 | note:g ]",
|
||||
"[ 5/2 → 11/4 | note:f ]",
|
||||
"[ 11/4 → 3/1 | note:g ]",
|
||||
"[ 3/1 → 13/4 | note:g ]",
|
||||
"[ 13/4 → 7/2 | note:a ]",
|
||||
"[ 7/2 → 15/4 | note:c ]",
|
||||
"[ 15/4 → 4/1 | note:d ]",
|
||||
"[ 3/1 → 13/4 | note:f ]",
|
||||
"[ 13/4 → 7/2 | note:g ]",
|
||||
"[ 7/2 → 15/4 | note:f ]",
|
||||
"[ 15/4 → 4/1 | note:g ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "pick" example index 1 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/2 | s:bd ]",
|
||||
"[ 1/2 → 1/1 | s:sd ]",
|
||||
"[ 1/1 → 3/2 | s:cp ]",
|
||||
"[ 3/2 → 2/1 | s:cp ]",
|
||||
"[ 2/1 → 5/2 | s:hh ]",
|
||||
"[ 2/1 → 5/2 | s:bd ]",
|
||||
"[ 5/2 → 3/1 | s:hh ]",
|
||||
"[ 5/2 → 3/1 | s:sd ]",
|
||||
"[ 3/1 → 7/2 | s:bd ]",
|
||||
"[ 7/2 → 4/1 | s:sd ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "pick" example index 2 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/8 | s:bd ]",
|
||||
"[ 3/8 → 1/2 | s:bd ]",
|
||||
"[ 3/4 → 7/8 | s:bd ]",
|
||||
"[ 1/1 → 9/8 | s:bd ]",
|
||||
"[ 11/8 → 3/2 | s:bd ]",
|
||||
"[ 7/4 → 15/8 | s:bd ]",
|
||||
"[ 2/1 → 17/8 | s:bd ]",
|
||||
"[ 2/1 → 5/2 | s:sd ]",
|
||||
"[ 19/8 → 5/2 | s:bd ]",
|
||||
"[ 5/2 → 3/1 | s:sd ]",
|
||||
"[ 11/4 → 23/8 | s:bd ]",
|
||||
"[ 3/1 → 7/2 | s:sd ]",
|
||||
"[ 7/2 → 4/1 | s:sd ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "pick" example index 3 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/8 | s:bd ]",
|
||||
"[ 3/8 → 1/2 | s:bd ]",
|
||||
"[ 3/4 → 7/8 | s:bd ]",
|
||||
"[ 1/1 → 9/8 | s:bd ]",
|
||||
"[ 11/8 → 3/2 | s:bd ]",
|
||||
"[ 7/4 → 15/8 | s:bd ]",
|
||||
"[ 2/1 → 17/8 | s:bd ]",
|
||||
"[ 2/1 → 5/2 | s:sd ]",
|
||||
"[ 19/8 → 5/2 | s:bd ]",
|
||||
"[ 5/2 → 3/1 | s:sd ]",
|
||||
"[ 11/4 → 23/8 | s:bd ]",
|
||||
"[ 3/1 → 7/2 | s:sd ]",
|
||||
"[ 7/2 → 4/1 | s:sd ]",
|
||||
]
|
||||
`;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue