@audio/pitch-mcleod
v1.0.1
Published
McLeod Pitch Method (McLeod & Wyvill, 2005)
Downloads
543
Readme
@audio/pitch-mcleod

McLeod Pitch Method (McLeod & Wyvill, 2005)
npm install @audio/pitch-mcleodimport mcleod from '@audio/pitch-mcleod'McLeod & Wyvill, 2005. Normalized square difference with smarter peak picking. Handles smaller windows — good for vibrato and fast pitch changes.
let result = mcleod(samples, { fs: 44100 })| Param | Default | |
|---|---|---|
| fs | 44100 | Sample rate (Hz) |
| threshold | 0.9 | Peak selection threshold as fraction of global max |
Use when: Vibrato tracking, small hop sizes, singing voice where YIN occasionally double-triggers. Not for: Highly noisy signals (NSDF is less thresholded than YIN's CMND). Ref: McLeod & Wyvill, "A smarter way to find pitch", ICMC 2005. Complexity: $O(N^2/4)$ — same asymptotic cost as YIN.
Part of @audio/pitch — the pitch family umbrella. This README is generated from the umbrella docs.
MIT © audiojs
