@audio/pitch-cepstrum
v1.0.1
Published
Cepstrum pitch detection (Noll, 1967)
Readme
@audio/pitch-cepstrum

Cepstrum pitch detection (Noll, 1967)
npm install @audio/pitch-cepstrumimport cepstrum from '@audio/pitch-cepstrum'Noll, 1967. Real cepstrum — $c(\tau) = \text{IFFT}(\log |\text{FFT}(x)|)$. A peak at quefrency $\tau$ corresponds to period $\tau$ in the time domain.
let result = cepstrum(samples, { fs: 44100 })| Param | Default | |
|---|---|---|
| fs | 44100 | Sample rate (Hz) |
| minFreq | 50 | Minimum detectable frequency (Hz) |
| maxFreq | 2000 | Maximum detectable frequency (Hz) |
| threshold | 0.3 | Minimum clarity to accept |
Use when: Harmonic signals where you want a clean spectral-domain method. Good pedagogical complement to time-domain algorithms. Not for: Low-pitched signals (quefrency resolution is limited by window length). Ref: Noll, "Cepstrum pitch determination", JASA 1967. Requires: Power-of-2 window length — throws otherwise.
Part of @audio/pitch — the pitch family umbrella. This README is generated from the umbrella docs.
MIT © audiojs
