midi
#
- class platypush.backend.midi.MidiBackend(device_name=None, port_number=None, midi_throttle_time=None, *args, **kwargs)[source]#
Bases:
Backend
This backend will listen for events from a MIDI device and post a MidiMessageEvent whenever a new MIDI event happens.
Triggers:
platypush.message.event.midi.MidiMessageEvent
when a new MIDI event is received
Requires:
rtmidi (
pip install rtmidi
)
- __init__(device_name=None, port_number=None, midi_throttle_time=None, *args, **kwargs)[source]#
- Parameters:
device_name (str) – Name of the MIDI device. N.B. either device_name or port_number must be set. Use
platypush.plugins.midi.query_ports()
to get the available ports indices and namesport_number (int) – MIDI port number
midi_throttle_time (int) – If set, the MIDI events will be throttled - max one per selected time frame (in seconds). Set this parameter if you want to synchronize MIDI events with plugins that normally operate with a lower throughput.