-- Coogan, Leonard : Auglonf
-- First "song" with Tidal/SuperCollider!

-- 808 cowbell pattern
d1 $ n (slow 2 $ fmap (*7) $ run 8) 
	# s "808"
	# decay "[1 0.2]/4"
	# voice "[0.5 0]/8"
	# speed (sine + 0.8)

-- Chopped high-hats
d2
	$ chop "<32 128 32 16>"
	$ s "[~ hh]*8"

-- Kick
d3
	$ jux rev
	$ chop "<32 64 16>"
	$ s "[bd:4 bd:3]*2"
	# gain "0.95"

-- High tom
d4
	$ chop 16
	$ s "[ht]"
	-- # gain (sine + 1.0)

-- Bassline
d5
	$ jux (rev)
	$ chunk 4 (fast 2 . (|- n 12))
	$ off 0.25 (|+ 7)
	$ struct (iter 8 "f(5,8)")
	$ n (scale "hexPhyrgian" "0 .. 5")
	# s "bass3"
	# gain 0.8
	# rate 9
	# speed 2
	# octave 4
	# sustain 0.5
	# legato 2

-- Handclaps
d6
	-- $ jux (rev . (|*| speed 2)) $ every 3 (rev . chop 8)
	$ s "cp:1 cp:2"
	-- $ s "cp:1 cp:2(3,8, <0 2 3>)"
	-- # gain (sine + 0.8)


-- Jazz full
xfade "jz" $ s "jazz*8" # n (run 12) -- switch to 8

xfade "jz" $ s "hush" -- silencio!


-- Short awful synth
p "lead"
	$ s "psin"
	# n (sine + 10)
	# gain 0.7
	# octave 2

p "lead" $ s "hush" -- okei, now shut it up


-- Ambient synth
d7 $ n (arp "<down up converge>" "<a'7sus4'8>")
	# s "pad invaders pad pad"
	# octave 2
	-- # gain "0.8"
	# bpf (sine + 150)
	# sustain "<0.3 0.5>"
