Chapter 6 of 10

Instruments — audio & MIDI

Companion lab · Read full chapter in the guide →

Stack MIDI → envelope → oscillator → filter → master gain inside renderDevice(), then wax.render.

In this lab you will

Minimal pattern

const osc = wax.blepsaw(wax.latch(trigger, frequency));
const tone = wax.mul(ampEnv, wax.mul(velocity, osc));
const out = wax.mul(wax.const({ key: "master", value: master }), tone);
wax.render(out, out);

Try it

Poly synth demo

Example code
Loading…