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!
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!