4

After applying a FFT, I get a spectrum with multiple frequency bins. How to get the fundamental frequency from this spectrum using the cepstral method?

I've researched a lot, tryed a lot of codes and asked three times on stackoverflow (wich helped a LOT), and I am pretty sure that the cepstral method is the best to discover the fundamental frequency in my case. I just don't know how to do it.

If you guys know some ready-to-use code for cepstral, please paste it on your answer! Any other resources are welcome too.

Thanks again!

Lucas Speranza
  • 149
  • 1
  • 3
  • 5
  • 1
    If the answers to other questions helped you a lot ... How is it that you never voted and never accepted an answer? You should read the FAQ. Take your time understanding how SO works, and many people will invest their time trying to help you – Dr. belisarius Feb 12 '11 at 02:06
  • You simply need to understand the math (e.g. whence the cepstrum eqn, what's an autocorrelation, etc) . If you don't understand the math, a prepackaged library isn't going to help. The cepstrum is easy to calculate, it's the interpretation that's throwing you. Therefore, this is a math problem, not a programming problem. If this were a small issue, I'd answer it, but it's a hard problem and a big complex set of issues, and this isn't the right forum in which to walk you through all of them. – tom10 Feb 12 '11 at 04:27

1 Answers1

2

Peaks in the cepstrum identify periodicity in the frequency domain. If your source is clean there should be one peak in the cepstrum. The bin at which this occurs tells you the quefrency. There is a linear relation between this and the fundamental frequency of your input signal. To think about in non-mathematical terms: if the quefrency is 5, then your harmonics are 5 bins apart, which implies a fundamental at bin 5 in the frequency domain. You just translate this to a frequency in the usual way for an FFT. Try plotting the FFT magnitude and the cepstrum for a given input so that you can get a practical understanding of what is going on mathematically.

Paul R
  • 208,748
  • 37
  • 389
  • 560