EX / Hz.Plugins / Hz.Mix

Right-click to copy examples to your workspace


Intro

This example groups a few small examples under on roof. Copy them into your workspace to explore implementation details.

Examples

mix.pan.js

This example shows how to use Mix to position individual notes in the stereo field.

mix.nopan.js

This example shows that Hz.Mix when configured as "2to2" or "stereo", ignores the value of its Pan parameter.

mix.mixdown.js

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

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

See Also

Reference: Hz.Mix, Hz.ADSR, Hz.Osc

home .. topics .. interface .. reference .. examples .. tipjar