Skip to content

benaskins/musicbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

musicbox v0.1.0

Generative ambient audio written in Rust. Each run sounds different.

Layered pentatonic drones, resonant filter sweeps, Karplus-Strong plucks through BBD delay, and a Dattorro plate reverb.

Listen

cargo run --release

Or for the generative techno style:

cargo run --release -- techno

Ctrl+C to fade out and stop.

Render to file

cargo run --release -- --render 10m output.wav

Renders a 32-bit float stereo WAV. Duration examples: 10m, 1h30m, 90s, 5m30s.

What you'll hear

Drone (default)

  • Bass: Sine drones fading in and out across A minor pentatonic
  • Mids: Oscillator layers through a sweeping resonant low-pass filter
  • High-mids: Plucked notes through a BBD (bucket brigade) delay
  • Highs: Oscillators through a Dattorro plate reverb (ported from Mutable Instruments Clouds)
  • Master: Peak limiter, 3-second fade-in/out

Ambient Techno (techno)

  • Rhythm: TR-808-style kick, snare with ghost hits, open and closed hi-hats with swing
  • Harmony: Dub stabs (detuned saw/triangle chords through decaying filter) and a synth pad
  • Bass: Monophonic sawtooth with portamento, sequenced across A minor pentatonic
  • Texture: Sparse granular engine (shimmer highs + sub rumble) through plate reverb
  • Space: BBD delay on plucks, dub delay on clave, per-voice reverb throughout
  • Master: Peak limiter, 1-second fade-in/out

Run in the browser

cargo install wasm-pack
cd musicbox-web && ./build.sh
./bin/serve

Then open http://localhost:8080.

Requirements

  • Rust (stable)
  • An audio output device (for live playback)
  • Linux only: ALSA development headers — sudo apt-get install libasound2-dev
  • Web only: wasm-pack and Go (for the browser UI)

License

CC BY-SA 4.0 — Ben Askins, 2026

The Dattorro plate reverb is ported from Mutable Instruments Eurorack by Émilie Gillet, licensed under MIT.

About

Generative ambient music in Rust and WebAssembly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors