title: Estimate the fundamental frequency using cepstral analysis
body: <p>Wrote a frequency domain pitch detection algorithm in C and now I'm trying to estimate the fundamental frequency. I have the maximum magnitude bin from the Fourier Transform, but that can also be an harmonic not necessary F0. I read somewhere that it is possible to estimate F0 using <a href="http://en.wikipedia.org/wiki/Cepstrum" rel="nofollow">cepstral analysis</a>. So, here are the steps I follow:</p>
  
  <ol>
  <li>Take time domain buffer x, make a windowed copy w.</li>
  <li>FTTw = FFT(w)</li>
  <li>a = Log of square magnitude of FTTw</li>
  <li>FTTa = FFT(a)</li>
  <li>b = square magnitude of FTTa</li>
  <li><strong>Estimate fundamental using b</strong></li>
  </ol>
  
  <p>I'm having trouble with the last step (6). The magnitudes in b are pretty high and I'm not sure I fully understand what they represent (quefrencies?) and most of all how can I estimate the fundamental based on them.</p>
  
  <p>Any advice is welcome! Thanks!</p>