Strike a guitar string, sing a vowel, or blow across a bottle: what comes out is a periodic sound — a pressure wave that repeats the same shape over and over. That repeating chunk is the period , and its reciprocal is the fundamental frequency, the pitch you hear.
The question for an algorithm is: given a short burst of raw samples, what is ? This is pitch detection, and it sits at the heart of guitar tuners, voice assistants, autotune, and MIDI transcription.
The most intuitive approach is autocorrelation: slide a copy of the signal over itself, measure how well they line up at each delay , and look for the first strong peak after zero. When the lag equals the period , a periodic signal lines up with itself almost perfectly — that peak tells you the pitch.
The idea was formalized as the YIN algorithm by Alain de Cheveigné and Hideki Kawahara (2002), who added a clever normalization that suppresses the trivial peak at and makes the method robust to noise. YIN is still a standard baseline in audio processing today.
Comments
Loading comments...