I'm calculating FFT from microphone input. I notice that lower frequencies always seems to have more power (higher dB) than higher frequencies.
- I cut the data into frames of 24576 bytes (4096*6).
- Apply Hamming window:
input[i] *= (0.54d - 0.46d*(double) Math.Cos((2d*Math.PI*i)/fs));
- Run it through FFTW
- Convert from complex numbers:
output[i] = 10.0 * Math.Log10((fout[i * 2] * fout[i * 2]) + (fout[i * 2 + 1] * fout[i * 2 + 1]));
- Average out 6 values to get a complete FFT of 4096 bytes.
- Paint pretty picture (colors mapped to a palette).
The averaging (pt. 5) is done to lower FFT noise.
As the image shows both with sound and with mic off there is more energy (and more noise) in the lower frequencies. This indicates its more than just a mic/sub problem.
1. Is this expected? Why?
2. Any standard way of fixing this? Almost looks like some Math.Tan() magic could lift it up where it belongs.
My goal is to be able to identify the top 5 frequencies without lower frequencies winning by default.