songcodedocs open songcode

How Songcode works

The three parts of Songcode, what happens between a prompt and a sound, what runs where, and what Songcode does and does not have.

Songcode has no audio model. We trained nothing. A song is code: Songcode writes it, and your browser plays it with synths, drum machines and sampled instruments.

That one fact explains most of how the app behaves: why a track arrives as text, why you can read and edit it, why it plays the same every time, and why exporting takes a moment while the audio is made.

#The three parts

partwhat it iswhere to read more
Songcode StudioThe app where you make songs. Compose one from a prompt and Songcode writes it in ode, or write the ode yourself by hand. Then play it, edit the code or the stems, mix it, publish it and export it.Songcode Studio
odeThe language a song is written in: a short text file with a plan at the top, a stem for each instrument, an arrange table and a mix table.ode
the Songcode Audio EngineIt reads ode into a session, a stem per channel with the arrangement and the mix, and plays it as sound in your browser.Songcode Audio Engine

The Studio is where you make a song, ode is what the song is, and the engine is how it sounds. Anyone who writes ode is an odist. Songcode made the language, so it is the greatest odist of all.

#From prompt to sound

  1. You describe the track. The prompt, the genre, the length and any advanced settings you touched.
  2. Songcode writes the track in ode. On a plan it writes with its own tuned instructions. With your own key, it writes with the model you picked, at Anthropic or OpenAI. The song streams into the editor as it is written.
  3. The engine checks it. In your browser, the Songcode Audio Engine reads the song once without sound. Every stem has to read, name sounds that exist and play notes. If something fails, Songcode is asked once to fix it, with the exact errors.
  4. The engine plays it. It turns the song into sound as it plays, through a mixer with a strip per stem and a limiter on the output. From ode to sound follows that step in detail.

Nothing in that chain is a recording of the track. There is no audio file until you download one, and then your browser renders it on the spot.

#What the code is

A track is written in ode, Songcode’s own language for a song as text. A track has a plan at the top: the tempo, the key, the sections and the chords. Under it, stems say what each instrument plays, the arrange table says where in the track each one plays, and the mix table says how loud each one is. The language page covers the track as a whole and the rows and settings page covers what goes inside a stem.

Because the track is code, everything about it is in plain sight. The tempo is a number near the top. The chord progression is a line you can change. Each instrument is one named stem, which is what lets the stems view mute, redraw or regenerate one part without touching the others.

#Where the sounds come from

Three kinds of sound are in a track.

  • Synthesis. 4 drum kits with a full set of hits and 18 more kits, 53 instruments and 6 singers are built by the engine from oscillators, noise, filters and envelopes, computed live.
  • Recorded instruments. A recorded acoustic drum kit, a piano, mallets, hand percussion and most of a set of General MIDI instruments: short recordings of single notes and hits, served by Songcode.

The sounds page lists every one by name.

#What runs where

partwhere it runswhat it holds
The window, the editor, the stems viewyour browserthe track you are working on
The Songcode Audio Engine and the soundsyour browsernothing is streamed while a track plays
Your API keyyour browser’s storagesent with each generate request and passed to the provider, never stored by Songcode
The request to the modelSongcode’s server, then Anthropic or OpenAIthe prompt and settings; Songcode keeps them and the code that comes back to make Songcode better, as the privacy page says, never the key
Drafts and published tracksSongcode’s database, under your accounttitle, code, prompt, genre, model, settings
AccountsSongcode’s databaseyour email and a hash of your password

#The language model

Songcode uses the same general-purpose models people use for writing and programming. Which one writes your track is your choice in the composition quality row; see models.

Those models are made by Anthropic and OpenAI, and their makers are the ones to ask about how they were built. What Songcode can say is what it does itself: it trains no model, has no model of sound, and sends the model text and gets text back.

#What follows from this

  • A track is small. A full track is a few kilobytes of text, which is why drafts, publishing and sharing are instant.
  • A track is exact. The same code makes the same sound. Parts that use chance follow a seed stored in the track.
  • A track is editable at any depth. Change a word in the prompt, a setting, a stem, a note or a character of code.
  • Quality is bounded by the instruments, the brief and the model. Songcode makes electronic and beat-driven music best, since that is what synths and drum machines do. Its singers are synthesizers, and it cannot imitate a recording.
  • Generation needs a model. Without a key, or a plan when they arrive, the app plays and edits and does not write.
esc