add timecat to parser

This commit is contained in:
Felix Roos 2022-02-10 08:30:18 +01:00
parent 40d4e138b7
commit ad777ed183
2 changed files with 24 additions and 2 deletions

View File

@ -7,8 +7,21 @@ import * as toneStuff from './tone';
import shapeshifter from './shapeshifter';
// even if some functions are not used, we need them to be available in eval
const { pure, stack, slowcat, fastcat, cat, sequence, polymeter, pm, polyrhythm, pr, /* reify, */ silence, Fraction } =
strudel;
const {
pure,
stack,
slowcat,
fastcat,
cat,
sequence,
polymeter,
pm,
polyrhythm,
pr,
/* reify, */ silence,
Fraction,
timeCat,
} = strudel;
const { autofilter, filter, gain } = toneStuff;
function reify(thing: any) {

View File

@ -1,3 +1,12 @@
export const timeCat = `stack(
timeCat([3, c3], [1, stack(eb3, g3, m(c4, d4).slow(2))]),
m(c2, g2),
sequence(
timeCat([5, eb4], [3, m(f4, eb4, d4)]),
m(eb4, c4).slow(2)
).slow(4)
)`;
export const shapeShifted = `stack(
sequence(
e5, [b4, c5], d5, [c5, b4],