Skip to content

Allow Add System Exclusive Messages to Track #42

@tcdw

Description

@tcdw

On one of projects I am working on, I want to add MIDI system exclusive messages for my custom need; however, there are no way of adding that (at least officially).

After reading the source code, I found it's able to pass a object with toBytes function. So, I am using this workaround:

// add GM reset
track.addEvent({
    toBytes() {
        // Channel 1 (1 byte), message start (1 byte), message length (1 byte), message (5 bytes)
        return [0x00, 0xF0, 0x05, 0x7E, 0x7F, 0x09, 0x01, 0xF7];
    },
}); // add `as any` before the right parentheses if you using TypeScript

It would be much appreciated to add this function officially, since sometimes MIDI sysex is still need to be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions