Hi everyone:
I have a DSP question. I’m getting click sounds whenever I switch to a new delay duration quickly, or quickly turn on the synth with a gate. I’ve attached a recording of both examples.
Anyone have any advice on how to stop this? I tried changing envelope times in the second attempt but no luck. Thanks!
Example 1: First Half of the Recording:
SynthDef("delay", {
arg duration=1/2;
var input,delay;
input = In.ar(12); // Takes in Dry Mic Output Channel
delay = CombL.ar(
in:input,
maxdelaytime: 4,
delaytime: duration,
decaytime: 4,
mul: 0.5);
//duration.poll;
Out.ar(13,delay); // Send to Bus 11...Called "Delay Bus Out Channel";
}).add;
~delay_synth = Synth.new("delay",[\duration,~half],target:~delay_group);
~delay_synth.set(\duration,~sixteenth);
Example 2: Second Half of the Recording:
SynthDef.new(\delay1, {
arg in=0, out=0,mul = 0,gate=0,attackTime=3.5;
var sig,env, amp_env;
sig = In.ar(in, 2);
//env.poll();
sig = CombN.ar(
in:sig,
maxdelaytime: 1,
delaytime: 1/6,
decaytime: 4,
mul: mul,
);
env = EnvGen.kr(Env.adsr(
attackTime: attackTime,
decayTime: 0.5,
sustainLevel: 1,
releaseTime: 3,
peakLevel: 1.0,
curve: -4.0,
bias: 0.0),
gate:gate,
doneAction:2
);
sig = sig * env;
Out.ar(out, sig);
}).add;
["/s_new",["delay1", 300,0,delay_group, "in", delay1_bus_index, "out", 0,"gate",1,"mul",1.0]],