libmidi.types.track
MIDI track.
Classes
|
Class representing a MIDI track. |
- class libmidi.types.track.Track(events: Optional[List[Event]] = None)
Class representing a MIDI track.
A MIDI track is a sequence of MIDI events. It starts with a header chunk and ends with a end of track meta message.
- HEADER = b'MTrk'
- to_bytes() bytes
Write a track to bytes.
- to_stream(stream: BufferedReader) int
Write a track to a stream.
Returns the number of bytes written.