Given the following code,
(
Pdef(\x,Pbind(\note,Pseq([2,7,2,0,5,0])));
Pdef(\x).quant=0;
play(Pn(Pbindf(Pdef(\x),
\dur,0.25,
\legato,1,
\octave,3),inf));
)
As this plays, I can redefine \x
as it goes:
Pdef(\x,Pbind(\note,Pseq([3,2,2]))); \\changes notes while playing
… and access \x
as a pattern for something like Padd
Padd(\note,2,Pdef(\x)) \\ if I were to play this, does the thing, but doesn't change what's playing
What I can’t seem to do is redefine \x
recursively, i.e. using the environment value of \x
, something like
Pdef(\x,Padd(\note,2,Pdef(\x))) // crashes interpreter :(((
What am I missing?