Hello I’d like to have a Pattern, Pswitch, which depends on an array, here ~a, which whenever it gets changed, the Pswitch should adapt to this. Usually one could do it with Pfunc. It would look like this:
~a = [1,0,1];
(
Pbind(
\dur, 0.3,
\amp, 0.15 * Pswitch(~a,Pseries(0,1)).trace,
).play;
)
//changing this should change the rhythm, similiar to Pfunc
~a = [1,0,0];
~a = [1,0,1];
I mean after all, one could do it like this, but i feel like i’d prefere a solution in the upper style:
(
Pbind(
\dur, 0.3,
\amp_helper, Pseq([0,1,2],inf),
\amp, Pfunc{|e| ~a[e[\amp_helper]]},
).play;
)
~a = [1,0,0];
~a = [1,0,1];
I’m glad for any hints. thank you!