Fork of a fork of jasmid MIDI file reader in TypeScript.
Jasmid.ts was originally created by pravdomil, but they have since removed it from their GitHub.
npm i @sightread/jasmid.ts
import { parseMidiFile } from "jasmid.ts"
const midi = parseMidiFile(arrayBuffer)
// midi has type:
// {
// header: { formatType: number; trackCount: number; ticksPerBeat: number };
// tracks: MidiEvent[][];
// }
See src/index.ts.