libmidi.types.chunk
MIDI chunk.
Classes
|
Class representing a MIDI chunk. |
- class libmidi.types.chunk.Chunk(name: bytes, data: bytes)
Class representing a MIDI chunk.
A MIDI chunk is a sequence of bytes that starts with a 4-byte string, followed by a 32-bit integer representing the size of the following data.
- __init__(name: bytes, data: bytes)
Initialize a chunk.
- __str__() str
Return a string representation of the chunk.
- get_length() int
Return length of data.
- to_bytes() bytes
Return chunk as bytes.