N/2 is only true for a square window (i.e. no windowing), as the

window function used has a direct impact on the range of the magnitude values.

iirc you can calculate it from the sum of the points (sample values) in the window.

so as the default window for fftin~ is "hanning", this sounds all fine.

a 1024-point hann window has a total sum of 512.

so replacing "N" by "sum of the points in the window" should give you the correct max. magnitude.

of course you only reach this value if a full scale component of the input signal exactly matches the frequency of an fft bin.

chris, how are you measuring the magnitude, inside or outside pfft~?

fftout~ does some intelligent automatic scaling behind the scenes, depending on overlap and window function, in order to keep things simple for the end user, but obscuring some details at the same time.

i would look at the max magnitude inside the pfft~, as this is where the processing of the data takes place.

by the way, as this topic has come up before with references to the cycling docs, especially "tutorial 26: frequency processing...": there are some mistakes in this article. the formula for calculating the max. magnitude doesn't seem to be correct, and i can't see how the example results given, comply to this formula. (maybe it's just me...)

and stating that phase values are between -1 and 1 is obviously an oversight.

volker.