Wherein we mix it up for fun and profit.
Hz.Mix is a utility node used to combine and modify audio signals.
Hz.Mix supports two input ports. The first (required) can
be configured mono or stereo and the second (optional) port is
currently assumed mono.
Any number of input signals can be connected to each port. With no
connections to port1, we apply the mix op to Σ(input0) otherwise
the mix op is applied to the product of their sums: Σ(input0) * Σ(input1).
This optional sidechain input allows you to achieve effects like
Amplitude Modulation (enveloping)
and Ring Modulation.

Hz.Mix's webview GUI panel groups all Hz.Mix instances into a single
group and offers group-wide control over them: Mute All, Unmute All,
Toggle All.
Each invidividual subpanel supports these widgets / displays:
Gain knobPan knob, present when relevant ("1to2" and "2to1").Mute checkboxLevels display (in green)It only takes a few parameters to control Hz.Mix:
| Name | Description | Range |
|---|---|---|
| Gain | Signal Gain (in dB) | -20-20 (0) |
| Pan | Stereo Position | 0-1 (.5: center) |
| Mode | Op Mode | 0:Mute, 1:Normal, 2:Bypass |
| UpdateGUI | Periodically sent signal levels to GUI | true |
The effects of the Pan parameter depends on your network configuration.
| MixMode | Description | Config |
|---|---|---|
| 1 to 1 | Monophonic Gain, Pan Ignored | {cfg: "1to1"||"mono"} |
| 2 to 1 | Mixdown Gain, Pan used to weigh inputs | {cfg: "2to1"} |
| 1 to 2 | Stereo Gain, Pan used to position input | {cfg: "1to2"} |
| 2 to 2 | Stereo Gain, Pan Ignored * |
{cfg: "2to2"||"stereo"} |
* It should also be noted that Pan is a standard Note Expression and
may be implemented by polyphonic instruments to position individual
notes within the stereo field. This is why MixMode 2 to 2 currently
ignores Pan.
Here's an example stereo setup:
let mix = scene.NewAnode("Hz.Mix", {cfg: "stereo"});
let osc = scene.NewAnode("Hz.Osc", {cfg: "stereo"});
// Hz.Osc:UnisonSpread requires stereo
scene.Chain(osc, mix, scene.GetDAC());
To configure Hz.Mix for side-chaining:
scene.Chain(osc, mix); // osc -> mix's default input
scene.Chain([adsr,0,1], mix); // adsr out:0 -> mix's "sidechain" (input:1)
produces this graph:
