Examples
Deployable demos. Each one shows one cluster of the engine that's hard to explain in isolation.
Each example is a zero-build app (an index.html plus a small
TypeScript module) sitting under examples/ in the repo.
Where a live, playable version is hosted on this docs site, it's marked
live.
The full vanilla source is on GitHub.
A slider drives a tension Parameter, and engine.blendSnapshots(calm, combat, t) interpolates two captured mix shapes every frame.
Streaming music, sidechain ducking under big wins, loudness normalize on load.
Concurrency limits and voice stealing as cascades stack. Watch the live voice count climb and then hold.
Spatializer (3D) live-steered from pointer position via voice.spatializer.setPosition.
engine.scheduleAt for tightly-scheduled clicks plus live bus.meter() + voice.level() driving a VU meter.
engine.loadMusic({ intro, loop, outro }). The stinger plays once, the loop body runs until told otherwise, and the outro fires at the next loop boundary so the track ends on the beat.
Running locally
Examples import the workspace zvuk package straight from
src/index.ts, and reference the same audio assets the docs
site ships at docs/public/audio/. Serve from the repo root
with any static server:
npx serve .
# then open http://localhost:3000/examples/snapshot-blend/