sim1.py simulation testbed

The sim1.py script is a testbed for building event-driven performance controllers with the kf Python library. The script and libraries are packaged as sim1.zip. The individual files can be browsed at sim1.py and kf.

A simulated winch system with GUI.

class sim1.ControlLogic[source]

Core performance logic for processing MIDI input into winch commands.

channel_pressure(channel, pressure)[source]

Process a MIDI Channel Pressure event.

connect_display(display)[source]

Attach a console status output device to the performance logic.

connect_winches(winches)[source]

Attach a winch output device to the performance logic, either physical or simulated.

control_change(channel, cc, value)[source]

Process a MIDI Control Change event.

note_off(channel, key, velocity)[source]

Process a MIDI Note Off event.

note_on(channel, key, velocity)[source]

Process a MIDI Note On event.

class sim1.MainApp[source]

Main application controller object holding any non-GUI related state.

class sim1.SimWindow[source]

A custom main window which provides all GUI controls. This generally follows a model-view-controller convention in which this window provides the views, passing events to the application controller via callbacks.

closeEvent(event)[source]

Qt callback received before windows closes.

connect_midi_listener(listener)[source]

Connect a MIDI input listener to the port configuration control.

connect_midi_processor(processor)[source]

Connect an object to receive synthetic MIDI events; the object is assumed to have MIDIProcessor methods.

connect_osc_listener(listener)[source]

Connect an OSC network listener to the port configuration control.

set_status(string)[source]

Update the status bar at the bottom of the display to show the provided string.