lesson

Updated 6 days ago ยท 1 view
Have you ever wondered how pitch-correction software can analyze a singer's voice and snap an off-key note into perfect tune in under twenty milliseconds?
It all starts with isolating a single repeating cycle inside a complex, vibrating vocal wave.
Fundamental Frequency (F0)
When you sing a steady note, your vocal folds vibrate periodically, producing a fundamental frequency (F0โ), which is the lowest repetition rate of the waveform that your ear perceives as musical pitch.
Even though your vocal tract adds rich overtones called harmonics (integer multiples of F0โ like 2F0โ,3F0โ,4F0โ), the overall composite wave still repeats every period (T), where F0โ=T1โ.
๐Interactive diagram
How does software actually extract this fundamental period T from thousands of digital audio samples per second?
Time-Domain Tracking: Autocorrelation and YIN
In 1943, mathematician Norbert Wiener popularized autocorrelation, a signal processing technique where you compare an audio segment against time-delayed copies of itself to find where the waveform aligns with its own shape.
For a discrete audio signal x[n], the autocorrelation function R(ฯ) measures similarity at a sample lag ฯ:
R(ฯ)=โn=0Nโ1โx[n]โ
x[n+ฯ]
When the lag ฯ equals exactly one period of the voice, the peaks and troughs multiply positively and produce a massive peak in R(ฯ), revealing the period in samples (T=ฯ) and allowing us to calculate F0โ=ฯSampleย Rateโ.
๐Interactive diagram
Standard autocorrelation frequently suffers from octave errors, mistakenly picking a prominent second harmonic peak instead of the true fundamental.