/*
@title Speak and Spell 2
Change the word in say, then press update.
grit is the crush. chip is the speaker. bend is the pitch wobble.
*/
setcps(136/60/4)
samples('github:tidalcycles/dirt-samples')
const say = 'robot'
const letters = String(say)
.toLowerCase()
.replace(/[^a-z]/g, '')
.split('')
.map(c => c.charCodeAt(0) - 97)
const duck = "{1 0.5 0.78 0.58 1 0.5 0.82 0.6}*2"
const cut = slider(1800, 600, 4000)
const bassCut = slider(440, 160, 6000)
const space = slider(0.15, 0, 1)
const arpCut = slider(1600, 400, 8000)
const grit = slider(5, 1, 8, 1)
const chip = slider(6, 1, 12, 1)
const bend = slider(1, 0.9, 1.12)
const lift = "<0@12 1@4 0@12 1@4>"
const wash = "<0@16 1@8 0@8>"
const toy = x => x
.speed(bend)
.coarse(chip)
.crush(grit)
.hpf(280)
.lpf(cut)
.lpq(2)
.clip(1)
DRUMS: stack(
s("bd*4").bank("RolandTR909").gain(0.95),
s("~ cp ~ cp").bank("RolandTR909").gain(0.6),
s("hh*8").bank("RolandTR909").gain("{0.32 0.14}*4"),
s("~ ~ oh ~").bank("RolandTR909").gain(0.26),
s("rim ~ ~ rim").bank("RolandTR909").gain(0.12).mask(lift),
)
.postgain(0.9)
._punchcard({ height: 90, width: 640 })
CLICK: s("hh").bank("RolandTR909")
.struct("x ~")
.speed(1.8)
.hpf(2500)
.gain(0.18)
._punchcard({ height: 40, width: 640 })
BASSLINE: note("f#2@2 d2 a1 c#2".slow(4))
.struct("x - x - - x - - x - - x - - - -")
.sound("[sine, square]")
.attack(0.01).decay(0.26).sustain(0.3)
.release("<0.35 0.2>".fast(2))
.lpf(bassCut).lpq(5)
.gain(0.6)
.postgain(duck)
.o(2)
._punchcard({ height: 70, width: 640 })
CHORDS: note("<[f#3,a3,c#4] [d3,f#3,a3] [a3,c#4,e4] [c#3,e3,g#3]>".slow(2))
.sound("gm_pad_halo")
.attack(0.12).decay(1.4).sustain(0.4).release(1.2)
.lpf(sine.range(600, 1800).slow(8))
.room(space)
.gain(0.16)
.postgain(duck)
.o(2)
._punchcard({ height: 70, width: 640 })
MAIN_CHOP: toy(
s("alphabet").n(cat(...letters)).fast(2)
.speed("<1 1.06 0.94 1.03 0.97>")
)
.room(space)
.delay(0.18).delayfeedback(0.2)
.gain(0.95)
.o(2)
._punchcard({ height: 80, width: 640 })
._scope({ width: 640, height: 80 })
ANSWER: toy(s("speakspell").n("<0 4 5 6>").struct("~ ~ x ~"))
.room(space)
.gain(0.7)
.mask(lift)
.o(2)
._punchcard({ height: 70, width: 640 })
._scope({ width: 640, height: 60 })
BEEP: note("c6").sound("square")
.struct("~ ~ ~ x")
.decay(0.08).sustain(0)
.lpf(cut)
.gain(0.2)
.mask("<0@4 1>")
._punchcard({ height: 40, width: 640 })
ARP: note("<f#4 a4 c#5 e5 d5 c#5 a4 f#4>".fast(4))
.sound("square")
.decay(0.12).sustain(0)
.lpf(arpCut)
.room(space)
.gain(0.22)
.mask("<0@8 1@24>")
.o(2)
._punchcard({ height: 70, width: 640 })
WASH: toy(s("alphabet").n(cat(...letters)))
.room(0.4)
.gain(0.2)
.mask(wash)
.o(2)
._punchcard({ height: 60, width: 640 })
Deck B is empty
Load a second beat here, then bring it in with the crossfader or Mix.
Live-coded music · press play
Speak and Spell 2
136 bpm
The code is the score. It plays itself — you mix it.
Shared song
A song is code, and running it lets that code act as you on this site. The code is on the stage behind this message: read it, and run it only if you trust who sent it.
Sign in to play