Forums

how to scale magnitude

Started by Philipp April 4, 2004
I want to normalize a spectrum of a digital audio signal. I made
FFT of the signal and converted the img/real values in polar
coordinates (magnitude, phase) (Im using FFTW implementation). Now
I want to scale the magnitude ... Is there an equation to find out
the highest possible value of the magnitude? I have read that it
depends on the length of the FFT?!

Regards
Philipp
-- 


"Philipp" <philposting@gmx.de> wrote in message
news:c4ons1$2k1acb$1@ID-197340.news.uni-berlin.de...
> I want to normalize a spectrum of a digital audio signal. I made > FFT of the signal and converted the img/real values in polar > coordinates (magnitude, phase) (Im using FFTW implementation). Now > I want to scale the magnitude ... Is there an equation to find out > the highest possible value of the magnitude? I have read that it > depends on the length of the FFT?! > > Regards > Philipp > -- >
Hello Philipp, For sinusoids, the "gain" of an FFT is N for the bins at 0 Hz and at one half of the sampling rate (provided N is even). N is the length of the data set that is transformed. All of the other bins will have a gain of N/2. Since you are using digital audio I assume the data is real valued and not complex, so the spectrum has Hermitian symmetry. For the simplest processing I'd just ignore the two end bins and just rescale all of the others by 2/N. You can also rescale the two end bins by 1/N, but there shouldn't be any audio there. I hope this helps. -- Clay S. Turner, V.P. Wireless Systems Engineering, Inc. Satellite Beach, Florida 32937 (321) 777-7889 www.wse.biz csturner@wse.biz
>