Hi. I'm working on a program that captures a sound by a mic from a guitar, and then via Fourier, getting the main frequency, and using it to indentify the sound (A, B, C...). I do this getting the real part of the output of the FFT (Fourier Fast Transform), and then looking for the position of the array (x; the frequency) where the value is the max (y;the amplitude). The thing is, the value I get doesn't match with the frequency of the sound I'm playing on the guitar.

Am I missing something?

Thank you.