Glue, as Code
Open-source song · Bicep, “Glue” (2017) · 130 BPM · F minor

Glue, as code.

The whole track is the fewer than 60 lines of text on this page. There are no recordings and no samples, not even for the drums. Press play and your browser builds every sound from the code: oscillators, noise, filters and envelopes. The highlighted characters are the ones playing right now.

Turn your volume up. Headphones help with the bass.
Fm9
bar 1 of 32 · beat 1

Tap a part's name to mute it. Watch the last line of the code change: muting is just editing the text.

The arrangement. Each row is a part, each column a bar. The intro, build, breakdown and drop come from the three mask lines in the code.

The source. This is the whole song.


      
      
    

Don't believe it? Change it.

Speed it up

Tap Edit, change setcpm(130/4) to setcpm(174/4), then Run. Now it's drum and bass.

Change the harmony

Swap Fm9 in the prog line for F^7. The pads, stabs and arp all follow, because they all read that one line.

Rewrite the beat

In the kick line, each ~ is a silent 16th note. Replace every ~ with c2 for four to the floor.

Take it anywhere

Open in Strudel puts the same text in the free online editor, where anyone can play it, change it and share it. Nothing to install.

How is this possible?

Strudel is a free, open-source live-coding language that runs in the browser. It's a JavaScript port of TidalCycles, which people use to perform electronic music live by typing.

Patterns in quotes are rhythms: "x ~ ~ x ~ ~ x ~" splits a bar into eight steps and plays on the x's. < > means one item per bar, which is how the four chords cycle. Everything after a dot shapes the sound: .lpf() is a low-pass filter, .room() is reverb, .delay() is an echo.

The drums are maths too. The kick is a sine wave whose pitch drops fast (penv). The hats are white noise through a high-pass filter. The clap is pink noise through a band-pass filter.