Midi Module¶
- class squishbox.midi.SquishBoxMidi[source]¶
Bases:
objectALSA sequencer wrapper for SquishBox
Automatically connects devices specified in midi_connections
Provides methods for querying ports, sending messages
Can wrap other device/synth ports for filtering MIDI messages
- ports(**kwargs)[source]¶
List all MIDI ports currently available on the system
- Parameters:
**kwargs (dict) – Options passed to alsa_midi.SequencerClient().list_ports()
- Returns:
A dictionary of ports keyed by port info string
- refresh()[source]¶
Enforce MIDI connection graph
Connects ports as described in CONFIG[“midi_connections”]
Removes all other connections
Funnels connections through wrappers for wrapped ports
- send(evt)[source]¶
Send a MIDI message triggered by a SquishBox button/control
- Parameters:
evt (alsa_midi.Event()) – the MIDI event to send
- class squishbox.midi.SquishBoxMidiWrapper(port)[source]¶
Bases:
objectA container for a hidden ALSA client with in/out ports