Chapter 9 of 10

Scopes

Companion lab · Read full chapter in the guide →

Tap audio with wax.scope, receive blocks via native events, draw on canvas in requestAnimationFrame.

In this lab you will

Minimal pattern

const out = wax.scope({ name: "main", size: 512, channels: 1 }, tone);
wax.render(out, out);

window.WAX._internal.receiveWaxNativeEvent = function (name, payload) {
  if (name === "scope") handleScopePayload(payload);
};

Try it

Scope visualizer demo

Example code
Loading…