Pops after changing the delay time

Hello, everyone,
I saw a few posts about smoothing, modulating, and resampling the delay line but my problem is a bit different I guess.
I tried the juce_DelayLine which has a few different interpolation types. It works well but I noticed something when I tried to test it with a pure sine or a mix of a few sines to see if there are any pops or clicks. I don’t change the delay time continuously, my knob is a kind of state knob.
When I play the sine and try to change the delay line it creates a small pop after changing the delay time. It is not a huge pop but it is there. When I change the delay time only once, I get one pop. When I change it two times I get one pop for each change. Sometimes it does not happen but mostly it pops.
Some people use a low-pass filter to get rid of this and get a kind of tape effect but I want mine to be very clear and smooth during changing the delay time.

I am open to all kinds of suggestions, I can share my code but I just followed the simple steps,

  1. reset in the constructor,
  2. prepare in prepareToPlay
  3. process in processBlock
  4. setDelay in paramaterChanged

Thanks in advance :pray:

Any discontinuation in an audio stream will create audible artefacts; you will always need to work around them. Interpolation, filtering, ramping/crossfading and parameter smoothing, etc., are some of the few things you can do.

1 Like

I see, I will try to debug more :slight_smile: the strange thing is that the generic DelayLine itself is doing it. I didn’t implement additional things. Thank you for your answer :pray:

DelayLine is a DSP primitive; you still need to add the plumbing to make it play nice :slight_smile:

From DelayLine docs:

Note: If you intend to change the delay in real-time, you may want to smooth changes to the delay systematically using either a ramp or a low-pass filter.