Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

OptionDescriptionDefault
gainSliderWidthWidth of each channel’s gain slider.22
gainSliderHeightHeight of each channel’s gain slider.180

Look and Feel

FunctionDraws
drawMixerChannelBackgroundA custom background drawn behind the channel strip, before its label and divider line.
drawMixerPanKnobThe pan knob.
drawMixerGainSliderThe vertical gain fader.
drawMixerPeakMeterThe channel’s peak meter.
drawMixerPurgeButtonThe Purge/Load button.
drawMixerOutputThe output routing combo box.
drawMixerMuteSoloButtonThe Mute and Solo buttons.
drawMixerGainValueThe gain-value readout below the fader.

Public API

FunctionDescriptionReturns
create(panelId: string, numChannels: int, processorId: string, options: JSON)Builds a full mixer UI with numChannels channel strips inside panelId.ScriptObject

Broadcasters

BroadcasterDescription
data.bcMuteIsolateFires 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.bcSoloIsolateFires 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

FunctionDescriptionReturns
addMuteSoloIsolateBroadcasters(panel: ScriptObject, muteButtons: Array, soloButtons: Array)Implements the Ctrl/Cmd-click isolate behaviour on the Mute and Solo buttons (see Overview).—