Taming High Feedback on Delay effect

-ctn-

New member
Hey everyone. I have an audio project that is, so far, working pretty well! One of the little issues I’m having is getting that nasty volume creep / distortion when turning up a feedback loop on a delayed signal.

I apologize for not having my code posted, I’m at work and don’t have access to it. I figured the problem is broad enough that it might not be necessary, though I can update later.

Project for context: a piezo sound / noise box with Teensy doing a delay effect, the intent is to be able to set the delay time with a knob and turn the feedback up when interacting with the box to effectively get a percussion loop, that loops the delayed signal forever until you turn the knob
down. I don’t want to record it as a sample and play it back because I want to be able to have a loop going (delayed signal repeating forever) and be able to add on top of it, ie tap the box to get a bass drum sound, then tap metal to get a snare sound, etc. So the input is always active

What works: everything!

Issue: of course, turning the feedback loop to 100% causes the delayed signal to increase in volume until it comes distorted noise. I would like to find some way to tame this and keep the delayed signal at a constant volume.

Relevant details / code:

Using a 10K pot into an analog pin, using analogRead(); to find its current value, rounding and mapping that value to 0-1.0, and applying that value to the mixer block’s channel which is connected to the delay output.

I’m only using one delay line. The serial monitor displays everything as it should: the pot at 50% shows 0.5 value, then at max 100% shows 1.0 value. It never goes above 1.0 because that is the highest I have it mapped to.

I’m not sure how to alleviate the issue, other than maybe adding an amp or mixer block between the delay and the feedback mixer in order to drop the signal in volume a little bit, but I feel like it won’t solve anything and I’ll still get that runaway feedback problem.

I’ve tried setting the max feedback value to 0.98 and 0.95 to see if maybe a value just under 1.0 would work, and it does for a little bit, but as expected, eventually the delayed signal fades out which isn’t what I want. I want it to go forever but avoid the creeping volume increase. From my experience, this is fairly common with delay paths, although a lot of other devices (effects pedals etc) have some work around because they can function as I want this to.

Has anyone here tried anything similar or have any ideas? Thanks!
 
teensy_setup.PNG

I may have discovered the culprit, but I haven't tried any fixes or thought through a solution that I'm confident about.

Theory: My Audio System Library routing is like this. Mixer1 handles both line-in inputs and the delayed signal output (feedback loop). The two mixer channels from Amp1 and Amp2 are set to 0.33 and don't ever change, although the third mixer channel (from the delay output) is set to 0.0 to start the sketch with no delay feedback.

As mentioned, by Feedback Knob is mapped from 0-1.0 and that value is applied to Mixer1 channel 3 (delay output) to turn up the delay feedback. Well, the other two channels are still at 0.33 (0.33+0.33=0.66), so if the third channel is set to 1.0 because of the knob position, the final output of Mixer1 is 1.66, which can cause clipping. Since the output of Mixer1 feeds into the delay input, the clipping will only increase.

So my fix is going to be to play with the gain of the mixer channels in order to get a final output at or below 1.0 and see if that fixes my runaway feedback issue. Hopefully if the output is exactly 1.0 there will be no decay effect on the delayed signals but I'm not sure yet.
 
Back
Top