[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] SynthDef with case



How can I define a SynthDef which chooses between possible alternatives routes? Something like a modular system.
I tried this idea:

SynthDef(\aaaa, {arg filter=0;
   var z=Pan2.ar(.....
         x= case
               {filter == 0} {z}
               {filter == 1} {LPF.ar(z,....}
               {filter == 2} ....
Out.ar(0,x)...


but this didn't worked. How
can I pass an argument to a synthdef which would change filter type??

Thx in advance