jdxi_editor.ui.windows.midi.controller_config
A window for setting up a hardware controller (an Arturia MiniLab 3 or similar) that drives the open synth editor’s filter, in the same shape as ElMo’s MIDI Control tab:
Connection — which ports the controller is heard on, and whether it is connected.
Monitor — every message arriving from it, so the CC number a knob sends can simply be read off.
Mappings — which CC drives which filter control, with Learn to take the number from the next knob that moves. Changes are saved to QSettings and applied to the running
FilterRemotestraight away, so a knob works the moment it is learnt.Transport — which buttons play, pause, stop, record, rewind and fast forward the MIDI File player. Learn adds the next button pressed (a note or a CC); an action can have several, e.g. the VMX8’s note and CC modes. Saved per controller, and picked up by the player straight away.
The CC numbers a MiniLab 3 sends depend on the program loaded on the device, so the built-in map is only a starting point; Learn is the reliable way to get them right.
Attributes
Classes
How the Mappings table shows one control. |
|
Set up the hardware controller that drives the filter. |
Module Contents
- jdxi_editor.ui.windows.midi.controller_config.AUTOMATIC_PORTS = 'All controller ports (automatic)'[source]
- class jdxi_editor.ui.windows.midi.controller_config.ControlLabelSpec[source]
How the Mappings table shows one control.
- Parameters:
control – FilterControl the control
label – str human-readable name
- jdxi_editor.ui.windows.midi.controller_config.CONTROL_SPECS: list[ControlLabelSpec][source]
- jdxi_editor.ui.windows.midi.controller_config.CONTROL_LABELS: Dict[jdxi_editor.midi.io.controller_map.FilterControl, str][source]
- jdxi_editor.ui.windows.midi.controller_config.TRANSPORT_LABELS: Dict[jdxi_editor.midi.io.controller_map.TransportAction, str][source]
- jdxi_editor.ui.windows.midi.controller_config.CONTROL_SOURCES: Dict[jdxi_editor.midi.io.controller_map.FilterControl, str][source]
- class jdxi_editor.ui.windows.midi.controller_config.MidiControllerDialog(external_controller=None, filter_remote=None, parent: PySide6.QtWidgets.QWidget | None = None)[source]
Bases:
PySide6.QtWidgets.QMainWindowSet up the hardware controller that drives the filter.
- cc_map: Dict[int, jdxi_editor.midi.io.controller_map.FilterControl][source]
- _learning: jdxi_editor.midi.io.controller_map.FilterControl | None = None[source]
- transport_specs: list[jdxi_editor.midi.io.controller_map.TransportSpec][source]
- _learning_transport: jdxi_editor.midi.io.controller_map.TransportAction | None = None[source]
- _connection_tab() PySide6.QtWidgets.QWidget[source]
The tab showing which ports are listened to.
- Returns:
QWidget
- _create_connection_tab_widgets() tuple[PySide6.QtWidgets.QGroupBox, PySide6.QtWidgets.QGroupBox, PySide6.QtWidgets.QWidget][source]
_create_connection_tab_widgets
- Returns:
tuple[QGroupBox, QWidget, QGroupBox]
- create_action_button_specs() list[picoui.specs.widgets.ButtonSpec][source]
create_action_button_specs
- _create_midi_controller_form(actions: PySide6.QtWidgets.QHBoxLayout | PySide6.QtWidgets.QVBoxLayout, connection: PySide6.QtWidgets.QGroupBox)[source]
- _monitor_tab() PySide6.QtWidgets.QWidget[source]
The tab logging what the controller sends.
- Returns:
QWidget
- _mappings_tab() PySide6.QtWidgets.QWidget[source]
The tab assigning a CC number to each filter control.
- Returns:
QWidget
- _transport_tab() PySide6.QtWidgets.QWidget[source]
The tab assigning controller buttons to the MIDI File player’s transport.
- Returns:
QWidget
- _build_transport_table() None[source]
One row per transport action, with its buttons, Learn and Clear.
- Returns:
None
- _transport_text(action: jdxi_editor.midi.io.controller_map.TransportAction) str[source]
The buttons that trigger
action, as shown in the table.- Parameters:
action – TransportAction
- Returns:
str e.g. “Note 94, CC 52”, or “not set”
- _source_text(control: jdxi_editor.midi.io.controller_map.FilterControl) str[source]
The hardware control that sends
controlby default, for the table.Taken from the profile’s
sourceentries inmidi_controllers.json; blank where the physical control is not known (as for the VMX8, whose map is translated, not measured).- Parameters:
control – FilterControl
- Returns:
str e.g. “Knob 1”, or “”
- connected_profile() jdxi_editor.midi.io.controller_map.ControllerProfile[source]
Profile of the controller plugged in, or the MiniLab 3 if none is.
- Returns:
ControllerProfile
- select_profile(profile_id: str | None) None[source]
Show and edit the mappings of another controller.
- Parameters:
profile_id – Optional[str] ControllerProfile id
- Returns:
None
- _is_live_profile() bool[source]
Whether the profile being edited is the one the running remote uses.
- Returns:
bool
- _cc_text(control: jdxi_editor.midi.io.controller_map.FilterControl) str[source]
The CC number assigned to
control, as shown in the table.- Parameters:
control – FilterControl
- Returns:
str
- cc_for(control: jdxi_editor.midi.io.controller_map.FilterControl) int | None[source]
The CC number mapped to
control.- Parameters:
control – FilterControl
- Returns:
Optional[int]
- refresh_ports() None[source]
Reload the list of MIDI input ports, keeping the current choice.
- Returns:
None
- connect_controller() None[source]
Listen to the chosen port, or find the controller’s ports automatically.
- Returns:
None
- update_status() None[source]
Show whether the controller is connected, and on which ports.
- Returns:
None
- information_text_update(available_ports: list[Any] | Any, ports: list[Any] | Any)[source]
information_text_update
- Parameters:
available_ports
ports
- Returns:
- _on_message(port_name: str, message: object) None[source]
Log a message from the controller, and use it if learning.
- Parameters:
port_name – str the port it arrived on
message – mido.Message
- Returns:
None
- _append_monitor_line(line: str) None[source]
Add a line to the monitor, dropping the oldest once it is full.
- Parameters:
line – str
- Returns:
None
- start_learn(control: jdxi_editor.midi.io.controller_map.FilterControl) None[source]
Take the next CC received as the mapping for
control.- Parameters:
control – FilterControl
- Returns:
None
- assign_cc(control: jdxi_editor.midi.io.controller_map.FilterControl, cc: int) None[source]
Map
cctocontrol, replacing any other control using it.A CC can only drive one thing, otherwise one knob would move two sliders at once.
- Parameters:
control – FilterControl
cc – int CC number 0-127
- Returns:
None
- apply_mappings() None[source]
Save the map and, if it is the connected controller’s, hand it to the running filter remote.
- Returns:
None
- static _spec_from_press(action: jdxi_editor.midi.io.controller_map.TransportAction, message: object) jdxi_editor.midi.io.controller_map.TransportSpec | None[source]
The transport button
messagepresses, bound toaction.- Parameters:
action – TransportAction
message – mido.Message
- Returns:
Optional[TransportSpec] None if
messageis not a button press (a release, or neither a note-on nor a CC)
- _show_transport_press(message: object) None[source]
Name the transport action a button press triggers, if any.
- Parameters:
message – mido.Message
- Returns:
None
- start_transport_learn(action: jdxi_editor.midi.io.controller_map.TransportAction) None[source]
Add the next button pressed as a trigger for
action.- Parameters:
action – TransportAction
- Returns:
None
- assign_transport(spec: jdxi_editor.midi.io.controller_map.TransportSpec) None[source]
Add
specto its action’s buttons, taking it from any other action.A button can only do one thing, so it is removed from the others.
- Parameters:
spec – TransportSpec
- Returns:
None
- clear_transport_action(action: jdxi_editor.midi.io.controller_map.TransportAction) None[source]
Remove every button bound to
action.- Parameters:
action – TransportAction
- Returns:
None
- reset_transport() None[source]
Go back to the selected controller’s built-in transport buttons.
- Returns:
None