Hear it
▶ The showcase site — recognizable classics rebuilt from scratch (retro-coin, the Nokia tune, THX-style deep note, a complete piano piece, a full band demo), plus game-ready BGM loops and ambient beds. Every one a deterministic render; no samples anywhere.
Why tono
- Sounds are data. A sound is a JSON synthesis graph; rendering it is a pure function → byte-identical audio, every run. Test it, diff it, cache it, ship no asset files.
- Zero-asset SFX. A patch renders infinite variations from gameplay parameters — impacts that scale with collision force, footsteps that vary by surface. No sample library.
- A real game runtime. Live DSP buses, polyphony caps with priority stealing, and adaptive music that reacts on the beat — section switches, intensity stems, stingers on the downbeat.
- An ear built in. Every render returns a spectrogram, a waveform, and LUFS/spectral stats — "does it sound right?" becomes numbers and pictures.
Quick start
# out/blip.wav out/blip.png (spectrogram)
# out/blip_wave.png out/blip.stats.json (peak/RMS/LUFS/spectral)
That loop — write a doc, render, read the images and stats, refine — is all a human or an agent needs to author sound by inspection. The cookbook has the full node vocabulary and recipes.
Where next? Pick your path:
- New here? docs/quickstart.md — the guided first ten minutes (hear a sound, change it on purpose).
- Make sounds — the cookbook, then
tono diff,tono match REF.wav DOC.json, andtono render --watchfor the loop. - Embed in a game — docs/runtime.md (Engine/Mixer runtime, parametric patches).
- Python — crates/tono-py.
- No code — the desktop pattern station (build it).
All guides: docs/README.md.
Recipes — the lazy answers
Copy-paste, runnable, no tour. (Each Rust one is also a compile-checked example in crates/tono-play/examples.)
Play notes live — a drum kit and a piano in one mix, driven from your code:
use ;
use ;
let sr = device_sample_rate?;
let mut mixer = new;
let drums = mixer.add;
let piano = mixer.add;
let speaker = open?;
speaker.control;
speaker.control;
speaker.control;
Write a song — the fluent builder, catalog instruments, one timeline:
use ;
let song = new
.add
.add
.add;
let doc = song.to_doc?; // an ordinary deterministic SoundDoc
Zero-asset SFX — one patch, endless variations from gameplay parameters:
use BTreeMap;
use Patch;
let patch: Patch = from_str?;
let hit = patch.render?; // mono samples, byte-identical per input
Adaptive game music — stems and section swaps on the beat:
use ;
let mut music = new;
music.set_tempo;
music.add_section;
let battle = music.add_section;
music.transition_to; // combat! — swaps on the next bar
music.set_intensity; // stems swell with the action
music.stinger_at; // lands on the downbeat
Python — the same engine, one import:
= # owns the stream + render thread
# kick
# zero WAVs
The Rust crates install from crates.io; the Python extension builds from source. More: embedding & patches · API docs.
One engine, five faces
Every face renders the same SoundDoc byte-identically:
- CLI —
cargo install tono— render to audio + spectrogram + stats. - Rust library —
cargo add tono-core— the engine embedded in a game or tool. - Python bindings — live engine + deterministic numpy renders; build from source.
- Pattern station — a Tauri studio: a step grid over catalog instruments, live audio, undo — build.
- Playground — hear Rust snippets through the speakers — examples.
The last two are developer faces that live in this repo — the architecture guide covers them and the rest of the codebase.
A personal note
Every line of code in tono was written by AI — my part was direction, and holding the project to the standards I use where I still write the code myself. If tono helps you as a tool, a reference, or a kick-start, that makes me genuinely happy: the tokens are already spent; the least they can do is be useful to you too.
⚠️ The 1.x series is AI-generated and not fully human-reviewed. Breaking changes may land in minor releases despite my best intentions — every removal is called out in the CHANGELOG. Use at your own risk.
License
MIT — permissive, no warranty.