Author Topic: Peak amplitude floats and depends on FFt Size and\or Samplerate  (Read 2478 times)

pethead

  • Posts: 27
I made FFT and get peak value of amplitude (calculated in dB) from FFT array, that's ok. I test it with generated tone of 36Hz and FFT gives me an approximately of 36Hz depends on FFT Size and Samplerate. My result is match with SpecLab program. very well.
but value of amplitide floats and depends on FFT Size and Samplerate. why? in the SpecLab value of amplitude is constant.


mr.sam

  • Guest
You'll never get accurate amplitude of a particular frequency (36 Hz or something else) with FFT. Except the case when frequency is multiply to SampleRate/FFTWindowLength. 

For example, if you have a signal with a single sin tone and you're using 1024 point FFT with 44100 sample rate, the accurate frequencies will be 0, 43, 86, 129, .. 22007, 22050. All other frequencies will be detected with an error. You may decrease error value by using a bigger FFT window.

pethead

  • Posts: 27
how much the FFTWindowLength in BASS? or it's same as FFT Size?
how to increase FFTWindowLength in BASS engine?
« Last Edit: 14 Feb '11 - 07:17 by pethead »

Pink Rabbit

  • Posts: 1
From help:

Quote
BASS_DATA_FFT1024 1024 sample FFT (returns 512 floating-point values)

1024 - is a fft window length, Bass returns FFTWindowLength/2 floating-point values

Don't forget, you can also decrease SampleRate if you're using such low frequencies as 36 Hz.

See attachment.