Just some algorithmic UK Garage

Audio


Code

setbpm 138

d1 $ mask ("<[t_1s f_1 <t!2 f>] <t!2 f>!15 [t_1s f_1 t] t!7>")
	$ ukswing $ drumM "ukg" [
	sometimesBy 0.14 (off (-1/16) (id)) $ 
		"bd ~ [~bd] <~ [~ bd]>" # cut 1 |- note 5 # n 1
	,outside 6 (someCycles ((fast 2) . (un1) . (struct "t(3,8)")))
		"[~ sd]*2"
	,outside 4 (someCyclesBy 0.15 (struct "f")) $
		someCycles (scramble "[4|8]") $ 
		un1 $ "sd([<1 5> 5],16,[0 <0 2>/4])" 
		|- note 4  # hpf 1000 # lpf 15000 # rel 0.06 # pan "0.5_3 <0 1>" # coarse 4
	,inside 2 (someCyclesBy 0.23 (struct "f")) $
		"[~ hh oh:1 [hh:1|~|~]]*4" |* g (sinosc 0.95 1 0.3)
	,outside 2 (someCyclesBy 0.23 (struct "f")) $
		"hh*16" # n 3 # attack 0.03 |+ note 4 
		|* g (randosc 0.9 0.95) # pan (sinosc 0.3 0.55 0.75)
	,jux (|+ fshift 10) $ un1 $ degby 0.12 $ 
		"perc(3,8,[0_3 <1 0>])" # lpf 1500 # g 0.86 |+ note (irand 3)
] |+ note 5 |+ sh 0.2 |+ n "<0 2>/12"

d2 $ jux (0.5 ~>) $ loopAt 2 $ "shaker" # fshift 300 # squiz 3 # g 0.9

-- bass
d3 $ stutWith "2 1" (1/8) ((|- note 12) . (|* l 0.6))
	$ sometimes (off (-"[3|2]"/16) (sometimes (|+ note 7)))
	$ note ("<<0!8 <3 0>!4> 7>_1q ~"-2) # oc 3 # s "supersine" # shape 0.4 # cut 1
		# ar 0.02 0.3

-- organ stabs
d4 $ off 0.25 ((|+ note 12) . (deg) . (|* l 0.6) . (|* g 0.9) . (# pan rand))
	$ degby 0.13
	$ swingBy (1/7) 8 $ struct "t(5,16)"
	$ note ("<<0'min7'o!8 3'maj'o!4> 7'min'o>"-2) # oc 6 # s "percorg" # l 1.5 # begin 0.003
		# room 0.3 # size 0.7 # hpf 500 # g "<0.9 0>/48"

-- electric piano
d5 $ note ("<<0'min9'o!8 3'maj'o!4> 7'min7'o>"-2) # oc 5 # s "rhodes" # l 1 # coarse 11 # lpf 1500

-- vocal sample
d6 $ (striate 16 $ s "efred" # begin 0 # end 0.05) |+ note "[7|12]/12" # lpf 15000
	# g "[0|0.9]/3" # ar 0.01 0.1 # room 0.15 # pan (sinosc 0.3 0.7 0.25)

all $ (|- note "<0 5>/24") . (someCyclesBy "<0.12 0>" (degby "0_1s 0.52"))

Functions

let ar a r = attack a # release r
    oc = octave
    dist = distort
    g = gain
    l = legato
    sh = shape
    deg = degrade
    degby = degradeBy
    sinosc  min max frq = (fast frq $ range min max sine) 
    randosc min max = (range min max rand)
    un1 = mask "f@1s t"
    striateAt str at f = slow at $ striate str $ f
    ukswing = swingBy (1/5) 8

let setbpm bpm = setcps (bpm/60/4)
    setbpm' bpm m = setcps (bpm/60/m)

--drummachines
let drumMachine name ps = stack 
                    (map (\ x -> 
                        (# s (name ++| (extractS "s" (x)))) $ x
                        ) ps)
    drumFrom name drum = s (name ++| drum)
    drumM = drumMachine
    drumF = drumFrom

Note

I tried to make something that didn't really need human input. In the recording, my only performance was starting all the patterns and changing the speed to -1 on d5 at the end 'cause the idea came up to me mid-recording. Then some silences.

12 Likes

I absolutely love this. Great work.

Ok what's the ukswing function? :slight_smile:

1 Like

oh sorry I thought I included this definition
I'm not in my computer but I think it's

let ukswing = swingBy (1/5) 8

i defined it so I didn't have to worry about the swing amount I wanted while livecoding

1 Like

I really love it. I love how detailed and refined it is. Really nice drum programming, I love the vocals too. Good job on reproducing the feeling of this ukswing, it's the first time I hear that with Tidal!

Great stuff!

I do a lot of garage-inspired and swung beats as well, and have a similar shortcut for swing defined in one of my script files, but which takes a single argument for swing amount:

let swB a = swingBy a 8

8 is preset to ensure 16th note swing, but exposing the swing amount allows for some variation throughout the set.

2 Likes