Dear Community, I try to over work my FormatianSynth in Supercollider.
And there I have a big Problem.
I’m try to use DoneAction to delete a Synth after he has play.
So this my Synthdef:
// Prototyp Single_Formant_Filter
(
SynthDef(“Single_Formant_Filter”, { arg out=0, in=0, frequ = 200, freqo = 400, stability = 1, percusion = 1, hold = 1;
var input, output, middle, wide, env, noiseFx, modFreqo, modFrequ;
input = In.ar(in, 1);
env = Linen.kr();
noiseFx = Crackle.kr(env);
wide = (freqo - frequ);
// center = (frequ+freqo)/2;
modFrequ = frequ*(1+(noiseFx));
modFreqo = freqo*(1+(noiseFx));
middle = BLowPass4.ar(input, modFrequ);
output = RHPF.ar(middle, modFreqo);
Out.ar(out, output);
}).send(s);
)
And this my calling Routine:
(r = Routine{
var bf1, x, y, time, freq;
bf1=Bus.audio(s, 1);
x = Synth.new(\Gran_Source, [out: bf1, bufnum: b]);
loop{
freq = rrand(0.3, 3);
x.set(\freq, freq);
Synth.after(x, “Single_Formant_Filter”, [\out, 0, \in, bf1] );
“One”.postln;
“Tne”.postln;
time = 1;
time.yield;
}
}
r.play;
r.stop;