audio

@audio/beat-track1.1.0

Dynamic programming beat tracker

Status
calibrated
Updated
Family
beat, 5 packages under it
Category
analysis
Licence
MIT
Dependencies
4 packages, all permissive: MIT
Downloads
12,026 last month
Tests
71 in audiojs/beat's CI, passed at ba1a223,
import beatTrack from '@audio/beat-track'

Dynamic programming beat tracker. Estimates tempo (via autocorrelation), then finds the globally optimal beat sequence by maximizing onset strength while penalizing tempo deviation. Each beat position is placed where the onset function is strongest, subject to staying near the expected tempo period.

import beatTrack from '@audio/beat-track'
let { beats, bpm, confidence } = beatTrack(samples, { fs: 44100 })
let result = beatTrack(samples, { fs: 44100, bpm: 120 })  // hint tempo
Param Default
bpm auto-estimated Target BPM (auto-estimated if omitted)
tightness 680 Tempo constraint weight (higher = stricter)
+ all tempo params fs, frameSize, hopSize, minBpm, maxBpm, candidates

Returns { beats: Float64Array, bpm, confidence }.

Use when: Irregular timing, live performance, rubato — adapts to where beats actually fall.
Not for: Perfectly metronomic material — detect is faster and sufficient.
Ref: Ellis, "Beat Tracking by Dynamic Programming" (JNMR 2007).


Part of @audio/beat — the beat family umbrella. This README is generated from the umbrella docs.

MIT © audiojs