mwg API
    Preparing search index...

    Function midiLoopStart

    • Seconds from the start of playback at which the file loops (its controller-111 marker through the file's own tempo map), or null when the file carries no marker and loops from the start instead.

      Parameters

      Returns number | null

      import { parseMidi, midiLoopStart } from '@datamoc/mwg/audio';

      declare const midiBytes: ArrayBuffer;

      const file = parseMidi(midiBytes);
      console.log(midiLoopStart(file)); // seconds, or null with no loop marker