Question: Realtime convolution using pfft~


    Mar 24 2020 | 9:04 pm
    Dear Great Max-lovers, I have a simple question which I want to get a thorough understanding of pfft~ and realtime convolution in Max/MSP. If I design a FIR filter, I usually use buffir~ object but the buffir~ limits the number of taps. For a longer FIR filter (such as a room IR), I want to make a pfft~ based fast convolution. I know that I can use HISSToolBox for this purpose ... but I want to try and design my own one.
    In my first trial, I compared buffir~ and pfft~ for a short FIR (2048 taps), expecting that those two would generate same results. But the results were quite different. If one of you could let me help to debug this and remove this difference, it would be helpful for me to move forward. Many thanks in advance.

    • Mar 25 2020 | 11:35 am
      you dont really do it in an (p)fft, it is theoretically possible, but not in practice. and when i understand it right i would be limited to 4096, hardly enough for a small room´s first reflections. http://www.pescadoo.net/annexe/max/index.html https://en.wikipedia.org/wiki/Dirac_delta_function
    • Mar 25 2020 | 3:54 pm
      You wrote: "but not in practice" Does it mean that "practically" Max's (p)fft cannot produce the exactly same convolution result as buffir~?
    • Mar 25 2020 | 4:28 pm
      Does it mean that "practically" Max's (p)fft cannot produce the exactly same convolution result as buffir~?
      No, a pfft based convolver can produce the same output as buffir~. But it is not suitable to create a convolution reverb with it. You might read up on partitioned convolution.
    • Mar 25 2020 | 5:43 pm
      That's what thought (and believed) but the patch that I generated demonstrates the difference between buffir~ and pfft~. That's why I started this question...
    • Mar 25 2020 | 5:57 pm
      the patch that you posted is missing the pfft patcher, so nobody can tell...
    • Mar 25 2020 | 11:52 pm
      ouch... my bad.. i will fix the original posting --> Now fixed
    • Mar 27 2020 | 5:31 pm
      looks like you are experiencing time aliasing caused by 'circular convolution' - there's a nice explanation in smith's dsp-guide for a comparison of time domain convolution (buffir~) and fast convolution (using pfft~) in class I'm using the attached patch. maybe this gives you some clues.