DSPRelated.com
Forums

Reference implementation of pitch detection

Started by Elizabeth August 23, 2003
In article 3F4B5F4F.C0B1A262@abvolt.com, Vladimir Vassilevsky at
vlv@abvolt.com wrote on 08/26/2003 09:24:

> > > Elizabeth wrote: >> >> Could someone point me to a reference/example implementation of pitch >> detection? > > Just compute the normalized ACF of the signal. The maximum lag will give > you the pitch value. If the better accuracy is required, you may have to > oversample the signal and search the proximity of the previously > determined maximum.
BTW, depending on how both the autocorrelation function (i think that is what Vladimir means be "ACF) and the Average Squared Difference Function is summed (or integrated), in some cases you can show that the ACF and ASDF are mirror images of each other. one will max at exactly the place where the other will min. with finite limits, there are some cases where the ACF and ASDF will behave differently and, i think, the ASDF will behave just a little better. r b-j

Ronald, H., Nicholson, "Jr." wrote:
> > >Just compute the normalized ACF of the signal. The maximum lag will give > >you the pitch value. > > Won't an ACF, or LMS delay fit algorithm return false positives for > multiples of the fundamental wavelength? (e.g. one octave down from > the perceived pitch). How does one not return those values as the > detected pitch?
Normalized ACF rather then straight ACF is computed. Also, the typical practice is to apply some bias to the shorter lag results when searching of the NACF maximum. That helps to avoid subharmonic detection. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com