These are chat archives for supercollider/supercollider

9th
Jun 2015
David Siah
@dsiah
Jun 09 2015 23:02
Hey again, how do you play a function while passing args into the function
I was thinking something like
ex.
{ arg hi, bye;
hi.postln;
bye.postln;
}.play(12,123);
To clarify I need to use play -- not value
scztt
@scztt
Jun 09 2015 23:08
You want the "args" argument to play, i.e.:
~synth = { arg freq = 100; SinOsc.ar(freq); }.play(args:[\freq, 440]);
~synth.set(\freq, 880)
~synth.free
(You can cmd+d when "play" is selected to see the help file for Function:play to see the details)
David Siah
@dsiah
Jun 09 2015 23:16
excellent -- the first was what I needed
thank you