I have a 4096-point FFT of a continuous pipe organ sound (no windowing). I wish to extract the relative amplitudes of the various harmonically-related sinusoidal components for voicing analysis. I can easily find the bins with the local maximum power for each component, but since the frequencies are not exactly in the middle of a bin, some of these peaks are spread between two adjacent bins, and the amplitude in each bin is less than it would be if the frequency were shifted to exactly hit that bin. For frequency analysis I have used various interpolation formulas with great success. But now I am doing amplitude analysis, and I want to know if there is a similar interpolation formula to estimate the amplitude of a component in a way that is independent of whether that component is exactly in the center of a frequency bin or is between two bins. My current best guess is the take the sum of the powers (magnitude squared) of the bin with the peak power together with the bins immediately adjacent to it. The sum of those three bin powers would then represent the power of that one component of the sound. Is there a better way?
-
$\begingroup$ Perhaps a window function would be good, but it won't solve the problem I have stated. It is still possible to get an actual frequency that is in-between two bins, and in that case the power in those bins will be less than if the frequency was exactly on a bin - windowing or not. $\endgroup$– Robert ScottFeb 22, 2015 at 17:37
1 Answer
Once you use parabolic or other interpolation for a frequency peak location estimate, you can use an offset Sinc kernel, centered at that estimated frequency, to interpolate the magnitude of that peak location. Sum each of the complex components of all the adjacent component values of the FFT result that are above the local noise floor (weighted by the offset Sinc kernel). Then take the magnitude of that complex result.
If you use any window function (other than rectangular of FFT width) use the transform of that window function instead of a Sinc kernel.
-
$\begingroup$ Thanks, Ron. The offset Sinc weighting helped. On a related note, sometimes, for unrelated reasons, my app has to change sampling time. Instead of 4096-pt FFT it gets a 8192-pt FFT covering twice the time. I would rather not downsample the raw data just to do a 4096-pt FFT when an 8192-pt FFT is already available. But it seems the amplitude peaks are not comparable after the switch. Is there an easy way to adjust the amplitudes so they are comparable? $\endgroup$ Feb 27, 2015 at 14:55