Slight audio popping and crackles when writing delays

i spent most of today working on building a delay patch for my lich. it works as it should but whenever the delay level is turned up there is a slight crackle on the top of the delay sound. at first i thought it was clipping but turned everything way down and it’s still present. i tried to make sure i wasn’t combining any volume levels to be higher than 1 as well.

i’m not sure if it’s a puredata issue or an issue with my lich.It is a DIY kit. i don’t notice these issues on most patches i’ve loaded onto the lich. except i do have lots of issues with the cloud delay patch by canyin which i was looking to for ideas on how to make the code work.

it could be an issue with my lich i did have an issue getting the “resettable fuse” part to solder in and had to buy a replacement from mouser to get it working:https://www.mouser.com/ProductDetail/530-0ZRR0020FF1E

any ideas. i’ll try recording an audio sample and putting it on my google drive as well.

Hi @Professorbiohazard

Most common reason for delay clicks (“zipper noise”) is using raw ADC parameters to set delay length (which you do in this case). This way a small amount of noise that is always present in analog readings causes delay length to move, causing delay line’s read index to jump to different places.

So try using fixed length delay to see it fixes it. If that’s the case, you may try solve it by placing a LPF on delay time parameter to get smooth transitions (not always sufficient), use MIDI to control delay time without ADC noise or use 2 delay lines with interpolation between them.

Another thing to consider is that audio IO on Lich is DC coupled, so you may want to process it with DC blocker (or 5-10 Hz HPF) before storing in delay line. Delay’s feedback loop may also require DC removal. But that would likely cause different kind of issues and they are less common.

1 Like

thanks for the reply. i sort of follow your explination but i feel like i’m missing some core knowledge that would help me understand how to implement what your referring to. Sounds like it’s probably too complex to try and learn through a forum post. Any links to recommended reading or tutorials on the subjects?

thanks for the term zipper noise. that helped me find some results of other people running into similar issues.

Well delay line is a circular buffer - you write data in its head and read from read index N samples later. N is the delay length and when you change it you start reading in a different position - creating discontinuity in delay line’s output.

There are actually 2 ways this can manifest:

  • noise that is created when you don’t change delay line length, but set it by ADC that slightly changes due to analog input’s noise - this can be solved by using tap tempo, using MIDI to set delay length or applying hysteresis (ignoring delay length changes below some small threshold)
  • loud clicks that you would get from changing delay length manually, doing it continuously with a knob creates that zipper noise sound. this can be solved by interpolating read position, either with 2 reads from delay lines or by using 2 delay lines that are continuously crossfaded. you’ll probably find some example of a “clickless” delay based on 2 delay lines in PD, it’s a fairly common approach to delay effects.

That part is fine, no problem with that.

Writing good, or great, delays is surprisingly difficult, and ultimately involves some compromises whichever route you take. @antisvin has outlined some of the options, let us know how you get on!

i managed to get something that worked by doing some searches for zipper noise and pure data. It looks like i just needed a [pack f 50] object above the line~ going into the vd~ command. i get that the line~ command slews between values using the milliseconds passed to it as the slew rate. i understand that, but i’m having issues wrapping my head around why it fixes the zipper noise issue. the zipper noise was happening even when not moving the delay knob. are you saying the knob’s value changes slightly even when not touching it? I also don’t understand why [line~ 50] didn’t work, but adding the pack command does. if it wasn’t for syntax programming would be easy right?

my main goal with this was to emulate a delay guitar pedal i have, so i also added a low pass filter with one of the knobs affecting the filter frequency. So i can get the dark analong delay sound with the knob one way and also a brighter digital delay sound with it the other way. pretty happy with the results. may tweak it a bit, thinking of adding a tap tempo function as well as something playable to the 2nd button, like making it instantly go to full volume and feedback when that button is held then go back when released.

1 Like

I don’t know enough about PD/HVCC to tell that, but my guess is that pack object could cause line to computed every sample, while updating it by delaytime directly would be performed once per audio block (= 64 samples = 1.33 ms).

You should add a few ms slew to those transitions or you’ll get clicks. And probably a soft clipper if you’re going to experiment with feedback.