Nyquist Convolve Limits

Hi Steve,

I know that convolution has come up several times before, but was wondering what the track length limits are
in Nyquist using Audacity 2.3.1 (Mac).

I read a post that you wrote from around 2018, that the convolve function was updated to be much faster
and presumably be able to handle longer selections.

Has this been applied to the Nyquist version that ships with Audacity 2.3.1 ?
Would just like to get some clarification before I embark on a path that may have too many limitations.


Yes, Nyquist now has “fast convolution” which is very much faster than the old convolution.
If I recall correctly, it was added to Audacity in spring 2020, so that would be Audacity 2.4.0.
It is used in the “Spectral Delete” effect: https://github.com/audacity/audacity/blob/master/plug-ins/spectral-delete.ny

What the manual says (https://www.cs.cmu.edu/~rbd/doc/nyquist/part8.html#index438)

convolve(sound, response) [SAL]
(convolve sound response) [LISP]
Convolves two signals. The first can be any length, but the total space required is proportional to the length of response. The start time, logical stop time, and sample rate of the output match those of the input sound. The physical stop time of the result is the physical stop time of sound plus the duration of the response so that the result sound includes the “tail” of the filter response. The response is linearly interpolated if necessary to have same sample rate as sound. The current implementation uses a “fast convolution” algorithm with a maximum FFT size of 64K, which after zero padding allows up to 32K point convolutions. If the impulse response is longer, it is broken into multiple blocks of 32K samples. There is no limit on the length of the impulse response. This is an Order(N x M) algorithm where N and M are the number of 32K sample blocks in the sound and response, respectively. Further discussion and examples can be found in demos/convolution.htm.

Thanks very much Steve.

Some feedback:

Just tried “convolve” in Audacity 2.3.1 and it took 48 seconds to do a 4.5 minute audio clip.
I’m happy with that.