Delay with Feedback


#1

Hello,
i ve been trying to make a delay with feedback using the DelayA from the stk library, i have understood that this is not the optimal way to go about it but i wanted to try out of curiosity and ignorance…
I can reproduce a single repeat but i cannot feed it back to the same delay so i can generate the feedback, this is what i have done:

DELAYED_R = (FeedbackGain * DelayR1->tick(DelayR1->tick(rightChannel[i] )));

any ideas what i am doing wrong here?


#2

I don’t know that specific delay, but what you generally do in this case, is read the delayed signal first, so you can feed it back before pushing into the delay buffer. So I am not sure if that is possible in one line.

Does that help?


#3

Thanks for your reply @daniel ,
actually what am i trying to do is to send the signal from right channel to the DelayR1 and then to take this output and feed it back again to the same DelayR1 with a gain multiplier attached to it (the second time). do you think there is a way yo do that on a single ?


#4

That is exactly the problem, you are feeding twice the amount of samples into the delay line.

The flow should read:

  • pull samples from the delay line
  • sum these samples (with feedback gain applied) with the arriving new samples
  • push this sum into the delay buffer
  • send the original input plus the delayed signal (possibly with dry/wet mixer) to the output

Hope that makes sense (it worked in the delay I wrote a while ago)


#5

I had a quick look at the stk::Delay class, and I think addTo might be your chance to add the feedback to the delay.


#6

Many thanks @daniel

I am using the DelayA class though that does not have addTo

https://ccrma.stanford.edu/software/stk/classstk_1_1DelayA.html


#7

I see. That makes it a bit tricky, since this one works in frames, but only gives access to the last sample.

I would probably save the previous block then to mix it before feeding it into the delay line.
But this leads to other problems, when the host changes the buffer size in between (it is allowed to do so), you end up to write a circular buffer of here too.

It becomes more tricky than writing your own…


#8

maybe with tapIn() and tapOut()? But yeah, I second writing your own