mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-28 15:46:51 -04:00
Beat-oriented functionality (#976)
* annotate pure values with their value, allowing single mininotation values to maintain their labels as pure * Don't use any 'patternified' arguments if they're all 'pure' * allow pattern weights (roughly, beats-per-cycle) to be inferred where possible, including from mininotation and across many transformations (e.g. `fast` with a 'pure' factor) * Add `beatCat`, similar to `timeCat` but funkier * `silence` has a weight of 1, add alternative `nothing` with a weight of 0, and `gap` function with weight argument * preserve weight across applicative operations (weight comes with the structure) * add `stack` alternatives that take advantage of pattern weights to align patterns differently - `stackLeft`, `stackRight`, `stackCentre`, `stackExpand`, with `stackBy` with an argument for patterning the alignment.
This commit is contained in:
@@ -567,10 +567,8 @@ exports[`runs examples > example "_euclidRot" example index 20 1`] = `
|
||||
|
||||
exports[`runs examples > example "accelerate" example index 0 1`] = `
|
||||
[
|
||||
"[ (0/1 → 1/1) ⇝ 2/1 | s:sax accelerate:0 ]",
|
||||
"[ 0/1 ⇜ (1/1 → 2/1) | s:sax accelerate:0 ]",
|
||||
"[ (2/1 → 3/1) ⇝ 4/1 | s:sax accelerate:1 ]",
|
||||
"[ 2/1 ⇜ (3/1 → 4/1) | s:sax accelerate:1 ]",
|
||||
"[ 0/1 → 2/1 | s:sax accelerate:0 ]",
|
||||
"[ 2/1 → 4/1 | s:sax accelerate:1 ]",
|
||||
]
|
||||
`;
|
||||
|
||||
@@ -956,6 +954,31 @@ exports[`runs examples > example "bank" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "beatCat" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/5 | s:bd ]",
|
||||
"[ 1/5 → 2/5 | s:cp ]",
|
||||
"[ 2/5 → 3/5 | s:bd ]",
|
||||
"[ 3/5 → 4/5 | s:mt ]",
|
||||
"[ 4/5 → 1/1 | s:bd ]",
|
||||
"[ 1/1 → 6/5 | s:bd ]",
|
||||
"[ 6/5 → 7/5 | s:cp ]",
|
||||
"[ 7/5 → 8/5 | s:bd ]",
|
||||
"[ 8/5 → 9/5 | s:mt ]",
|
||||
"[ 9/5 → 2/1 | s:bd ]",
|
||||
"[ 2/1 → 11/5 | s:bd ]",
|
||||
"[ 11/5 → 12/5 | s:cp ]",
|
||||
"[ 12/5 → 13/5 | s:bd ]",
|
||||
"[ 13/5 → 14/5 | s:mt ]",
|
||||
"[ 14/5 → 3/1 | s:bd ]",
|
||||
"[ 3/1 → 16/5 | s:bd ]",
|
||||
"[ 16/5 → 17/5 | s:cp ]",
|
||||
"[ 17/5 → 18/5 | s:bd ]",
|
||||
"[ 18/5 → 19/5 | s:mt ]",
|
||||
"[ 19/5 → 4/1 | s:bd ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "begin" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/2 | s:rave begin:0 ]",
|
||||
@@ -1652,8 +1675,7 @@ exports[`runs examples > example "cpm" example index 0 1`] = `
|
||||
"[ 0/1 → 2/3 | s:bd ]",
|
||||
"[ 1/3 → 2/3 | s:hh ]",
|
||||
"[ 2/3 → 1/1 | s:hh ]",
|
||||
"[ (2/3 → 1/1) ⇝ 4/3 | s:sd ]",
|
||||
"[ 2/3 ⇜ (1/1 → 4/3) | s:sd ]",
|
||||
"[ 2/3 → 4/3 | s:sd ]",
|
||||
"[ 1/1 → 4/3 | s:hh ]",
|
||||
"[ 4/3 → 5/3 | s:hh ]",
|
||||
"[ 4/3 → 2/1 | s:bd ]",
|
||||
@@ -1662,8 +1684,7 @@ exports[`runs examples > example "cpm" example index 0 1`] = `
|
||||
"[ 2/1 → 8/3 | s:sd ]",
|
||||
"[ 7/3 → 8/3 | s:hh ]",
|
||||
"[ 8/3 → 3/1 | s:hh ]",
|
||||
"[ (8/3 → 3/1) ⇝ 10/3 | s:bd ]",
|
||||
"[ 8/3 ⇜ (3/1 → 10/3) | s:bd ]",
|
||||
"[ 8/3 → 10/3 | s:bd ]",
|
||||
"[ 3/1 → 10/3 | s:hh ]",
|
||||
"[ 10/3 → 11/3 | s:hh ]",
|
||||
"[ 10/3 → 4/1 | s:sd ]",
|
||||
@@ -2116,14 +2137,11 @@ exports[`runs examples > example "early" example index 0 1`] = `
|
||||
[
|
||||
"[ -1/10 ⇜ (0/1 → 2/5) | s:hh ]",
|
||||
"[ 0/1 → 1/2 | s:bd ]",
|
||||
"[ (9/10 → 1/1) ⇝ 7/5 | s:hh ]",
|
||||
"[ 9/10 ⇜ (1/1 → 7/5) | s:hh ]",
|
||||
"[ 9/10 → 7/5 | s:hh ]",
|
||||
"[ 1/1 → 3/2 | s:bd ]",
|
||||
"[ (19/10 → 2/1) ⇝ 12/5 | s:hh ]",
|
||||
"[ 19/10 ⇜ (2/1 → 12/5) | s:hh ]",
|
||||
"[ 19/10 → 12/5 | s:hh ]",
|
||||
"[ 2/1 → 5/2 | s:bd ]",
|
||||
"[ (29/10 → 3/1) ⇝ 17/5 | s:hh ]",
|
||||
"[ 29/10 ⇜ (3/1 → 17/5) | s:hh ]",
|
||||
"[ 29/10 → 17/5 | s:hh ]",
|
||||
"[ 3/1 → 7/2 | s:bd ]",
|
||||
"[ (39/10 → 4/1) ⇝ 22/5 | s:hh ]",
|
||||
]
|
||||
@@ -2443,10 +2461,8 @@ exports[`runs examples > example "firstOf" example index 0 1`] = `
|
||||
|
||||
exports[`runs examples > example "fit" example index 0 1`] = `
|
||||
[
|
||||
"[ (0/1 → 1/1) ⇝ 2/1 | s:rhodes speed:0.5 unit:c ]",
|
||||
"[ 0/1 ⇜ (1/1 → 2/1) | s:rhodes speed:0.5 unit:c ]",
|
||||
"[ (2/1 → 3/1) ⇝ 4/1 | s:rhodes speed:0.5 unit:c ]",
|
||||
"[ 2/1 ⇜ (3/1 → 4/1) | s:rhodes speed:0.5 unit:c ]",
|
||||
"[ 0/1 → 2/1 | s:rhodes speed:0.5 unit:c ]",
|
||||
"[ 2/1 → 4/1 | s:rhodes speed:0.5 unit:c ]",
|
||||
]
|
||||
`;
|
||||
|
||||
@@ -2827,6 +2843,8 @@ exports[`runs examples > example "gain" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "gap" example index 0 1`] = `[]`;
|
||||
|
||||
exports[`runs examples > example "hpattack" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/4 | note:c2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:4 ]",
|
||||
@@ -3094,11 +3112,9 @@ exports[`runs examples > example "hpsustain" example index 0 1`] = `
|
||||
exports[`runs examples > example "hurry" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 3/4 | s:bd speed:1 ]",
|
||||
"[ (3/4 → 1/1) ⇝ 3/2 | s:sd n:2 speed:1 ]",
|
||||
"[ 3/4 ⇜ (1/1 → 3/2) | s:sd n:2 speed:1 ]",
|
||||
"[ 3/4 → 3/2 | s:sd n:2 speed:1 ]",
|
||||
"[ 3/2 → 15/8 | s:bd speed:2 ]",
|
||||
"[ (15/8 → 2/1) ⇝ 9/4 | s:sd n:2 speed:2 ]",
|
||||
"[ 15/8 ⇜ (2/1 → 9/4) | s:sd n:2 speed:2 ]",
|
||||
"[ 15/8 → 9/4 | s:sd n:2 speed:2 ]",
|
||||
"[ 9/4 → 21/8 | s:bd speed:2 ]",
|
||||
"[ 21/8 → 3/1 | s:sd n:2 speed:2 ]",
|
||||
"[ 3/1 → 51/16 | s:bd speed:4 ]",
|
||||
@@ -3705,10 +3721,8 @@ exports[`runs examples > example "loop" example index 0 1`] = `
|
||||
|
||||
exports[`runs examples > example "loopAt" example index 0 1`] = `
|
||||
[
|
||||
"[ (0/1 → 1/1) ⇝ 2/1 | s:rhodes speed:0.25 unit:c ]",
|
||||
"[ 0/1 ⇜ (1/1 → 2/1) | s:rhodes speed:0.25 unit:c ]",
|
||||
"[ (2/1 → 3/1) ⇝ 4/1 | s:rhodes speed:0.25 unit:c ]",
|
||||
"[ 2/1 ⇜ (3/1 → 4/1) | s:rhodes speed:0.25 unit:c ]",
|
||||
"[ 0/1 → 2/1 | s:rhodes speed:0.25 unit:c ]",
|
||||
"[ 2/1 → 4/1 | s:rhodes speed:0.25 unit:c ]",
|
||||
]
|
||||
`;
|
||||
|
||||
@@ -4178,10 +4192,8 @@ exports[`runs examples > example "never" example index 0 1`] = `
|
||||
|
||||
exports[`runs examples > example "noise" example index 0 1`] = `
|
||||
[
|
||||
"[ (0/1 → 1/1) ⇝ 2/1 | s:white ]",
|
||||
"[ 0/1 ⇜ (1/1 → 2/1) | s:white ]",
|
||||
"[ (2/1 → 3/1) ⇝ 4/1 | s:pink ]",
|
||||
"[ 2/1 ⇜ (3/1 → 4/1) | s:pink ]",
|
||||
"[ 0/1 → 2/1 | s:white ]",
|
||||
"[ 2/1 → 4/1 | s:pink ]",
|
||||
]
|
||||
`;
|
||||
|
||||
@@ -4903,55 +4915,67 @@ exports[`runs examples > example "ply" example index 0 1`] = `
|
||||
|
||||
exports[`runs examples > example "polymeter" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/3 | note:c ]",
|
||||
"[ 0/1 → 1/3 | note:c2 ]",
|
||||
"[ 1/3 → 2/3 | note:eb ]",
|
||||
"[ 1/3 → 2/3 | note:g2 ]",
|
||||
"[ 2/3 → 1/1 | note:g ]",
|
||||
"[ 2/3 → 1/1 | note:c2 ]",
|
||||
"[ 1/1 → 4/3 | note:c ]",
|
||||
"[ 1/1 → 4/3 | note:g2 ]",
|
||||
"[ 4/3 → 5/3 | note:eb ]",
|
||||
"[ 4/3 → 5/3 | note:c2 ]",
|
||||
"[ 5/3 → 2/1 | note:g ]",
|
||||
"[ 5/3 → 2/1 | note:g2 ]",
|
||||
"[ 2/1 → 7/3 | note:c ]",
|
||||
"[ 2/1 → 7/3 | note:c2 ]",
|
||||
"[ 7/3 → 8/3 | note:eb ]",
|
||||
"[ 7/3 → 8/3 | note:g2 ]",
|
||||
"[ 8/3 → 3/1 | note:g ]",
|
||||
"[ 8/3 → 3/1 | note:c2 ]",
|
||||
"[ 3/1 → 10/3 | note:c ]",
|
||||
"[ 3/1 → 10/3 | note:g2 ]",
|
||||
"[ 10/3 → 11/3 | note:eb ]",
|
||||
"[ 10/3 → 11/3 | note:c2 ]",
|
||||
"[ 11/3 → 4/1 | note:g ]",
|
||||
"[ 11/3 → 4/1 | note:g2 ]",
|
||||
"[ 0/1 → 1/3 | c ]",
|
||||
"[ 0/1 → 1/3 | c2 ]",
|
||||
"[ 1/3 → 2/3 | eb ]",
|
||||
"[ 1/3 → 2/3 | g2 ]",
|
||||
"[ 2/3 → 1/1 | g ]",
|
||||
"[ 2/3 → 1/1 | c2 ]",
|
||||
"[ 1/1 → 4/3 | c ]",
|
||||
"[ 1/1 → 4/3 | g2 ]",
|
||||
"[ 4/3 → 5/3 | eb ]",
|
||||
"[ 4/3 → 5/3 | c2 ]",
|
||||
"[ 5/3 → 2/1 | g ]",
|
||||
"[ 5/3 → 2/1 | g2 ]",
|
||||
"[ 2/1 → 7/3 | c ]",
|
||||
"[ 2/1 → 7/3 | c2 ]",
|
||||
"[ 7/3 → 8/3 | eb ]",
|
||||
"[ 7/3 → 8/3 | g2 ]",
|
||||
"[ 8/3 → 3/1 | g ]",
|
||||
"[ 8/3 → 3/1 | c2 ]",
|
||||
"[ 3/1 → 10/3 | c ]",
|
||||
"[ 3/1 → 10/3 | g2 ]",
|
||||
"[ 10/3 → 11/3 | eb ]",
|
||||
"[ 10/3 → 11/3 | c2 ]",
|
||||
"[ 11/3 → 4/1 | g ]",
|
||||
"[ 11/3 → 4/1 | g2 ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "polymeterSteps" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/4 | note:c ]",
|
||||
"[ 0/1 → 1/1 | s:bd ]",
|
||||
"[ 1/4 → 1/2 | note:d ]",
|
||||
"[ 1/2 → 3/4 | note:e ]",
|
||||
"[ 3/4 → 1/1 | note:c ]",
|
||||
"[ 1/1 → 5/4 | note:d ]",
|
||||
"[ 1/1 → 2/1 | s:bd ]",
|
||||
"[ 5/4 → 3/2 | note:e ]",
|
||||
"[ 3/2 → 7/4 | note:c ]",
|
||||
"[ 7/4 → 2/1 | note:d ]",
|
||||
"[ 2/1 → 9/4 | note:e ]",
|
||||
"[ 2/1 → 3/1 | s:bd ]",
|
||||
"[ 9/4 → 5/2 | note:c ]",
|
||||
"[ 5/2 → 11/4 | note:d ]",
|
||||
"[ 11/4 → 3/1 | note:e ]",
|
||||
"[ 3/1 → 13/4 | note:c ]",
|
||||
"[ 3/1 → 4/1 | s:bd ]",
|
||||
"[ 13/4 → 7/2 | note:d ]",
|
||||
"[ 7/2 → 15/4 | note:e ]",
|
||||
"[ 15/4 → 4/1 | note:c ]",
|
||||
"[ 0/1 → 1/4 | c ]",
|
||||
"[ 0/1 → 1/4 | e ]",
|
||||
"[ 1/4 → 1/2 | d ]",
|
||||
"[ 1/4 → 1/2 | f ]",
|
||||
"[ 1/2 → 3/4 | c ]",
|
||||
"[ 1/2 → 3/4 | g ]",
|
||||
"[ 3/4 → 1/1 | d ]",
|
||||
"[ 3/4 → 1/1 | e ]",
|
||||
"[ 1/1 → 5/4 | c ]",
|
||||
"[ 1/1 → 5/4 | f ]",
|
||||
"[ 5/4 → 3/2 | d ]",
|
||||
"[ 5/4 → 3/2 | g ]",
|
||||
"[ 3/2 → 7/4 | c ]",
|
||||
"[ 3/2 → 7/4 | e ]",
|
||||
"[ 7/4 → 2/1 | d ]",
|
||||
"[ 7/4 → 2/1 | f ]",
|
||||
"[ 2/1 → 9/4 | c ]",
|
||||
"[ 2/1 → 9/4 | g ]",
|
||||
"[ 9/4 → 5/2 | d ]",
|
||||
"[ 9/4 → 5/2 | e ]",
|
||||
"[ 5/2 → 11/4 | c ]",
|
||||
"[ 5/2 → 11/4 | f ]",
|
||||
"[ 11/4 → 3/1 | d ]",
|
||||
"[ 11/4 → 3/1 | g ]",
|
||||
"[ 3/1 → 13/4 | c ]",
|
||||
"[ 3/1 → 13/4 | e ]",
|
||||
"[ 13/4 → 7/2 | d ]",
|
||||
"[ 13/4 → 7/2 | f ]",
|
||||
"[ 7/2 → 15/4 | c ]",
|
||||
"[ 7/2 → 15/4 | g ]",
|
||||
"[ 15/4 → 4/1 | d ]",
|
||||
"[ 15/4 → 4/1 | e ]",
|
||||
]
|
||||
`;
|
||||
|
||||
@@ -5501,6 +5525,27 @@ exports[`runs examples > example "rev" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "reweight" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/4 | s:bd ]",
|
||||
"[ 1/4 → 1/2 | s:sd ]",
|
||||
"[ 1/2 → 3/4 | s:cp ]",
|
||||
"[ 3/4 → 1/1 | s:bd ]",
|
||||
"[ 1/1 → 5/4 | s:sd ]",
|
||||
"[ 5/4 → 3/2 | s:cp ]",
|
||||
"[ 3/2 → 7/4 | s:bd ]",
|
||||
"[ 7/4 → 2/1 | s:sd ]",
|
||||
"[ 2/1 → 9/4 | s:cp ]",
|
||||
"[ 9/4 → 5/2 | s:bd ]",
|
||||
"[ 5/2 → 11/4 | s:sd ]",
|
||||
"[ 11/4 → 3/1 | s:cp ]",
|
||||
"[ 3/1 → 13/4 | s:bd ]",
|
||||
"[ 13/4 → 7/2 | s:sd ]",
|
||||
"[ 7/2 → 15/4 | s:cp ]",
|
||||
"[ 15/4 → 4/1 | s:bd ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "ribbon" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/2 | note:d ]",
|
||||
@@ -6428,8 +6473,7 @@ exports[`runs examples > example "slice" example index 0 1`] = `
|
||||
"[ 3/4 → 27/32 | begin:0 end:0.125 _slices:8 s:breaks165 ]",
|
||||
"[ 27/32 → 15/16 | begin:0.125 end:0.25 _slices:8 s:breaks165 ]",
|
||||
"[ 15/16 → 63/64 | begin:0.25 end:0.375 _slices:8 s:breaks165 ]",
|
||||
"[ (63/64 → 1/1) ⇝ 33/32 | begin:0.25 end:0.375 _slices:8 s:breaks165 ]",
|
||||
"[ 63/64 ⇜ (1/1 → 33/32) | begin:0.25 end:0.375 _slices:8 s:breaks165 ]",
|
||||
"[ 63/64 → 33/32 | begin:0.25 end:0.375 _slices:8 s:breaks165 ]",
|
||||
"[ 33/32 → 9/8 | begin:0.375 end:0.5 _slices:8 s:breaks165 ]",
|
||||
"[ 9/8 → 75/64 | begin:0.5 end:0.625 _slices:8 s:breaks165 ]",
|
||||
"[ 75/64 → 39/32 | begin:0 end:0.125 _slices:8 s:breaks165 ]",
|
||||
@@ -6442,8 +6486,7 @@ exports[`runs examples > example "slice" example index 0 1`] = `
|
||||
"[ 57/32 → 15/8 | begin:0.375 end:0.5 _slices:8 s:breaks165 ]",
|
||||
"[ 15/8 → 123/64 | begin:0.5 end:0.625 _slices:8 s:breaks165 ]",
|
||||
"[ 123/64 → 63/32 | begin:0 end:0.125 _slices:8 s:breaks165 ]",
|
||||
"[ (63/32 → 2/1) ⇝ 33/16 | begin:0.625 end:0.75 _slices:8 s:breaks165 ]",
|
||||
"[ 63/32 ⇜ (2/1 → 33/16) | begin:0.625 end:0.75 _slices:8 s:breaks165 ]",
|
||||
"[ 63/32 → 33/16 | begin:0.625 end:0.75 _slices:8 s:breaks165 ]",
|
||||
"[ 33/16 → 69/32 | begin:0.75 end:0.875 _slices:8 s:breaks165 ]",
|
||||
"[ 69/32 → 9/4 | begin:0.875 end:1 _slices:8 s:breaks165 ]",
|
||||
"[ 9/4 → 75/32 | begin:0.875 end:1 _slices:8 s:breaks165 ]",
|
||||
@@ -7089,6 +7132,31 @@ exports[`runs examples > example "timeCat" example index 0 1`] = `
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "timeCat" example index 1 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/5 | s:bd ]",
|
||||
"[ 1/5 → 2/5 | s:sd ]",
|
||||
"[ 2/5 → 3/5 | s:cp ]",
|
||||
"[ 3/5 → 4/5 | s:hh ]",
|
||||
"[ 4/5 → 1/1 | s:hh ]",
|
||||
"[ 1/1 → 6/5 | s:bd ]",
|
||||
"[ 6/5 → 7/5 | s:sd ]",
|
||||
"[ 7/5 → 8/5 | s:cp ]",
|
||||
"[ 8/5 → 9/5 | s:hh ]",
|
||||
"[ 9/5 → 2/1 | s:hh ]",
|
||||
"[ 2/1 → 11/5 | s:bd ]",
|
||||
"[ 11/5 → 12/5 | s:sd ]",
|
||||
"[ 12/5 → 13/5 | s:cp ]",
|
||||
"[ 13/5 → 14/5 | s:hh ]",
|
||||
"[ 14/5 → 3/1 | s:hh ]",
|
||||
"[ 3/1 → 16/5 | s:bd ]",
|
||||
"[ 16/5 → 17/5 | s:sd ]",
|
||||
"[ 17/5 → 18/5 | s:cp ]",
|
||||
"[ 18/5 → 19/5 | s:hh ]",
|
||||
"[ 19/5 → 4/1 | s:hh ]",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`runs examples > example "transpose" example index 0 1`] = `
|
||||
[
|
||||
"[ 0/1 → 1/4 | note:C2 ]",
|
||||
|
||||
+798
-1177
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user