Describe a song.
Get it in code.

Songcode turns a simple prompt into a song built out of code, with fully editable stems in our web DAW. There is no generative audio model (and there never will be).

Songcode uses AI to turn your prompt into playable code. There is no audio model (and there never will be).

Free with your own API key. We let new people in often. Have an invite? open songcode

Free with your own API key. what that means

after the last train 120 bpm00:00
odetitle "after the last train"tempo 120key c minorswing 55%form loop 4chords [Cm9 | Fm11 | % | Abmaj7 Gm7]let answer = line [r/4 c5/8 eb5 f5/4 eb5/8 c5 | bb4/4. g4/8 ab4/4 g4/4]stem kick: tight {  kick     [x... x... x... x...]  velocity [112 100 106 98]  decay    320ms  bar 4 of 4 {    kick [x... x... x... x.o.]  }}stem rim: tight {  rim      [.... x..x .... x... | .... x..x ..o. x..o]  velocity [96 70 90 64]  highpass 300hz  reverb   20%, tone: 4khz}stem hats: tight {  hat      [o.x. o.xo ..x. o.x. | o.x. ..xo o.x. ..xx]  velocity [92 44 70 52 86 40 64]  chance   92%  highpass 500hz  lowpass  9khz  bar 4 of 4 {    hat     [o.x. o.xo ..x. o...]    openhat [.... .... .... ..x.]  }}stem shaker: cabasa {  rhythm   [xxxx xxxx xxxx xxxx]  take     [0 2 1 3 2]  velocity [78 40 60 46 72 38 56]  chance   85%  highpass 900hz}stem bass: fmbass {  line     [held c2/4. g1/8' bb1/4 c2/8' eb2/8 | f1/4. c2/8' f1/4 ab1/8' c2/8 |            f1/4. eb2/8' c2/4 ab1/8' g1/8 | ab1/4. eb2/8' g1/4 bb1/8' b1/8]  velocity [108 72 90 76 84]  lowpass  sweep(450hz, 900hz, every: 4bars), resonance: 15%  release  120ms}stem keys: epiano {  rhythm   [x--- ---. ..x- ---- | --.. x--- .... ..x- |            ---- .... x--- .x-- | --.. x--- ..x- ----]  tones    [all]  octave   3  voicing  smooth  velocity [74 58 68 62]  highpass 220hz  chorus   35%, rate: 0.6hz  phaser   0.3hz, depth: 30%  reverb   35%, tone: 4.5khz  delay    18%, time: 3/16, feedback: 30%}stem pad: warmpad {  rhythm   [x]  tones    [all]  octave   3  voicing  wide  attack   600ms  release  1.8s  highpass 300hz  lowpass  sweep(1.2khz, 2.6khz, every: 4bars)  reverb   55%, decay: 5s, tone: 3.5khz}stem vibes: vibraphone {  line     [r/1 | r/1 | mp answer]  pedal    chord  highpass 250hz  reverb   35%, tone: 5khz  delay    22%, time: 3/16, feedback: 35%}mix {  kick    0db  rim     -10db, pan: 12L  hats    -11db, pan: 15R  shaker  -15db, pan: 25L  bass    -4db  keys    -8db, pan: 8L  pad     -16db  vibes   -11db, pan: 14R  duck bass, keys, pad under kick, depth: 55%, recover: 140ms  reverb decay: 2.2s, tone: 4.5khz  master ceiling: -1db}
ready

This is the whole track. Press play, change a number, press update.

There is no audio model.

Most generative music comes from a model trained on recordings, and it hands you audio. Songcode works the other way. A general-purpose language model, the kind that writes software, writes a short program. Your browser turns it into sound.

a model trained on recordings

Returns audio. You can play it.

songcode
stem kick: tight {  kick     [x... x... x... x...]  velocity [112 100 106 98]}stem shaker: cabasa {  rhythm   [xxxx xxxx xxxx xxxx]  take     [0 2 1 3 2]}

Returns music code. Immediately playable and editable in realtime.

We trained nothing

No dataset of songs, no fine-tune, no audio model of our own. We never trained on anyone's music.

The track is text

A loop is about a hundred lines. Every note and every filter setting is on the page, so you can edit it, diff it and keep it in git.

Sound is made in your browser

Synths, drum machines and effects run live in the page. No audio is rendered on a server.

A prompt goes in. Code comes out.

Write a prompt

Say what you want to hear. Pick a genre and a length.

Read the code

The model writes a song out of code. Every line works together to form a composition.

Change it while it plays

Edit a value and press update. The track keeps playing with your change.

Every part is a stem.

Switch from code to stems and the same song opens in our web DAW. This is the track from the top of the page. Mute a stem, solo one, or pick one to see the code that makes it.

after the last train 8 stems · 4 bars
stem bass: fmbass {  line     [held c2/4. g1/8' bb1/4 c2/8' eb2/8 | f1/4. c2/8' f1/4 ab1/8' c2/8 |            f1/4. eb2/8' c2/4 ab1/8' g1/8 | ab1/4. eb2/8' g1/4 bb1/8' b1/8]  velocity [108 72 90 76 84]  lowpass  sweep(450hz, 900hz, every: 4bars), resonance: 15%  release  120ms}

Mix it

Mute, solo, level and pan each stem. The mix is written into the code.

Edit the notes

A piano roll for pitched stems and a grid for drums. Draw, move and resize notes, and the code is rewritten to match.

Rewrite one stem

Ask for a different bassline and only the bass changes. It is written against the tempo, key and stems already there.

What you can do with a track.

60 genres

Eleven families, from techno and house to jazz, rock, ambient and solo piano. Each has its own tempo range and sounds.

Loop or full track

A seamless loop, or an arranged track of three to five minutes.

About thirty controls

Tempo, scale, drum kit, swing and more. Set what you care about. The model decides the rest.

Sounds of its own

24 drum kits, 53 instruments, six singers and nine ambience sounds built for Songcode, alongside recorded instruments from piano to electric guitar.

Source, WAV or MP3

Rendered in your browser, faster than real time. No audio is uploaded.

A link for every track

Publish a track to get a link. Anyone who opens it can play it, and anyone with a Songcode account can remix it.

Made for the tinkerers.

If you flash your own firmware onto a cheap synth, live-code, or would rather read the patch than trust the preset, Songcode is for you.

Free with your own key.

$0 a month

Bring an Anthropic or OpenAI key and Songcode charges nothing: no subscription and no fee per track. Your provider bills you for what the model uses, and we add nothing on top.

Or a plan coming soon

No key required. Songcode writes your tracks with models tuned for subscribers, from weekly usage, billed monthly.

see pricing

Get early access.

Songcode is in early access, and we let new people in often. Leave your email and we'll send your invite.

Write a track.

An account, a prompt and your own key are all it takes. Songcode is free.

open songcode