Skip to main content
Jamuary 2026

12. Coding With Bernie

Embed Embed
Coding With Bernie
4:04

Coding With Bernie

I gave Tidal Cycles another shot today and came up with something fun. I worked through half of the reference guide and learned about transitions -- xfade and xfadeIn solve lots of problems for me -- and about the randomizing elements of mini-notation. I coded up a jam using the chord progression on the ace of hearts ("Flightless Dragon"), and yeah, a lot of this sounds like New Order. That's definitely not a bad thing in my book!

Here's the source for the jam:

do
  resetCycles
  d1 $ s "bd:2 ~ bd*2 ~ , [~ sd:1]!2"

xfade 1 $ s "bd:2 ~ bd*2 ~ , [~ sd:1]!2"
xfade 1 $ s "bd:2 [~ bd:2] bd ~ , [~ sd:1]!2"
xfade 1 $ s "bd:2 [~ bd:2] bd ~ , [~ sd:1]!2 , ~!3 [cp:1|cp:4]?"
xfade 1 $ s "bd:2 [~ [<bd:2 bd:2*2>]] bd ~ , [~ sd:1]!2 , ~!3 [cp:1|cp:4]?"
d1 $ silence

d2 $ sound "supermandolin*8" # n "d" # cutoff 1000
xfadeIn 2 2 $ sound "supermandolin*8" # n "d4" # cutoff 1000
xfadeIn 2 2 $ sound "supermandolin*8" # n "d" # cutoff 4000
xfadeIn 2 4 $ sound "supermandolin*16" # cutoff 16000 # n "<[d d] d [f g] c>/2"
xfadeIn 2 4 $ sound "supermandolin*16" # n (arp "up" "<[d'maj d'maj7] d'min7 [f'maj g'maj] c'maj>/2") # cutoff 10000
d2 $ silence

d3 $ n "<[d'maj'o d'maj7'o] d'min7'o [f'maj'o g'maj'o] c'maj'o>/2" # sound "superpiano" # gain "0.8"
d3 $ rolled $ n "<[d'maj'o d'maj7'o] d'min7'o [f'maj'o g'maj'o] c'maj'o>/2" # sound "superpiano" # gain "0.8"
d3 silence

d4 $ sound "superpwm*4" # n "<[d3 d3] d3 [f3 g3] c3>/2" # gain "0.6"
xfade 4 $ sound "superpwm*4"  # n "<[d3 d3] d3 [f3 g3] c3>/2" # rate "0.5"  # gain "0.6"
d4 silence

hush
/