Hey,
can someone explain me the concept of LeakDC and when it should be used, as it has a huge impact on the sound of following SynthDef. I have used it for other FFT Ugens and Wavetables before, so I thought it would be a good idea to implement it here as well, but its removing all the “good stuff”:
SynthDef(\drums, {
arg atk=0, sus=0, rel=3, c1=1, c2=(-1),
buf=0, rate=1, spos=0, freq=440, pan=0, amp=1, out=0,
rect=0.5, sBelow=1.2, sAbove=0.25, thresh=25, ffreq=8500;
var sig, chain, env, lfo;
env = EnvGen.kr(Env([0,1,1,0],[atk,sus,rel],[c1,0,c2]),doneAction:2);
lfo = SinOsc.kr(0.2, [0,0.5pi], 0.0024, 0.0025);
sig = PlayBuf.ar(1, buf, rate * BufRateScale.ir(buf),startPos:spos);
sig = Select.ar(sig.ceil, [sig.abs * rect, sig]);
chain = FFT(LocalBuf(512), sig, 0.25);
chain = PV_Compander(chain, thresh, sBelow, sAbove);
sig = IFFT(chain);
//sig = LeakDC.ar(sig);
sig = DFM1.ar(sig, ffreq, type:0);
sig = DelayL.ar(sig, 0.1, lfo, 0.5, sig);
sig = SoftClipAmp8.ar(sig, 0.5);
sig = Pan2.ar(sig, pan, amp);
sig = sig * env;
sig = sig + NHHall.ar(sig, 0.2);
sig = Limiter.ar(sig, 0.999, 0.05);
Out.ar(out, sig);
}).add;