MusicGen

Generative composer · browser native · offline

Music you can
regenerate.

One tap composes a finished-sounding track — harmony, melody, drums, mix and master. Every song is a pure function of six presets and a 12-character seed, so a link is a recording. No accounts. No server. No samples.

  • 11 styles
  • 10 moods
  • 7 synth engines
  • 0 network requests
live specimen loading…
take it into the studio →

Every note below was generated in your browser a moment ago.

01

Choose six dials

Style, mood, theme, tempo, song type and synthesis engine. Lock any of them and the randomiser will respect it.

02

It composes, not shuffles

An eleven-stage pipeline builds harmony from a Markov grid, voices it with a voice-leading solver, develops a motif across sections and masters the result.

03

Take it somewhere

WAV, per-track stems, Type-1 MIDI, cover art, or a seed link that reproduces the exact same song on someone else's phone.

Deterministic by construction

The composer contains no Math.random, no Date.now and no DOM. Same presets plus same seed produces a byte-identical song — asserted over a hundred runs in the test suite, not just claimed in a README.

compose(presets, seed) → Song

Real synthesis

Subtractive, FM, chiptune pulse, additive, wavetable, Karplus-Strong and noise — plus a drum kit built from oscillators and filtered noise. No audio files ship.

A theory validator, not a dice roll

Every note is checked against the key and the chord sounding under it. Random is sampled through a compatibility table, so it stays musical.

Loudness that holds

An ITU-R BS.1770 implementation runs in the app and in the tests. Exports are normalised to the style's target under a −1 dBTP ceiling.

Offline, honestly

The service worker precaches the whole shell and the app makes no runtime requests — no fonts, no analytics, no CDNs. Install it, switch off the network, keep composing.

caches: musicgen-v2 · fetch: cache-first · CSP: default-src 'self'

43 KB
gzipped, whole app
330/330
theory-validator cases pass
48
automated tests
5
export formats

It installs like an app and behaves like one.

Open the studio, then use your browser's Install or Add to Home Screen. iOS: Share → Add to Home Screen. From then on it launches offline, with its own icon, and keeps playing when you switch apps.

# or run it locally
git clone https://github.com/drsamonline/musicgen
cd musicgen/app
python3 -m http.server 8080
# → http://localhost:8080