Sequencer
The sequencer backend is selected automatically based on your platform:
Linux: ALSA sequencer via SWIG wrapper
macOS: CoreMIDI sequencer via pure ctypes
Note
Sequencer classes are only available on their respective platforms.
Import midi.sequencer to get the platform-appropriate backend.
The sequencer API provides three main classes:
SequencerHardware— enumerate MIDI devicesSequencerWrite— send MIDI events to a deviceSequencerRead— receive MIDI events from a device