**Search Spectral Audio Signal Processing**

Book Index | Global Index

**Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?**

## Fundamental Frequency Estimation from Sinusoidal Peaks

Sinusoidal peak measurement was discussed in Chapter 4.
Given a set of sinusoidal peak frequencies ,
, it
is usually straightforward to form a *fundamental frequency*
estimate ``''. This task is also called *pitch detection*,
where the perceived ``pitch'' of the audio signal is assumed to
coincide well enough with its fundamental frequency. We assume here that
the signal is *periodic*, so that all of its sinusoidal
components are *harmonics* of the fundamental frequency .
(For inharmonic sounds, the perceived pitch, if any, can be complex to
predict [54].)

An approximate maximum-likelihood -detection
algorithm^{10.1} consists
of the following steps:

- Find the peak of the
*histogram* of the peak-frequency-differences
in order to find the most common harmonic spacing. This is the nominal
pitch estimate.
- Refine the nominal pitch estimate using
*linear regression*. Linear
regression simply fits a straight line through the data to
give a least-squares fit.
- The slope of the fitted line gives the pitch estimate.

A matlab listing for F0 estimation along these lines appears in §G.6.

**Subsections**

**Previous:** Applications of the STFT**Next:** Useful Preprocessing

**About the Author: ** Julius Orion Smith III
Julius Smith's background is in electrical engineering (BS Rice 1975, PhD Stanford 1983). He is presently Professor of Music and Associate Professor (by courtesy) of Electrical Engineering at

Stanford's Center for Computer Research in Music and Acoustics (CCRMA), teaching courses and pursuing research related to signal processing applied to music and audio systems. See

http://ccrma.stanford.edu/~jos/ for details.