@audio/ midi-parse
Status calibrated
npm1.0.3licenseMIT
Standard MIDI file parser — tracks, tempo map, note events
Overview
- Install
- Updated
- Family
- midi, 5 packages under it
- Tags
- read & write, make
SMF 0/1 reader: header, tracks, running status, variable-length deltas, tempo map (all set-tempo events applied across tracks), and a flattened note list with absolute seconds.
import parse from '@audio/midi-parse'
let { tracks, tempos, notes, duration } = parse(smfBytes)
parse(buf: ArrayBuffer|Uint8Array) → { format, division, tracks, tempos, notes, duration }
Each note: { time, duration, midi, velocity, channel, track } — time/duration in
seconds, velocity normalized 0..1. tempos: [{ tick, time, usPerBeat }].