SuperCollider control panels for the MIDI Fighter Twister and Spectra, with synchronized hardware, GUI, control-bus, and OSC state.
midiFighterControllerPanel is designed to work with projectTemplate, gainStageDoctor, and reaperSessionBridge.
See the projectTemplate README for the complete installation, prototyping, performance, and recording workflow.
- SuperCollider: tested with version 3.13.0
- MIDI Fighter Twister, MIDI Fighter Spectra, or both
- Windows: Voicemeeter Virtual ASIO
- macOS: an aggregate device named
BlackHole + MixPre
twister+spectraControllerPanel.scd: startup fileguiControllerFunctions.scd: activation, labeling, display-range, and mapping helperstwisterSpectra_init.scd: controller state, control buses, LED colors, and panel configurationtwisterSpectra_layouts.scd: Twister and Spectra control layoutstwisterSpectra_panel.scd: prototype and performance window assemblytwisterSpectra_knobActions.scd: GUI knob behaviortwisterSpectra_midi.scd: MIDI responders and hardware LED feedback
In MIDI Fighter Utility:
- Configure each Twister encoder switch as Note Toggle
- Enable Momentary CC for the Spectra
- Disable Spark under Spectra animations
Connect the controllers before loading the panel.
For a direct standalone test, evaluate this block in a SuperCollider document before loading twister+spectraControllerPanel.scd. In a project based on projectTemplate, define ~controllerPanelInitialConfig in project_config.scd.
~controllerPanelInitialConfig = (
mode: \prototype,
controllers: \both,
twisterActive: [],
spectraActive: [],
spectraToggle: [],
spectraDeterministic: []
);
~controllerDir =
Platform.userHomeDir +/+ "midiFighterControllerPanel";
(~controllerDir
+/+ "twister+spectraControllerPanel.scd").load;controllers may be:
\twister\spectra\both
The startup file selects Voicemeeter Virtual ASIO on Windows and the BlackHole + MixPre aggregate device on macOS.
Prototype mode displays all controls and allows their activation state to be changed.
Physical knob turns and button presses pass through only while the corresponding GUI control is active.
Switch a running panel to prototype mode:
~setControllerPanelMode.(\prototype);Change the visible controllers:
~setControllerPanelControllers.(\twister);
~setControllerPanelControllers.(\spectra);
~setControllerPanelControllers.(\both);Performance mode displays only the configured active controls and prevents activation changes from the performance interface.
In the consuming project's configuration file, such as projectTemplate's project_config.scd, configure the initial performance state before loading the panel:
~controllerPanelInitialConfig = (
mode: \performance,
controllers: \both,
twisterActive: [0, 1],
spectraActive: [0, 1],
spectraToggle: [],
spectraDeterministic: [1]
);twisterActive and spectraActive use indices from 0 through 15.
spectraToggle lists buttons that alternate between explicit 1 and 0
states on successive presses. The GUI and hardware LED remain active while
the stored state is 1.
spectraDeterministic lists active Spectra buttons whose state remains active until completion is reported.
Switch a running panel to performance mode:
~setControllerPanelMode.(\performance);In projectTemplate, edit each source's twisterMap in project_init.scd; project_maps.scd applies those mappings. The following snippets show the controller helper interface directly.
~sourceMaps = [
(
name: \exampleSource,
map: [
(
knob: 0,
arg: \amp,
label: "amp",
min: 0.0,
max: 1.0
),
(
knob: 4,
arg: \rate,
label: "rate",
min: 0.1,
max: 12.0
)
]
)
];Apply the maps after the controller files have loaded:
~sourceMaps.do { |source, sourceIndex|
~applyTwisterMap.(
source[\map],
sourceIndex,
source[\name].asString
);
};The source index determines its controller column:
| Source index | Twister knobs | Spectra label |
|---|---|---|
| 0 | 0, 4, 8, 12 | 0 |
| 1 | 1, 5, 9, 13 | 1 |
| 2 | 2, 6, 10, 14 | 2 |
| 3 | 3, 7, 11, 15 | 3 |
Twister control buses contain normalized values from 0.0 to 1.0. Mapping min and max values change the GUI number-box display range without rescaling the control bus.
~enableAllTwisterStatus.();
~disableAllTwisterStatus.();
~enableSpectraStatus.(8);
~disableAllSpectraStatus.();
~completeSpectraButton.(1);Call ~completeSpectraButton from the project action or process-completion file, such as projectTemplate's project_actions.scd, when the work associated with a deterministic Spectra button has completed.
Call these helpers from the project's controller-map file, such as projectTemplate's project_maps.scd.
~applyTwisterMap.(list, sourceIndex, sourceName);
~labelTwisterColumn.(sourceIndex, "name");
~labelTwisterKnob.(knobIndex, "name");
~setTwisterDisplayRange.(knobIndex, min, max);Set the Spectra LED values in twisterSpectra_init.scd:
~spectraInactiveLED = 7;
~spectraActiveLED = 13;
~spectraPressedLED = 37;Active Spectra controls appear red while idle and yellow while active.
- Connect the configured controllers
- Load
twister+spectraControllerPanel.scd - Activate a Twister control in prototype mode
- Turn its physical encoder and confirm that the GUI and control bus respond
- Activate a Spectra control
- Press its physical pad and confirm that the GUI, OSC state, and hardware LED respond
- Switch between prototype and performance modes
- Confirm that performance mode displays only the configured active controls
- Active Twister controls send GUI updates, OSC
/knobControlmessages, and hardware LED feedback - Active Spectra controls send OSC
/buttonControlmessages and hardware LED feedback