Looking for an example of realtime convolution algorithm

Hello all,
I have been studying reverb convolutions for the past few months. I hunderstand the theory of it but I have no experience with realtime dsp.
I already implemented different algorithm in python to perform convolution such as direct form, fft products, and overlapp-add algorithm (but with fixed inputs).
I’d like to write a module that implements convolution in real time but I’m stuck where it comes to transposing any of those algorithms to a module where it’s input is not a single array x of fixed length.

Do any of you have any resources to point me at that implement such algorithms in real time ?

I’m aware that convolution might not be the best path to start dsp dev, but that’s what I’m most familiar with and I also want it available in vcv (and open source) !

Thank y’all for your help !

1 Like

Hmm, any convolution I’ve seen and used has always been sample based i.e. you load the waveform into it. It can be as difficult as you want to make it, from my own experience

Some good reading here:
and here

musicdsp also has a lot of good examples

1 Like

Rack’s DSP library includes an overlap-add convolution in dsp::RealTimeConvolver.


I can tell you from my experience that getting this to work on your own is really difficult. That dsp::RealTimeConvolver looks like it will make it easy. Of course it’s still block based, so depending on what latency you can tolerate you will at a minimum need to delay by a “block”, or you will need to do some very fancy extra code to make it “zero latency”.

1 Like

Yeah you’re probably right I’ll dig deeper in the already written code.
I’d like in the end to achieve some kind of zero latency algorithm but it is probably to complex for me yet.
Thank you for your replies I’ll keep this thread updated with whatever I come up with.
Cheers !

1 Like

You may want to look into this paper from 1993, discussing a hybrid direct/block convolution method: http://alumni.media.mit.edu/~adamb/docs/ConvolutionPaper.pdf. While I’m not sure how viable this may be in the context of Rack, it may be helpful in guiding your thinking.

Yeah, for a long time that algorithm was patented by a company called Lake. No reason that wouldn’t work find in VCV Rack, but it’s not simple to implement!