audio

@audio/mir-downbeat1.1.5

Downbeat estimation

Downbeat estimation — locate the bar-level "1" within a beat grid

Status
calibrated
Updated
Family
mir, 16 packages under it
Category
analysis
Licence
MIT
Dependencies
2 packages, all permissive: MIT
Downloads
2,138 last month
Tests
36 in audiojs/mir's CI, passed at ea0805d,

Downbeat estimation — scores each candidate bar phase by bass energy, onset strength and chroma flux summed over its beats; best phase wins.

npm install @audio/mir-downbeat

import downbeat from '@audio/mir-downbeat'

let r = downbeat(data, { beats, fs: 44100 })   // beats: number[] (s) from a beat tracker, e.g. @audio/beat
// { downbeats: number[], phase: number, meter: number, confidence: 0..1 }

Options: - beats — beat times in seconds (required, throws RangeError if omitted) · meter — beats per bar (default 4) · fs — sample rate (default 44100, Hz)

Also exported as an audio.js stat manifest (./audio).

Part of @audio/mir.