audioJS

@audio/pitch-cepstrum

Status calibrated

npm1.0.2licenseMIT

Cepstrum pitch detection (Noll, 1967)

Overview

Install
Updated
Family
pitch, 8 packages under it
import cepstrum from '@audio/pitch-cepstrum'

Noll, 1967. Real cepstrum — c(τ)=IFFT(log⁡∣FFT(x)∣)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