MIDITrack¶
This class represents a single MIDI track.
Properties¶
name¶
The name of this track. Empty if the track has no name.
port¶
The MIDI port number used by the track.
channels¶
A Set that contains the MIDI channels used by this track in the sequence.
events¶
An array of MIDI Messages in this track, ascending by their tick time.
Methods¶
copyFrom (static)¶
Copies a track.
| TypeScript | |
|---|---|
- track - the track to create a copy of.
Note
This method is static.
copyFrom¶
Copies a track into this track.
| TypeScript | |
|---|---|
- track - the track to copy from.
addEvent¶
Adds an event to the track.
| TypeScript | |
|---|---|
- event - the
MIDIMessageto add. - index - the index at which to add this event.
Warning
This method is deprecated, please use addEvents instead!
addEvents¶
Adds events to the track.
| TypeScript | |
|---|---|
- index - the index at which to add these events.
- event - the
MIDIMessages to add.
deleteEvent¶
Removes an event from the track.
| TypeScript | |
|---|---|
- index - the index of the event to remove.
pushEvent¶
Appends an event to the end of the track.
| TypeScript | |
|---|---|
- event - the event to add.