fixed example test failure

This commit is contained in:
Jade Rowland 2023-10-17 23:03:14 -04:00
parent d3edc62fc7
commit 912a661c04
2 changed files with 26 additions and 1 deletions

View File

@ -173,7 +173,7 @@ export const __chooseWith = (pat, xs) => {
* @param {*} xs
* @returns {Pattern}
* @example
* note("c g g d f").s(chooseWith(slider(0, 0, 1), ["sawtooth", "triangle", "bd hh sd hh"]))
* note("c2 g2!2 d2 f1").s(chooseWith(sine.fast(2), ["sawtooth", "triangle", "bd:6"]))
*/
export const chooseWith = (pat, xs) => {
return __chooseWith(pat, xs).outerJoin();

View File

@ -1071,6 +1071,31 @@ exports[`runs examples > example "chooseCycles" example index 1 1`] = `
]
`;
exports[`runs examples > example "chooseWith" example index 0 1`] = `
[
"[ 0/1 → 1/5 | note:c2 s:bd n:6 ]",
"[ 1/5 → 2/5 | note:g2 s:sawtooth ]",
"[ 2/5 → 3/5 | note:g2 s:triangle ]",
"[ 3/5 → 4/5 | note:d2 s:bd n:6 ]",
"[ 4/5 → 1/1 | note:f1 s:sawtooth ]",
"[ 1/1 → 6/5 | note:c2 s:bd n:6 ]",
"[ 6/5 → 7/5 | note:g2 s:sawtooth ]",
"[ 7/5 → 8/5 | note:g2 s:triangle ]",
"[ 8/5 → 9/5 | note:d2 s:bd n:6 ]",
"[ 9/5 → 2/1 | note:f1 s:sawtooth ]",
"[ 2/1 → 11/5 | note:c2 s:bd n:6 ]",
"[ 11/5 → 12/5 | note:g2 s:sawtooth ]",
"[ 12/5 → 13/5 | note:g2 s:triangle ]",
"[ 13/5 → 14/5 | note:d2 s:bd n:6 ]",
"[ 14/5 → 3/1 | note:f1 s:sawtooth ]",
"[ 3/1 → 16/5 | note:c2 s:bd n:6 ]",
"[ 16/5 → 17/5 | note:g2 s:sawtooth ]",
"[ 17/5 → 18/5 | note:g2 s:triangle ]",
"[ 18/5 → 19/5 | note:d2 s:bd n:6 ]",
"[ 19/5 → 4/1 | note:f1 s:sawtooth ]",
]
`;
exports[`runs examples > example "chop" example index 0 1`] = `
[
"[ 0/1 → 1/1 | s:rhodes begin:0.75 end:1 speed:0.25 unit:c ]",