Real-Time Human Pitch Detection I'm trying to implement a singing game that will analise raw mic input and tell the player how good is he singing. That needs to be done in real-time. 

I've come across a lot of threads asking the same question but I'm still quite not done with it, probably due to my lack of experience in the field and shallow math background. I've implemented an algorithm based on the DSPDimension website pitch shift's article: http://www.dspdimension.com/admin/pitch-shifting-using-the-ft/ 

I extract the true frequency and magnitude just like the article explains, but I don't know find the fundamental frequency with this. I've tried to get the bin with greatest magnitude but that only give me right results for higher pitch signals, it doesn't matter which oversampling factor I use I still get bad data for low freq signals. Is this approach completely wrong or am I in the right track but just missing something?

Thanks in Advance,

EDIT: I forgot to mention that I'm only interested in the pitch class, so it is ok if the fundamental is missing but I have a strong overtone in the sample.

EDIT2: Thanks to everyone, I just finished a version of the algorithm that's working like a charm. The low pitch estimation problem was due to my input test. When I sung the note it matched correctly. Also, I'm considering all harmonics now, not just the highest peak.
I've tried to get the bin with greatest magnitude but that only give me right results for higher pitch signals, it doesn't matter which oversampling factor I use I still get bad data for low freq signals.


That's because the harmonics are larger than the fundamental.  Plot your spectrum and you'll see.  A better method to find the true fundamental is autocorrelation.  Then you're "sliding" the waveform past itself and finding delays at which the wave shape lines up with itself.

http://www.phon.ucl.ac.uk/courses/spsci/matlab/lect10.html

Do you really want them to sing the exact note, or is it ok if they sing an octave above or below depending on their voice register?