0
$\begingroup$

I am trying to find the given note in an audio file. It has been specifically told that each file contains only one note. So i directly took fft and found the corresponding frequency and then mapped it to corresponding note.Out of my test cases some are giving the correct answer, but some are not.

$\endgroup$
  • $\begingroup$ try searching for "pitch detection" on this site. If I interpret your question correctly, it has been asked a lot of times on here. $\endgroup$ – Marcus Müller Nov 12 '18 at 21:26
  • $\begingroup$ I would second Marcus' suggestion regarding Pitch Detection but also, would it be possible to edit your question and add some plots that are descriptive of your situation? Maybe, some plots where your current approach gets it right and others that it gets it wrong. If possible, please try to post some spectrograms $\endgroup$ – A_A Nov 13 '18 at 8:47
1
$\begingroup$

The pitch of a musical note is very often not the same thing as the frequency peak in an FFT magnitude computation.

This is due to all the overtones and harmonics within interesting musical sounds, as opposed to single pure (and boring sounding) sinewaves. Please investigate pitch detection/estimation algorithms that do more than look for a bare FFT magnitude peak. A little reading on human psychoacoustics, pitch perception, audiology, and the physics of musical instruments might also help.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.