[sc-users] Crucial Patch get current value
Dionysis Athinaios
adroid28 at yahoo.gr
Sat Apr 19 17:24:44 PDT 2008
Hello everyone :)
I have recently started using the crucial library and I hope someone can
help
me with a problem I have...
-Is there a way to get the values of a running synth made from a patched
instrument?
This is how I tried to do it but I can't although I am msging a synth
object:
(
Instr(\SoundCrumble,{arg rate = 1, buf = 0, amp = 1.0, pan = 0, dec = 0.5;
var env, out;
env = EnvGen.ar(Env.new([0, 1,1, 0],[0.01, dec, 0.2],'sine' ), 1.0,amp,
doneAction: 2);
out = Pan2.ar(PlayBuf.ar(1, buf, BufRateScale.kr(buf)*rate),
pan);
env*out;
}, [ // specs
\rate,
[0, 300, \linear],
[0.0,1.0,\exp],
[-1.0, 1.0, \linear],
[0, 30, \linear]
]);
);
p = Patch(\SoundCrumble, [{Instr.ar(a.randName)},
~medicineFizz.choose.bufnum, 1, 0, 20] ).asSynthDef
x = p.play; //x is now a synth
x.set(\amp, 0) //doesn't work
x.get(\rate, { arg value; ("rate is now:" + value + "Hz").postln; });
//doesn't work
-------------------
Best
Dionysis
--
View this message in context: http://www.nabble.com/Crucial-Patch-get-current-value-tp16789169p16789169.html
Sent from the Supercollider - User mailing list archive at Nabble.com.
More information about the sc-users
mailing list