hi,
is anyone aware of an example of both a brute force time domain (e.g. buffir~ in Max) and an FFT-based fast convolution patch in pd-vanilla? I would like to do a comparison of the two. Can be using a small IR, just for demo purposes.
cheers,
Oli
For the FFT based convolution, you could easily modify the example patch I06.timbre.stamp.pd to do straight up convolution in the frequency domain. I wouldn't know how to do it in the time domain without an extern or a lot of painstaking work. It might be a nice thing to have, though.
I can tell you, though, that the frequency domain method will out perform the time domain in terms of CPU usage. But, since you are windowing there will be a latency. Apart from that, the output is identical by both methods.
y(n) = x(n) * g(n) Y(k) = X(k)G(k), y(n) = IDFT(Y(k))
where g(n) is the impulse response, X(k) is the discrete Fourier transform of x(n) and * is the convolution operation.
On 05/05/2014 09:33 AM, Oli Larkin wrote:
hi,
is anyone aware of an example of both a brute force time domain (e.g. buffir~ in Max) and an FFT-based fast convolution patch in pd-vanilla? I would like to do a comparison of the two. Can be using a small IR, just for demo purposes.
cheers,
Oli
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Brute force time domain convolution for small kernel can be done with [fexpr~]. For zero phase filter kernels, fast convolution in Pd is relatively simple. Multiply real and imaginary part of the signal's spectrum with the filter's spectrum while using four times overlap and Hann windowing before FFT and after IFFT, and normalize. Pd's FFT routines assume x[0] at the start of the filter kernel, not at the center, so you have to rotate your zero phase filter kernel before taking it's Fourier Transform.
Katja
On Mon, May 5, 2014 at 8:49 PM, david medine dmedine@ucsd.edu wrote:
For the FFT based convolution, you could easily modify the example patch I06.timbre.stamp.pd to do straight up convolution in the frequency domain. I wouldn't know how to do it in the time domain without an extern or a lot of painstaking work. It might be a nice thing to have, though.
I can tell you, though, that the frequency domain method will out perform the time domain in terms of CPU usage. But, since you are windowing there will be a latency. Apart from that, the output is identical by both methods.
y(n) = x(n) * g(n) Y(k) = X(k)G(k), y(n) = IDFT(Y(k))
where g(n) is the impulse response, X(k) is the discrete Fourier transform of x(n) and * is the convolution operation.
On 05/05/2014 09:33 AM, Oli Larkin wrote:
hi,
is anyone aware of an example of both a brute force time domain (e.g. buffir~ in Max) and an FFT-based fast convolution patch in pd-vanilla? I would like to do a comparison of the two. Can be using a small IR, just for demo purposes.
cheers,
Oli
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I did one and shared on the list
you can check it at: https://drive.google.com/file/d/0B3AoiT0xk8fnNU9PRHdldVVFbU0/edit?usp=sharin...
2014-05-05 16:41 GMT-03:00 katja katjavetter@gmail.com:
Brute force time domain convolution for small kernel can be done with [fexpr~]. For zero phase filter kernels, fast convolution in Pd is relatively simple. Multiply real and imaginary part of the signal's spectrum with the filter's spectrum while using four times overlap and Hann windowing before FFT and after IFFT, and normalize. Pd's FFT routines assume x[0] at the start of the filter kernel, not at the center, so you have to rotate your zero phase filter kernel before taking it's Fourier Transform.
Katja
On Mon, May 5, 2014 at 8:49 PM, david medine dmedine@ucsd.edu wrote:
For the FFT based convolution, you could easily modify the example patch I06.timbre.stamp.pd to do straight up convolution in the frequency
domain. I
wouldn't know how to do it in the time domain without an extern or a lot
of
painstaking work. It might be a nice thing to have, though.
I can tell you, though, that the frequency domain method will out perform the time domain in terms of CPU usage. But, since you are windowing there will be a latency. Apart from that, the output is identical by both
methods.
y(n) = x(n) * g(n) Y(k) = X(k)G(k), y(n) = IDFT(Y(k))
where g(n) is the impulse response, X(k) is the discrete Fourier
transform
of x(n) and * is the convolution operation.
On 05/05/2014 09:33 AM, Oli Larkin wrote:
hi,
is anyone aware of an example of both a brute force time domain (e.g. buffir~ in Max) and an FFT-based fast convolution patch in pd-vanilla? I would like to do a comparison of the two. Can be using a small IR, just
for
demo purposes.
cheers,
Oli
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
thanks everyone ... Alexandre that is just what i was looking for
On 6 May 2014, at 06:09, Alexandre Torres Porres wrote:
I did one and shared on the list
you can check it at:https://drive.google.com/file/d/0B3AoiT0xk8fnNU9PRHdldVVFbU0/edit?usp=sharin...
2014-05-05 16:41 GMT-03:00 katja katjavetter@gmail.com: Brute force time domain convolution for small kernel can be done with [fexpr~]. For zero phase filter kernels, fast convolution in Pd is relatively simple. Multiply real and imaginary part of the signal's spectrum with the filter's spectrum while using four times overlap and Hann windowing before FFT and after IFFT, and normalize. Pd's FFT routines assume x[0] at the start of the filter kernel, not at the center, so you have to rotate your zero phase filter kernel before taking it's Fourier Transform.
Katja
On Mon, May 5, 2014 at 8:49 PM, david medine dmedine@ucsd.edu wrote:
For the FFT based convolution, you could easily modify the example patch I06.timbre.stamp.pd to do straight up convolution in the frequency domain. I wouldn't know how to do it in the time domain without an extern or a lot of painstaking work. It might be a nice thing to have, though.
I can tell you, though, that the frequency domain method will out perform the time domain in terms of CPU usage. But, since you are windowing there will be a latency. Apart from that, the output is identical by both methods.
y(n) = x(n) * g(n) Y(k) = X(k)G(k), y(n) = IDFT(Y(k))
where g(n) is the impulse response, X(k) is the discrete Fourier transform of x(n) and * is the convolution operation.
On 05/05/2014 09:33 AM, Oli Larkin wrote:
hi,
is anyone aware of an example of both a brute force time domain (e.g. buffir~ in Max) and an FFT-based fast convolution patch in pd-vanilla? I would like to do a comparison of the two. Can be using a small IR, just for demo purposes.
cheers,
Oli
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
and it took me quite some time to figure it out :)
2014-05-06 10:55 GMT-03:00 Oli Larkin olilarkin@googlemail.com:
thanks everyone ... Alexandre that is just what i was looking for
On 6 May 2014, at 06:09, Alexandre Torres Porres wrote:
I did one and shared on the list
you can check it at:
https://drive.google.com/file/d/0B3AoiT0xk8fnNU9PRHdldVVFbU0/edit?usp=sharin...
2014-05-05 16:41 GMT-03:00 katja katjavetter@gmail.com: Brute force time domain convolution for small kernel can be done with [fexpr~]. For zero phase filter kernels, fast convolution in Pd is relatively simple. Multiply real and imaginary part of the signal's spectrum with the filter's spectrum while using four times overlap and Hann windowing before FFT and after IFFT, and normalize. Pd's FFT routines assume x[0] at the start of the filter kernel, not at the center, so you have to rotate your zero phase filter kernel before taking it's Fourier Transform.
Katja
On Mon, May 5, 2014 at 8:49 PM, david medine dmedine@ucsd.edu wrote:
For the FFT based convolution, you could easily modify the example
patch
I06.timbre.stamp.pd to do straight up convolution in the frequency
domain. I
wouldn't know how to do it in the time domain without an extern or a
lot of
painstaking work. It might be a nice thing to have, though.
I can tell you, though, that the frequency domain method will out
perform
the time domain in terms of CPU usage. But, since you are windowing
there
will be a latency. Apart from that, the output is identical by both
methods.
y(n) = x(n) * g(n) Y(k) = X(k)G(k), y(n) = IDFT(Y(k))
where g(n) is the impulse response, X(k) is the discrete Fourier
transform
of x(n) and * is the convolution operation.
On 05/05/2014 09:33 AM, Oli Larkin wrote:
hi,
is anyone aware of an example of both a brute force time domain (e.g. buffir~ in Max) and an FFT-based fast convolution patch in
pd-vanilla? I
would like to do a comparison of the two. Can be using a small IR,
just for
demo purposes.
cheers,
Oli
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->