How to find the dominant frequency of the sound signal?

I received a set of samples of the microphone signal. Now we need to find the frequency of the sound. How to do it? I understand that with the help of Fourier. But how?

Roughly speaking, I want to press a piano and that phone said the frequency of this note. Or guitar note extract, etc.
July 8th 19 at 16:33
2 answers
July 8th 19 at 16:35
In music the basic tone (frequency) sound, take the low-frequency (left) peak on the spectrogram.

In short, do the Fourier series, throw away the right half of the values, find the integrated module of the remaining values, from left to right it will move - the first maximum of your note in Hertz.
July 8th 19 at 16:37
Here is the library in Python, which has everything you need: sms tools

In addition to selecting the lowest peak need to make sure that this peak corresponds to a stable signal and not a local low frequency noise. If you sing, and someone put his foot down, or even if you pronounced the consonant "p" close to the microphone, the lowest frequency in the FFT will not match what you need to know. It's the principle of moments in solving this problem, but still, reinventing the wheel is not enough just to understand how it works.

Find more questions by tags AudioProcessing of signalsFourier transformation