mwg API
    Preparing search index...

    Function timedMidiMessages

    • Every channel message of a file (notes, program changes, controllers, pitch bend) as raw MIDI bytes at its playback time, in file order. The sampled renderer works from scheduleMidi's paired notes; a MidiSynth is driven by these instead, since a hardware-style synth wants the messages as they were written.

      Parameters

      Returns TimedMidiMessage[]

      import { timedMidiMessages, type MidiFile } from '@datamoc/mwg/audio';

      declare const file: MidiFile;

      console.log(timedMidiMessages(file)[0]?.status); // 0x90 for a first note-on, say