Welcome to midi’s documentation!¶
Events¶
This documentation covers the MIDI event objects supported by MIDISnake
-
class
NoteOn
(data: int) → None¶ MIDI NoteOn event
Notes
Subclasses the
midisnake.structure.Event
metaclass-
event_name
¶ str – Name of Event
-
indicator_byte
¶ int – Byte that indicates the MIDI Event type
-
note_number
¶ int – MIDI note number, between 0 and 127
-
note_name
¶ str – Musical note name, as returned by
get_note_name()
-
note_velocity
¶ int – Volume, between 0 and 127
-
channel_number
¶ int – MIDI Channel number
-
raw_data
¶ int – Initial data from MIDI file
-
-
class
NoteOff
(data: int) → None¶ MIDI NoteOff event
Notes
Subclasses the
midisnake.structure.Event
metaclass-
event_name
¶ str – Name of Event
-
indicator_byte
¶ int – Byte that indicates the MIDI Event type
-
note_number
¶ int – MIDI note number, between 0 and 127
-
note_name
¶ str – Musical note name, as returned by
get_note_name()
-
note_velocity
¶ int – Volume, between 0 and 127
-
channel_number
¶ int – MIDI Channel number
-
raw_data
¶ int – Initial data from MIDI file
-
-
class
PolyphonicAftertouch
(data: int) → None¶ MIDI PolyPhonic Aftertouch
Notes
Subclasses the
midisnake.structure.Event
metaclass-
event_name
¶ str – Name of Event
-
indicator_byte
¶ int – Byte that indicates the MIDI Event type
-
pressure
¶ int – Polyphonic Pressure, between 0 and 127
-
channel_number
¶ int – MIDI Channel number
-
raw_data
¶ int – Initial data from MIDI file
-
-
class
PitchBend
(data: int) → None¶ MIDI Pitch Bend
Notes
Subclasses the
midisnake.structure.Event
metaclass-
event_name
¶ str – Name of Event
-
indicator_byte
¶ int – Byte that indicates the MIDI Event type
-
channel_number
¶ int – MIDI Channel number
-
bend_amount
¶ int – Amount of bend to apply
-
raw_data
¶ int – Initial data from MIDI file
-
Parser¶
This page contains the documentation for the modules file parser
-
class
Parser
(midi_file: _io.BufferedReader) → None¶
Structure¶
This documentation covers the internal representations of MIDI constructs, such as Headers, Events e.t.c.
-
class
Header
(data: typing.Union[_io.FileIO, _io.BufferedReader]) → None¶ Represents a MIDI file header
-
length
¶ int – length in bytes of the file, minus the length of the header
-
format
¶ int – Type of MIDI file, can be one of 0, 1 or 2. 0 and 1 are single file MIDI songs, 2 is comprised of multiple files
-
tpqn
¶ float – Ticks per quarter note
-
-
class
Event
(data: int) → None¶ Metaclass representing a MIDI Event. Subclasses must implement the
_process()
function-
event_name
¶ str – Name of event
-
indicator_byte
¶ int – Byte that indicates the MIDI Event type
-
raw_data
¶ int – Initial data from MIDI file
-