FFT for WAV file and output to draw spectrum
I have some questions about FFT. I want to use FFT to analyse frequency 开发者_如何学运维of WAV file, 16 bit dual chanel, 44100Hz. I want to analyse every 50ms, so that I have 2205 sample at the given time. So:
- I have to use FFT for 2205 sample as input array data ? And out put is an array which has 2205 elements too ?
- I want to draw spectrum of WAV file as some media player do, but I must use all of array or one value of it ?
This question isn't very clear, and I may have misunderstood, but I don't think you were asking how to perform an FFT.
But you should use all your data samples as input to the FFT, and draw a spectrum using all your output data.
Basically if your sampling rate is 2205, the max FFT frequency you can calculate is half of the sampling rate without aliasing i.e 1103.
For drawing the spectrum you need to have all the values of frequency values and corresponding real part of the FFT values.
精彩评论