How to get the fundamental frequency from FFT?

21.3k views Asked by At

I am developing a flash guitar, and the only apparent method to discover the frequency of the mic's data looks to be using FFT. Nevertheless, after something like 30 hours of research I could not discover the best way to do that. Should I use Harmonic Product Spectrum (HPS), Cepstrum or Maximum Likelihood? The tuner will have to show frequencys from 25 to 3000Hz.

Also, if someone knows about some open source code ready to find the fundamental frequency, please tell me. I can translate it to ActionScript.

Thanks!

3

There are 3 answers

7
Felice Pollano On

I try to reply with my basic remembrance: when ytou have the FFT of your signal, the fundamental isn't te one with the maximum amplitude ?

4
Nemeth On

The FFT it's not the best way to find a fundamental frequency of a musical instrument. Actually, yes, it would be a better idea to use cepstrum. You can find a similar questions here: Algorithm to determine fundamental frequency from potential harmonics and here : MATLAB - Missing fundamental from an FFT

0
shams On

The simplest technique I've had success with is to use FFT and then perform a Harmonic Product Spectrum. It is simple to implement and not very resource intensive, you just need to correctly downsample your result FFT and make products.

The following question should also be useful: Detecting the fundamental frequency