Rust · no audio crates · hand-written WAV

Waveforms built
sample by sample.

Reverb is an audio synthesis engine in Rust with oscillators, an ADSR envelope, mixing, and a hand-written WAV file writer. No audio crates, no shortcuts. Here is the real math, running in your browser.

View on GitHub How it works
440 Hz
0.05 s
0.10 s
0.70
0.20 s

What it does

A short pipeline turns a note name into raw audio samples, with nothing borrowed along the way.

1

Oscillators

Sine, square, sawtooth, and triangle waves at any frequency and sample rate, computed directly from phase.

2

ADSR envelope

Attack, decay, sustain, and release shape every note so it fades in and out instead of clicking.

3

Sequencing and mixing

Notes chain into a track, tracks mix together, and the result is normalized to stay in range.

4

WAV, by hand

A RIFF header, fmt chunk, and data chunk written byte by byte. No audio or WAV crates involved.

Render from the command line.

The same oscillator and envelope math you just heard, writing WAV files to disk.

# build the release binary
cargo build --release

# render a single tone
reverb tone --freq 440 --secs 2 -o out.wav

# render the built-in demo track
reverb demo -o demo.wav

cargo test