Skip to content

Instantly share code, notes, and snippets.

@bosslee
Created June 15, 2025 09:42
Show Gist options
  • Save bosslee/7e6911e705ef09769df26288510dd22a to your computer and use it in GitHub Desktop.
Save bosslee/7e6911e705ef09769df26288510dd22a to your computer and use it in GitHub Desktop.
discovered that you can make music with code // this is the site I use https://strudel.cc/
// "twinkline" @by goingonchain
// inspired by "coastline" by @eddyflux
samples('github:eddyflux/crate')
setcps(.75)
let chords = chord("<C F G C>/4").dict('ireal')
stack(
// DRUMS
stack(
s("bd").struct("<[x*<1 2> ~] x>"),
s("[rim, sd:<2 3>]").room(".2").gain(.7),
n("[0 <1 2>]*<2!3 4>").s("hh"),
s("rd:<1!3 2>*2").mask("<0 0 1 1>/16").gain(.5)
).bank('crate')
.mask("<[0 1] 1 1 1>/16".early(.5)),
// CHORDS - soft & dreamy
chords.offset(-1).voicing().s("gm_epiano1:1")
.phaser(2).room(.6).gain(.8),
// MELODY - hint of "Twinkle Twinkle"
n("[0 0 7 7 9 9 7]").set(chords).mode("root:g4")
.s("gm_acoustic_bass").gain(.9)
.rarely(ply("2")).clip(.7).delay(.2)
.shape(.2).phaser(3),
// AMBIENT TEXTURE
chords.n("[0 <3 2 <4 5>>]").voicing()
.anchor("E4").segment(4)
.room(.75).shape(.3).delay(.25)
.fm(sine.range(3,6).slow(6))
.lpf(sine.range(600,900).slow(7)).lpq(4)
.gain(perlin.range(.5, .8))
.mask("<0 1 1 0>/16")
)
.late("[0 .01]*4").late("[0 .01]*2").size(4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment