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

[sc-users] problem with SendReply for creating synths ?



Hi, i need to create  a synth from a trigger from another synth, so im
using SendReply in my synth that triggers and then i have a function
in the language that creates the new synth


But the problem i have is that when the function receives the trigger
(from sendReply) , it doesnt create just one synth ( as it should be)
but instead it start creating hundreds of synths until my server
collapse.

any idea what am i doing wrong? maybe im missing something?



b = Buffer.read(s, "sound_a.aif");

SynthDef(\my_synth, {| out = 0, bufnum = 0, start = 0 , env  |
	env= EnvGen.ar(Env.sine(1.0,1.0), doneAction:2);
    Out.ar(out,
        PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum),  startPos:
start , doneAction:2) * env
    )
}).add();



o = OSCFunc({ |msg| msg.postln ; Synth(\my_synth, [\bufnum, b, \start
, d[0 ]);}, '/the_answer');



cheers



U.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/