This example groups a few small examples under on roof. Copy them into your workspace to explore implementation details.
This example shows how to use Mix to position individual notes in the stereo field.
This example shows that Hz.Mix
when configured as "2to2" or "stereo",
ignores the value of its Pan
parameter.
This example shows how to use Hz.Mix
to convert a stereo signal into
a mono signal. The Pan
parameter is used to weigh incoming channels
in the single output channel.
mix.adsr.js snippet
// Oscillator with built-in ADSR inactive to show side-chaining.
let id = `t${this.GetId()}`;
let scene = await Ascene.BeginFiber(this);
let osc = scene.NewAnode("Hz.Osc", {name:"osc", cfg: "mono"});
let adsr = scene.NewAnode("Hz.ADSR", {name:"adsr"});
let mix = scene.NewAnode("Hz.Mix", {name:"Mix", cfg: "1to2"});
scene.Chain(osc, mix, scene.GetDAC()); // clean
scene.Chain([adsr,0,1], mix); // connect adsr to mix's "sidechain"
await scene.Sync();
scene.VisualizeGraph();
osc.SetParam("/adsr/Active", 0); // deactivate osc's built-in ADSR