Functionality of dsp::Convolution (FFT size, overlap, delay)

dsp_module
dsp
#1

Hello,

I’ve got a question concerning the dsp::Convolution class.

I need to convolve multiple incoming signals from the soundcard in real-time with room impulse responses. The processing is done within a VST-plugin. Depending on the room’s reverberation time, the impulse responses can be quite long.

To reduce computation time, I want to do the filtering with fast convolution in the frequency domain. For my understanding, fast-convolution induces a delay. The delay depends on the method of the fast convolution (overlap-add or overlap-save), the length of the FFT and the number of the overlapping samples. For my algorithm, I need to know this delay.

The question is: Is the dsp::Convolution suitable for this task? What kind of fast-convolution algorithm is used here? What is the FFT size and the number of overlapping samples, used internally?

While studying the code, I saw the comment “Overlap-add, zero latency convolution algorithm”. How is zero latency realized?

It would be great to get some more insights into the algorithm.

Thanks in advance.

Best regards,

Philipp.

0 Likes

#2

The convolution class has no additional delay, as it convolves the incoming audio even if the expected blocksize is not reached. So even if only one sample comes in, it will be transformed into frequency domain, multiplied by the first IR partition, and transformed back to a time domain signal.

1 Like

#3

Thanks for the reply!

So the convolution is performed sample-wise? This means for every new incoming sample a FFT is calculated over a block of past samples?

An alternative would be calculating the convolution block-wise. This would result in a sub-sampled frequency domain signal and a delayed output signal. Computational complexity could be reduced by doing so. But if I understand you correctly, this is not the case in dsp::Convolution?

0 Likes

#4

No not sample wise that would be a horror! It’s a uniformly partitioned convolution, which performs it blocksize, but to meet the zero delay criteria it will convolve a single sample if necessary. Otherwise the full block of data

0 Likes

#5

Sorry, for the late reply. I haven’t received a notification.
I think I got the point. Thank you very much.

0 Likes