setcps 0.45

d1 -- beat
$ whenmod 16 12 (# silence)
$ superimpose (# s "kick:9")
$ s "b b . <~ b ~ b> ~. <~ ~ ~ b> ~ . ~"
-- $ s "[b b] ~ [~ ~ ~ ~] ~"
# s "bd"
# gain 0.95

d2
$ whenmod 16 12 (# silence)
$ s "~ <~ s?> [s s?] ~"
# s "sn"
# n (wchoose [(1,2), (1,3), (3,4), (1,5)])

d3 -- drumroll
$ whenmod 16 12 (# n 1)
$ s "d d . d d . d d . <[d <d d?>] [d*2 d*2]>"
# s "dr"
# gain 1.2

d4 -- main gauche
$ whenmod 16 15 (# gain "0 . 0 . [0 . 1] . 1")
-- $ whenmod 16 12 (# gain 0)
$ every 4 (superimpose ((|+ note "12")))
$ superimpose ((|+ note "5"))
$ every' 8 7 (|> note ("0 . 0 . ~ . 0 . ~ . 0 . [0 <-2 3>] . [0 <-2 3>] "))
$ every' 8 3 (# note 12) -- FIXME: le projet c'etait pas une mononote, plutot une variation
$ note "0 . 0 . 0 . 0 . 0 . 0 . [0 <-2 3>] . ~ "
|- note 12
# s "superpiano"
# velocity (slow 16 $ sine * 0.4 + 0.4)
# sustain 0.5

d5 -- main droite
$ whenmod 16 15 (# gain "0 0 1 1")
$ whenmod 16 12 (# silence)
$ whenmod 16 8 (# gain 1)
$ whenmod 16 7 (# gain 0.8)
$ whenmod 16 0 (# gain 0)
$ degrade
$ superimpose (|+ note 12)
$ (off (1/4) (|+ note "<[-3,<-6, 2>?] 0>") . (swing 3))
$ note "8*4"
# s "superpiano"
|+ note 12
# sustain 0.6
# velocity 1

d6
$ whenmod 16 8 (# gain 0.7)
$ sometimesBy (slow 64 $ sine * 0.9) (chop 4 . (# crush 5)) -- var chopped crush
$ sometimesBy "<0 <0 0 0 0.5>>" (0.125 ~>) -- variations retard
$ off 0.25 (|+ note "<-12 ~>")
$ note        "<0 <8 8 8 [8 7 [5 3] <7 8>]>>"
# s "superhoover"
# gain 0.6

d7 -- scratch!
$ whenmod 8 5 (# gain 1.2)
$ whenmod 8 0 (# gain 0)
$ sometimes (hurry 2)
$ sometimes (0.125 ~>)
$ sometimes (off 0.5 id)
$ s "[dr:3?,dr:4?]*<2 4 8 8>"
