How to get the fundamental frequency from FFT?

2019-02-28 06:35发布

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条回答
时光不老,我们不散
2楼-- · 2019-02-28 06:50

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

查看更多
欢心
3楼-- · 2019-02-28 07:05

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楼-- · 2019-02-28 07:11

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

查看更多
登录 后发表回答