Tutorials

    Advanced Max: FFTs, Part 2


    In the second in our series on using the FFT in Max, spend 30 minutes exploring FFT windowing and applying this new knowledge to the noise reduction and Forbidden Planet patches we built in Part 1.
    All the tutorials in this series: Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, Part 7.

    Advanced Max: FFTs, Part 2


    by Timothy Place on
    Feb 7, 2017 8:29 PM

    • Graeme Gerrard
      Feb 08 2017 | 10:33 pm
      Great tutorial. Looking forward to part 3 already. How could you store different fft frames, in a file or a matrix for later re-use?
      Share
    • Jean-Francois Charles's icon
      Jean-Francois Charles's icon
      Jean-Francois Charles
      Feb 09 2017 | 1:45 pm
      @Graeme: yes, you can. For instance these tutorials (data written in a matrix), or in the Max examples, Extras -> Examples Overview -> MSP -> phase-vocoder-sampler (data written in a buffer~).
    • Arthur Sauer's icon
      Arthur Sauer's icon
      Arthur Sauer
      Aug 14 2022 | 9:21 am
      The windows in the fft-noise-reduction subpatch should have been squared to be correct. See also "MSP Analysis Tutorial 3: Using the FFT" in the Max Reference documentation.
    • 👽It W∆s ∆lienz👽's icon
      👽It W∆s ∆lienz👽's icon
      👽It W∆s ∆lienz👽
      Feb 01 2023 | 4:01 am
      ^oh, i finally understand what Arthur above was trying to say: they meant "should have been passed through square-root..." (squared would be the opposite where it might be multiplied by itself, and i tried that also, but when they sum in 'overlap-add', it's not as ideal as when simply summing a straight Hanning window...) and i believe the "MSP Analysis Tutorial 3: Using the FFT" in the Max Reference documentation only did this because it starts with a 'triangle' window but Tim's way is probably more useful as something like a 'hanning' window is nicely summed with the overlap-add technique to remain at a constant of '1', especially where overlap is left at '2':
      (also tested the summed square-root of triangle waves to see if better with overlap of 4 but then it overshoots '1' constantly)
      (also tested the summed square-root of triangle waves to see if better with overlap of 4 but then it overshoots '1' constantly)
      here's that patch:
      Max Patcher
      In Max, select New From Clipboard.
      Show Text