MixerPanel
File: Rhapsodist/Widgets/MixerPanel.js · Namespace: MixerPanel.
Overview
Creates a complete mixer UI with channel strips: pan, gain, gain meter, gain-value readout, mute, solo, purge, and output routing. processorId, the Mixer.js module ID, is caller-supplied.
Each control’s parameterId is index-suffixed (Pan<i>, Gain<i>, Purge<i>, Mute<i>, Solo<i>, Output<i>), matching Mixer.js’s own per-channel parameter naming. The output routing combo box lists the stereo output pairs available on the root container’s routing matrix.
Mute and solo isolation
Ctrl/Cmd-clicking a channel’s Mute or Solo button isolates it: every other channel’s mute (or solo) is cleared and only the clicked channel stays engaged. A plain click just toggles that one button.
Usage
Build the module tree first: a Mixer.js instance plus one SimpleGain effect per channel.
This widget builds the UI only, bound via processorId/parameterId to Mixer.js’s script parameters. It doesn’t talk to the SimpleGain effects directly; that’s Mixer.js’s job.
const pnlMixer = MixerPanel.create("pnlMixerContainer", 3, "mixer", {})
Options
| Option | Description | Default |
|---|---|---|
gainSliderWidth | Width of each channel’s gain slider. | 22 |
gainSliderHeight | Height of each channel’s gain slider. | 180 |
Look and Feel
| Function | Draws |
|---|---|
drawMixerChannelBackground | A custom background drawn behind the channel strip, before its label and divider line. |
drawMixerPanKnob | The pan knob. |
drawMixerGainSlider | The vertical gain fader. |
drawMixerPeakMeter | The channel’s peak meter. |
drawMixerPurgeButton | The Purge/Load button. |
drawMixerOutput | The output routing combo box. |
drawMixerMuteSoloButton | The Mute and Solo buttons. |
drawMixerGainValue | The gain-value readout below the fader. |
Public API
| Function | Description | Returns |
|---|---|---|
create(panelId: string, numChannels: int, processorId: string, options: JSON) | Builds a full mixer UI with numChannels channel strips inside panelId. | ScriptObject |
Broadcasters
| Broadcaster | Description |
|---|---|
data.bcMuteIsolate | Fires when any channel’s Mute button changes value; on Ctrl/Cmd-click, enables the clicked button and disables every other channel’s Mute button. |
data.bcSoloIsolate | Fires when any channel’s Solo button changes value; on Ctrl/Cmd-click, enables the clicked button and disables every other channel’s Solo button. |
Internal Reference
| Function | Description | Returns |
|---|---|---|
addMuteSoloIsolateBroadcasters(panel: ScriptObject, muteButtons: Array, soloButtons: Array) | Implements the Ctrl/Cmd-click isolate behaviour on the Mute and Solo buttons (see Overview). | — |