Skip to content

API Reference


API Reference / Detector

Type Alias: Detector ​

ts
type Detector = "peaks" | "tempogram";

Defined in: core/types.ts:206

Tempo detector of the real-time analyzer.

  • peaks, the default: amplitude peaks after a lowpass. Connect it through getBiquadFilter.
  • tempogram: spectral flux across several bands, a sliding autocorrelation and a tempo prior. Connect the source straight to the analyzer: a lowpass removes the bands it listens to. It reads about twice a second, leaves threshold at 0, and gives count as a salience score used for ranking. bpmStable means the estimates agreed over time, and confidence is the normalised autocorrelation at the tempo.