## magnitude values from [fftin~]

Jul 26, 2011 at 11:14am

# magnitude values from [fftin~]

Hi,

This is a quote from MSP tutorial 26:

“The amplitude values output by the left outlet of cartopol~ naturally depend on the amplitude of the signal you send to the pfft~ object. Nonetheless, the maximum amplitude value for a constant signal of 1.0 will be equal to the sum of the amplitude values of the windowing function used. For a Hanning window this is equal to half the FFT size, and for a square window this is equal to the FFT size. For an oscillation, such as a sine wave, with a maximum amplitude of 1.0 the maximum values obtained from the FFT are one quarter of the window size…..So, for example, when using a 512-point FFT with the default Haning window, a full-volume sine wave at half the nyquist frequency will have a value of 128 in the 128th frequency bin (512 * 0.25). “

Questions:

1. Are these kind of magnitude values something normal in FFT analysis or is this some special feature of [fftin~] or [pfft~] object?

2. I think I understand Fourier integral and “how it works” but I can’t figure out the relation between window sizes and magnitudes.

Thank you very much!

#58193
Jul 27, 2011 at 9:15am

I have the answer to question one already, so question 2 again:

Can somebody please explain me the relation between the size (maybe even shape) of window function and the magnitude values after FFT analysis?

Cheers!

#208984
Jul 27, 2011 at 1:42pm

#208985
Jul 27, 2011 at 1:44pm

i just came up with one theory, any comments are welcome…

please see the attached picture first…

In the pic below there is an infinite Fourier integral (integration of multiplication between input signal by sine wave). So in the test patch I have a test sine wave (probe) and input signal (target). so sin(x) * sin(x) = 0.5-0.5*cos(2x). … 0.5-0.5*cos(2x) is the function in the oscilloscope called result. now the definite integral of this function between 0 and 2Pi(surface or area between abscissa and function) equals exactly Pi, which is exactly half “the window size”, if this would be windowed. and then if the window is triangle instead of square (area of triangle is half the square), the result (area) gets divided by 2 again. in Hanning case the situation is the same as with triangle (the area below hanning curve is the same as triangle’s). Therefore if using Hanning the result is quarter of window size as stated in Max tutorial…?

hmm..:-/

[attachment=167511,2475]

###### Attachments:
#208986

You must be logged in to reply to this topic.