I’m fairly new to JUCE development and DSP. I built a delay plugin based on “The Audio Programmer” youtube tutorial (https://www.youtube.com/watch?v=IRFUYGkMV8w), and then added my own UI parameters, etc. Each time processBlock gets called, the code takes audio from the main buffer, copies it into a delay buffer, runs the delay back into the main buffer offset by a read pointer calculated using the delay time, and then feeds the output back into the delay buffer for feedback. That part seems to be standard for a circular buffer.
When I change the delay time in the UI, I don’t get the characteristic pitch-shifting effect of other delay plugins and instead I tend to get clicks and pops. I think this is due to the delay time being set and called on each block rather than sample-by-sample. (If i’m wrong would love to get pointed in the right direction!).
MY QUESTION IS: is there a way to smooth out these artifacts without re-writing the code to recalculate the read pointer on each sample? Can we maintain the processing for each block (which seems to have some efficiency advantages?) and remove the artifacts/get the standard pitch-shift effect?? Thanks!