-- DNB Dansante!

setcps 0.75

d1
$ someCyclesBy 0.05 (# silence)
$ someCycles (fix (# s "snare:8") (s "sn:2"))
$ fix (# s "sn:2") (s "sn:1")
$ fix (# s "[bskick,kicklinn]") (s "bd")
$ s "bd? ~ sn:1 ~ ~ bd sn:1 <~ <~ <~ sn:1>>>"
# gain 0.9

d3 -- synthe fou
$ degradeBy 0.2
$ whenmod 16 8 (|+ note 7)
$ superimpose ((|+ note 5) . (# gain 0.7))
$ superimpose (|+ note 12)
$ note (scale "aeolian" "[0|12]*8")
|- note 24
# s "defaultB"
# gain (slow 64 $ cosine * 0.7 + 0.2)

d4 -- drumroll
$ rarely (off (1/16) id)
$ sometimesBy 0.05 (# n 1)
$ s "dr*8"
# gain (slow 16 $ sine * 0.3 + 0.7)

d7 -- dark background
$ s "arp(<1 1 3 3>,8)"
# gain 0.7

d6 -- lead
$ degradeBy 0.8
$ whenmod 4 2 (off 0.125 (|- "[12, 8]"))
$ superimpose (|+ note 5)
$ off 0.25 ((degrade) . (|- note 12))
$ note (scale "aeolian" "0 <~ ~ ~ 7> <7 ~> 5")
# s "superpiano"
# gain 0.8
# velocity (0.5 + rand / 4)

d7 -- guitar second
$ s "bsguitar:4/8"
# begin 0 # end 0.2
# cut 1
# gain 0.85

d5 -- continuous laser
$ someCyclesBy 0.6 (# silence)
$ whenmod 16 8 rev
$ (
  chop "<1 1 1 1 <2 4 [8|32] [2|32]>>"
$ s "bd" >| speed (segment 50 $ range 60 5 (saw))
) # pan sine
# gain 0.65

once $ s "bsgu"

d7 -- musical forks
$ degradeBy "<0 0.2 0.6 <0.8 0.2>>"
$ jux rev
$ off 0.125 ((|+ 5))
$ off 0.25 ((# room 0.5) . (|- 12))
$ superimpose ((0.25 ~>) . (|+ "<5 12>"))
$ superimpose (|+ note "< 5 3 2 0>")
$ s "f f f <f <f*2 ~>>"
# s "superfork"
# gain 0.65
# room 0.2
# size 0.6

d8 -- vibration montante!
$ superimpose (|+ note 5)
$ every' 4 "<0 1 2 3>" (someCycles rev)
$ sound "bd"
# note "<42 42 42 36>"
-- # note "<<28 21 14 7 0> <7 14 21 28 35 42 49 56 63 70>>"
>| speed (
  segment (wchoose [(50,0.1), (250,0.9)])
  $ range 1 3 saw
  )
# gain 0.5
# legato 2

d9 -- basse
$ whenmod 8 4 (|- note 2)
-- $ off 0.125 (degrade . (# room 0.2) . (# size 0.8))
$ superimpose ((# s "bass3:2") . (|+ note 7))
$ note "0 ~ <~ [0 0?]> ~"
|- note 14
# attack (0.5 + rand / 2)
# s "bassWarsaw"