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.

by Timothy Place on February 7, 2017

Graeme Gerrard's icon

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?

Jean-Francois Charles's icon

@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

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.

👽'tW∆s ∆lienz👽's icon

^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)

here's that patch:

Max Patch
Copy patch and select New From Clipboard in Max.