0
$\begingroup$

I currently want to create a small pitch detector and I have to say that I am very new in this topic of signal processing. At the moment I implemented the FFt algorithm and I got an array of window size (= 1024) out of it. But what should I do to define for example C4 or other music tones.

I know that FFT is not the best way to do pitch detection, but I think it is a good starting point to detect some single tones.

Is the best approach to sing the wanted tone than to find the peaks in this array and map that to the tone or do I need to do some other calculations first?

I hope you can help me out with some information.

Thank you and best wishes,

MusicMagician

EDIT: I know that here are many similar posts, but I want to understand what exactly the FFT does with my frequency and how I should work with that result. I think that for some guitar tuners the FFT is used to detect the pitch. So I wanted to start with that simple approach. I hope you can understand me.

$\endgroup$
  • $\begingroup$ there's really many posts on pitch detection on this site alone, and a wealth of information on the internet, so I think I'll have to very politely ask you to narrow down your approach a little further. $\endgroup$ – Marcus Müller Apr 28 '18 at 10:27
  • $\begingroup$ Yeah sry, for that similar posts. But since I am a beginner in working with frequencies it is really difficult for me to understand the result of the FFT and how should I map a music note to a frequency result of FFT :/ $\endgroup$ – MusicMagician Apr 28 '18 at 23:27
0
$\begingroup$

Musical tone or pitch is different from FFT magnitude peaks. A musical waveform is rarely a pure sinusoid, integer periodic in aperture.

Please, instead research pitch detection/estimation algorithms (several listed in wikipedia) that do a lot more than simply look at FFT results to determine the tone or pitch of the human singing voice.

$\endgroup$
0
$\begingroup$

My third blog article. "DFT Bin Value Formulas for Pure Real Tones", explains mathematically exactly how a pure tone behaves in a DFT. I also have followup articles on how to calculate the frequency, amplitude, and phase for a pure tone given the DFT values. Understanding these will take you a long way towards your objective.

But I told you this before. Maybe you'll read it this time.

Ced

$\endgroup$

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