4
$\begingroup$

I am trying to perform real-time convolution on an audio stream using a fairly large FIR for convolutional reverb.

I found a great paper explaining how to do just that: Gardner, 1995. But, I'm new to this field and I'm still confused about some of the details and how to implement it.

  1. Does anyone know of an open source implementation of this algorithm? I have been looking and can't find one.
  2. If not, would anyone be willing to write some pseudo code for the actual steps of the algorithm or help try to clarify some of my confusions? Thanks!

What I understand: I get the general idea. I understand that naive convolution is slow and overlap-save DFT convolution is faster but has high latency. This paper uses a combination of the two. It uses plain convolution for the first bit of the FIR to buy time to accumulate enough data to run DFT on the rest of it.

What I don't understand: I think for many people the job scheduling and interrupts that you would need to actually implement a uniform CPU load version of this algorithm would be the daunting part, but I actually feel fine about that. What I'm confused about is the actual steps to the algorithm. Specifically:

  • A single audio data point comes in. What happens? The algorithm must produce a single point of output. Which convolutions/multiplications are we doing in that tick under which conditions?
  • Are we performing the overlap-save DFT convolution for each block of the FIR every tick/point? The language of the paper would imply not. But if not, then wouldn't the correct result change with every tick because the offset of the FIR would change with respect to the input stream?

Thanks for your help!

$\endgroup$
  • 2
    $\begingroup$ I've written an answer to this related question a few years ago. I don't remember too much of it anymore, but check it out, maybe it's helpful for you too. $\endgroup$ – Matt L. May 2 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.