# Examples · zvuk

zvuk v1.14.1 · MIT · https://zvuk.schmooky.dev/examples/

Deployable demos. Each one shows one cluster of the engine that's hard to explain in isolation.

Examples

# 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.

Snapshot blend

live

A slider drives a tension Parameter, and engine.blendSnapshots(calm, combat, t) interpolates two captured mix shapes every frame.

[run live →](/examples/snapshot-blend/) [source on github ↗](https://github.com/schmooky/zvuk/tree/main/examples/snapshot-blend)

Slot machine

Streaming music, sidechain ducking under big wins, loudness normalize on load.

live version coming soon [source on github ↗](https://github.com/schmooky/zvuk/tree/main/examples/slot-machine)

Match-3 cascade

Concurrency limits and voice stealing as cascades stack. Watch the live voice count climb and then hold.

live version coming soon [source on github ↗](https://github.com/schmooky/zvuk/tree/main/examples/match-3)

FPS footsteps

Spatializer (3D) live-steered from pointer position via voice.spatializer.setPosition.

live version coming soon [source on github ↗](https://github.com/schmooky/zvuk/tree/main/examples/fps-footsteps)

Rhythm metronome

engine.scheduleAt for tightly-scheduled clicks plus live bus.meter() + voice.level() driving a VU meter.

live version coming soon [source on github ↗](https://github.com/schmooky/zvuk/tree/main/examples/rhythm-metronome)

Music stinger → loop → tail

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.

live version coming soon [source on github ↗](https://github.com/schmooky/zvuk/tree/main/examples/music-stinger-loop-tail)

## 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/
```
