Theater MIDI Processing

Several scripts use the following module to translate a MIDI event stream into OSC messages. MIDI events may be received in real time or loaded from files for playback.

Please note that this is intended to be customized or subclassed for specific performances.

midi.py

MIDI event processing objects common to several scripts.

class theater.midi.MIDItoOSC(args)[source]

Manage translation of MIDI events into OSC messages for either the live MIDI stream processing or file playback.

close()[source]
perform_event(event)[source]

Interpret a mido MIDI event object and generate OSC messaging output.

perform_lighting_event(event)[source]
perform_motion_event(event, unit)[source]
theater.midi.decode_mpd218_key(key)[source]

Interpret a MPD218 pad event note value as a row, column, and bank position. Row 0 is the front/bottom row (Pads 1-4), row 3 is the back/top row (Pads 13-16). Column 0 is the left, column 3 is the right. Bank 0 is the A bank, bank 1 is the B bank, bank 2 is the C bank.

Parameters:

key – an integer MIDI note value

Returns:

(row, column, bank)