mwg API
    Preparing search index...

    Function splitSysex

    • The system-exclusive messages of a .syx file, in file order, each framed by its 0xF0 and 0xF7. Bytes before the first 0xF0 and an unterminated final message are not messages and are left out, because a bank file a player dropped is likelier truncated or padded than malicious, and the messages that are whole are still usable.

      Parameters

      • bytes: Uint8Array

      Returns Uint8Array<ArrayBufferLike>[]

      import { splitSysex } from '@datamoc/mwg/audio';

      const messages = splitSysex(new Uint8Array([0xf0, 0x41, 0xf7, 0xf0, 0x42, 0xf7]));
      console.log(messages.length); // 2