audioinstruments.panel_view
The control panel for an instrument: one file, laid out from the shared controls.
build(instrument, screen=..., ...) puts the panel on a screen for an
instrument from audioinstruments.create(), or for a PanelAdapter
already wrapped. Sixteen encoders with LED rings on the right, sixteen
patch pads in eight banks on the left, a dot-matrix display, and the
FINE, BYPASS, RELOAD and EXIT buttons.
The controls come from controls (apps/lib/controlkit) and LVGL, imported
here inside a guard: without them this module still loads, and build()
raises ImportError. A host with its own control surface never needs them.
- audioinstruments.panel_view.SHOW_MS = 1500
How long the display shows a value after the last turn, in milliseconds.
- class audioinstruments.panel_view.Panel(adapter, screen=None, group=None, theme=None, title=None, subtitle=None, on_close=None, two_wheels=False)[source]
Bases:
objectThe built panel, and the few things that update it.
adapter is what it edits. screen is the object to build on (the active screen by default) and group the input group the encoders join (the default group). theme is a theme name or dict, title replaces the adapter’s name on the faceplate, subtitle the line under it, and on_close, when given, adds an EXIT button that calls it.
two_wheels is for a setup with a second wheel that moves focus between the controls (see
display_driver.set_wheel_mapping): the group stays in edit mode, so the other wheel always turns the control that has focus.