@audio/beat-detect
v1.0.3
Published
Full beat detection pipeline: onset detection → tempo estimation → beat grid
Downloads
1,013
Readme
@audio/beat-detect

Full beat detection pipeline: onset detection → tempo estimation → beat grid
npm install @audio/beat-detectimport detect from '@audio/beat-detect'Full pipeline: spectral flux onsets → comb-filter tempo → phase-aligned beat grid. Shares a single STFT pass across onset and tempo stages, so it costs only marginally more than either alone.
import { detect } from '@audio/beat'
let { bpm, confidence, beats, onsets } = detect(samples, { fs: 44100 })Returns { bpm, confidence, beats: Float64Array, onsets: Float64Array }.
Use when: Quick one-call solution — good enough for most applications.
Not for: Tempo changes or rubato — the grid is uniform. Use beatTrack for adaptive tracking.
Part of @audio/beat — the beat family umbrella. This README is generated from the umbrella docs.
MIT © audiojs
