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
- Sync on load with
receiveWaxNativeUpdate+ param sync request - Send slider moves with
setParamandwax.midi.cc - Receive live CC without echoing back (
hostCcFromHost)
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…