IT lexicon › Programming › Pitch detection

Pitch detection

Programming På svenska → Updated: 2026-10-28

Working out which note is sounding, from a signal that has no intention of saying.

The naive approach counts zero crossings, which works for a sine wave and little else. Real methods look for periodicity: autocorrelation compares the signal with a shifted copy of itself and finds the shift at which they match best. The YIN algorithm from 2002 refined the idea and became a de facto standard. The hard part is octave errors — a note with strong overtones can look like its own octave, and a fundamental can be entirely missing from the signal yet still be heard.

Every tuner, Auto-Tune, Melodyne and pitch-to-MIDI converter rests on this. Polyphonic material, a strummed guitar chord say, is a far harder problem that only neural networks have seriously tackled.

← Back to the lexicon