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.