0
$\begingroup$

If a musician (or a vocal coach) hears a human voice at a certain note, he/she can easily find the same note on piano.

Not only for human voice, if the waveform is square, or created with a synth, they will be able to figure out which note it is.

However, using DFT (or FFT) gives mixed results for any waveform other than sinusoidal. It makes sense, because we use sinusoids as base functions (or base vectors).

Now, I want to learn if there is any way we can implement a signal processing algorithm in order to detect tones regardless of their waveform. Googling didn't help. Can you help me DSP SE?

$\endgroup$

2 Answers 2

3
$\begingroup$

What you are asking about is typically called "pitch detection". There are 100s of articles written on the topic. A good starter would be this one: https://ccrma.stanford.edu/~pdelac/154/m154paper.htm

If you need fairly high precision (for example a tuner application), I recommend a phase locked loop (PLL) or delay locked loop. There is a fundamental trade off between precision and tracking speed and with a PLL you can adjust this easily.

$\endgroup$
1
  • $\begingroup$ Make sure to read the part about this being a psychoacoustic property of humans. Some pitch detectors match human pitch perception better than others; some work best with some parameter tuning. Perceived pitch is not completely waveform independent. $\endgroup$
    – hotpaw2
    Commented May 27, 2021 at 1:37
0
$\begingroup$

Please check librosa which is really nice python library. It already has a bunch of algorithms implemented for pitch detection. Also instead of FFT try using CQT which reports spectral content of a signal but on a human friendly scale (octaves)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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