hey, im trying to create a convolution patch in pd for a project.
im trying to use one fft for the impulse response and one for the source material. the aim is to pre load the impulse response through the fft then save the real and imaginary components in 2 tables.
the problem im then having is how to then combine this with the source material in the same way that any convolution reverb works.
thanks
-
Convolution
-
Convolution in time domain is multiplication in frequency domain, that is, complex multiplication of the real and imaginary parts in signal spectrum and filter spectrum. If the filter is not strictly zero-phase, the multiplication involves phase shifts, and the output signal will be longer than the input. To avoid fold-over of signal samples (circular convolution), techniques of zero-padding and overlap-save or overlap-scrap are normally implemented for fast convolution. It is even possible to cut the impulse response in parts if it is longer than a reasonable FFT size. In another thread, bassik has pointed to this article describing partitioned convolution:
http://www.acoustics.net/objects/pdf/article_farina04.pdf
It is a very interesting technique because, when the filter is causal, low latency processing can be done even with long FIR filters.
I am not sure if fast convolution can be implemented as a Pd patch, because of the required zero-padding. Partitioned convolution is even more complicated. Fortunately, Ben Saylor has written [partconv~], which is in Pd extended. This object can do it all.
Katja
-
[partconv~] ...couldn't create.
I'm using pd extended 0.42.5 on OSX
Any ideas why?
-
[partconv~] needs the array with the FIR filter as an argument, and a partition size which must be a power of two.
Also, when you write a new filter into the array you must send a set message to [partconv~] so it can reload the content.
In this thread you can find IR measurement patches using [partconv~]:
http://puredata.hurleur.com/sujet-4189-3.html
Katja