Chapter 3 of 9

Audio

Effects read the track or mic through wax.in({ channel }), process with graph nodes, and write outputs with render.

Typical FX graph

const mic = wax.in({ channel: 0 });
const out = wax.mul(
  wax.const({ key: "gain", value: 0.85 }),
  wax.svf(
    { mode: "lowpass" },
    wax.const({ key: "cutoff", value: cutoffHz }),
    wax.const({ key: "q", value: q }),
    mic,
  ),
);
wax.render(out, out);

Channels

Knobs & automation

wax.svf(
  { mode: "lowpass" },
  wax.const({ key: "cutoff", value: cutoffHz }),
  wax.const({ key: "q", value: q }),
  mic,
);

Keep stable key names; when a slider moves, update the JS variable and call renderGraph() again.

Browser preview

On a user gesture, call await wax.connectMic() (or connectInput(stream)) so wax.in hears input outside the plugin. In WAX these calls are no-ops — safe to call unconditionally in hybrid pages.

Try it

Full page: SVF lowpass demo

Example code

Snippets from this lesson — combine in your Custom Page.

Loading…