mwg API
    Preparing search index...

    Function trackerPattern

    • A MIDI file as tracker pattern rows: stepsPerQuarter rows per quarter note, one column per channel that plays, and a cell naming the note that starts on that row (the highest when a channel starts several at once, as a tracker cell holds one). Steps are counted in the file's own ticks, and a row's time follows its tempo map.

      Parameters

      • file: MidiFile
      • stepsPerQuarter: number = 4

      Returns TrackerRow[]

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

      declare const file: MidiFile;

      const rows = trackerPattern(file);
      console.log(rows[0].notes); // the first step's notes by channel, or nulls