Chapter 4 of 10

Automation

Companion lab · Read full chapter in the guide →

Wire host parameters (cc1–cc32) and sliders to the same params so DAW automation and UI stay in sync.

In this lab you will

Minimal pattern

if (WaxNative.hasBridge()) {
  window.WAX._internal.receiveWaxNativeUpdate = hostUpdate;
  WaxNative.emitEvent("waxNativeRequestParamSync", {});
}
gainSlider.addEventListener("input", () => {
  if (hostCcFromHost) return;
  setParam("gain", Number(gainSlider.value));
  wax.midi.cc(1, Math.round(params.gain * 127));
});

Try it

Automation gain demo · host lanes in WAX

Example code
Loading…