songcode

A track is a text file

A four minute track in two kilobytes, and what follows from that.

ideas3 min read

The reference track we wrote for songcode’s model prompt is called cold storage. It runs 128 bars at 132 bpm, which is 3 minutes 53 seconds. It has an intro, a build, a main section, a breakdown, a rise, a peak and an outro.

Its source is 1,872 bytes.

The same track as a 192 kbps MP3 is about 5.6 megabytes. As a 16-bit WAV it is about 41. The text is roughly 3,000 times smaller than the MP3, and it is the more complete version of the two, because the MP3 only tells you what the track sounds like. The text tells you how it is made.

A few things follow from a track being text.

You can read it

Nothing is hidden in a text file. Tempo is a number on line two. The arrangement is line three: section names and their lengths in bars. The bass is one named stem, and the filter that makes it move is a few characters inside it. If you want to know why the breakdown works, look for the stems that say .except('break').

How to read a track goes through one from top to bottom.

You can change it

With a rendered audio file, a change means a new render. On most AI music services that is another generation, another draw from the model, and often a different track than the one you were trying to fix.

With source, a change is a keystroke. Lower the tempo by six. Pull the hats down. Swap the 909 for an 808. The rest of the track stays exactly as it was, because you did not ask anything to guess.

You can compare versions

Text diffs. Two versions of a track differ by the lines you changed, and any diff tool will show you which. You can keep a track in a git repository and scroll back through how it got to where it is. Try that with final_v3_REAL.wav.

You can send it anywhere text goes

A songcode track fits in a chat message. It fits in an email, a gist, a comment thread, a sticky note if your handwriting is small. A saved track gets a link, and whoever opens the link gets the source along with the sound. It is not locked to us either: “open in strudel” hands the same track to the editor at strudel.cc, where it plays without songcode.

That changes what sharing means. Sending someone a recording says “listen to this.” Sending them source says “here, take it apart.”

It plays the same every time

The same code produces the same notes on every machine. That includes the parts that sound random. When a hi-hat pattern drops 15 percent of its hits, the choice of which hits is a function of time, so it drops the same ones on every playback.

A track is a description of music, and descriptions do not degrade. There is no generation loss, and no bitrate until the moment you export.

It is small enough to be free to keep

Two kilobytes costs nothing to store. A thousand tracks fit in the space of one phone photo. Nobody has to decide which drafts are worth keeping.

What you give up

A text file makes no sound until something plays it. songcode plays it in your browser, and renders a WAV or MP3 there, faster than real time, when you need a file for somewhere else.

The bigger cost is range. Text can only describe what the engine knows how to play: synths, drum machines, sampled instruments, effects. A recording can hold anything that ever made a sound, including a human voice. Source cannot, and we are plain about that.

For electronic music the trade is a good one. The genre was built on machines that are, underneath, a list of steps and a handful of settings. Text holds that without losing anything.

Describe a song.
Get it in code.

open songcode