Is windowed-fft~ broken?

Joshua Emmons's icon

I'm pulling my hair out trying to get a windowed fft to spectral plot~ working. Looking at the example in plot~.maxhelp, though, the graph plotted by windowed-fft~ slowly climbs, eclipses the unwindowed FFT, and then recedes again. Surely that's not normal, right?

I suspect the [count~ 1 1024 1 1] to [-~ 1] to be at fault. Seems like that would give numbers between 0–1022 then loop again?

Benjamin Whateley's icon

Hi Joshua.

For anyone returning to this question, open the plot~ help file and navigate to the spectral tab, I wouldn't recommend editing a help file so make a new patch and copy everything from this tab into a new patcher window. open the windowed-fft~ abstraction, copy all it's content and make a new abstraction or sub patch.

One you've done this open your copy of windowed-fft~ change the first argument to the counter~ object from 1 to 0. You can then go ahead and remove the -1~ before each fft~.

counter~ counts from a start index up to, but not including it's limit argument, because counter was set to 1 and not 0, only the values 0 to 1022 where sent to the index~ object.

Benjamin Whateley's icon

Here's the fix, you will need my windowed-fft_copy~ abstraction, set the first argument to 1024.

Max Patch
Copy patch and select New From Clipboard in Max.
windowed-fft_copy~.maxpat
Max Patch