Pitch Detection Algorithm
Also known as: f0 detection, fundamental frequency tracking, monophonic pitch extraction
Pitch detection (or fundamental frequency estimation) is the task of automatically determining the perceived pitch of a monophonic (single-source) audio signal at each moment in time. Formalized by de Cheveigné and Kawahara (2002) through the YIN algorithm, it is foundational to music and speech processing. Pitch detection enables vocal analysis, music transcription, instrument tuning, and speech analysis. Monophonic pitch is unambiguous; polyphonic pitch detection is fundamentally harder and a distinct problem.
Key highlights
- Accurate on monophonic sources; state-of-the-art systems achieve cent-level error on clean audio.
- Fast and efficient; real-time pitch detection is practical.
- Works across diverse sources: instruments, voices, speech.
- Enables downstream tasks: transcription, vocal analysis, speech processing.
Intuition
This section is available to Pro members. Upgrade to Pro
How it works
This section is available to Pro members. Upgrade to Pro
When to use it
Use pitch detection for monophonic sources: solo singing, solo instruments, speech, bird songs. It works well on clean, isolated sources with clear periodicity. Avoid it for polyphonic music (multiple simultaneous sources), highly noise-corrupted audio, or sources with weak or missing fundamentals.
Strengths & limitations
- Accurate on monophonic sources; state-of-the-art systems achieve cent-level error on clean audio.
- Fast and efficient; real-time pitch detection is practical.
- Works across diverse sources: instruments, voices, speech.
- Enables downstream tasks: transcription, vocal analysis, speech processing.
- Fundamental frequency ambiguity: low-frequency sources may be perceived at 2x the fundamental.
- Octave errors: detecting f0 vs 2*f0 remains challenging on some sources.
- Noise sensitivity: audio quality significantly impacts accuracy.
- Polyphonic pitch detection is an open and much harder problem; standard monophonic algorithms fail on multiple simultaneous sources.
Common pitfalls
This section is available to Pro members. Upgrade to Pro
Applications
This section is available to Pro members. Upgrade to Pro
Frequently asked
What is the difference between pitch and frequency?
Frequency is a physical property (Hz). Pitch is the perceptual attribute. A note at 440 Hz sounds the same whether played by a piano or violin due to harmonic structure and timbre.
Why is octave error a problem in pitch detection?
An octave is a doubling of frequency (f0 vs 2*f0 sound like the same note at different heights). Some algorithms confuse the two; detecting f0 vs 2*f0 requires additional cues.
Can pitch detection work on polyphonic music?
Standard pitch detection cannot reliably handle polyphony. Polyphonic pitch detection is an open research problem requiring specialized models that can separate multiple f0s simultaneously.
How accurate must pitch detection be for practical use?
For music transcription, 50 cents error is acceptable (within a quarter-tone). For scientific analysis or tuning, 5–10 cents is expected. Tolerance depends on application.
Sources
- 1.de Cheveigné, A., & Kawahara, H. (2002). YIN, a fundamental frequency estimator for speech and music. The Journal of the Acoustical Society of America, 111(4), 1917-1930.
- 2.McLeod, P., & Wyvill, G. (2005). A smarter way to find pitch. In Proceedings of the International Computer Music Conference.
- 3.Mauch, M., Cannam, C., Bittner, R., Fazekas, G., Salamon, J., Wade, J., & Benetos, E. (2015). Computer-aided Research on Monophonic Singing. In Frontiers in Psychology.
You have read it. What now?
Cite this page
ScholarGate. (2026, June 3). Pitch Detection Algorithm. ScholarGate. https://scholargate.app/music-information-retrieval/pitch-detection-algorithm