do
-- resetCycles
setcps (140/60/4)
let gMask = (midiOn "^41" (mask "t . <f t f <f t>> <t f f <t f>>"))
let gMute = (midiOn "^73" (mask "f*16"))
let gMute2 = (midiOn "^74" (mask "f*16"))
let gMute3 = (midiOn "^75" (mask "f*16"))
let gM1 = gMask . gMute
let gM2 = gMask . gMute2
let gM3 = gMask . gMute3
d1 -- Kick premier`
  $ gF1 $ gM2
  -- $ midiOn "^42" (off "e" (# "jazz:0"))
  $ midiOff "^42" (<| "k . ~ k ~ ~ ")
  $ midiOn "^42"  (<| "k k k <k <[~ k] k*2>>")
  -- $ fix ((# att 0.5) . (# legato 0.5) . (|- note 6)) ("tek_kick:3")
  $ "[kick:4]"
  # room 0.2 # sz 0.8 # dry 1.1
  # gain 1.3
d2 $ gM1 $ gF1 -- Snare second
  -- $ fix (# lpf 4000) "snare"
  $ midiOff "^43" (mask "<t!16 f!16>")
  $ fix ((|* gain 1.1) . (|- note 2)) ("ab:11")
  $ "~ s ~ s*<1!3 2>"
  # "[<ab:10!3 ab:11>]" -- FIXME kick plus "on ne vit qu'une fois"
  # gain 1.4
d3 $ gM1 $ gF1
  $ midiOn "^76" (ply 2)
  -- $ midiOn "^44" (mask "t([16 <16 [32 64]>],64)" . chop 16 . ply 4)
  $ "dr*[8 [<8 <16 [16 <8 32> 16]>>]]"
  # "dr" # "h2ogmhh:2"
  # gain ((fast 8 $ range 0.85 0.95 perlin) + 0.4)
d4 $ gF2 $ gM3
  $ superimpose (
    (# crushbus 42 (range 16 0.85 "^53")) . (# cut 41)
    . (# hpf 500) . (# lpf 10000) -- Crush the high freqs only
  )
  $ midiOn "^89" (ply "8 <4 16>")
  $ slice 8 "<7 6>"
  $ "meth_bass:0"
  # cut 4
  # lpf 500 -- Keep the low freq from crush
  # octersubbus 41 (range 0 2 "^33")
  |- note 0.5
  # gain 1.1
  # room 0.3 # sz 0.5 # dry 0.9
d5 -- Melancolie solitaire
  $ midiOn "^58" ( superimpose (
    (+ note "12")
    . stut 4 0.9 "<e!12 q!4>"
    . (# pan 0.3)
    . (|* gain 0.8)
    . mask "t(1,8) t(1,8) t(1,8) t(1,8)")
    )
  $ slow 2
  $ note (
    -- Montee: "<a5 g5 f5 e5 f5 e5 d5 a4>"
    -- Descente: "<d5 e5 f5 g5 d5 e5 g5 a5>"
    (fast 4
      "<a5 g5 f5 e5 f5 e5 d5 a4 a5 g5 f5 e5 f5 e5 d5 a4 d5 e5 f5 g5 d5 e5 g5 a5 d5 e5 f5 g5 d5 e5 g5 a5>" - 12
    )
  +| "0(3,8) 0(3,8,<0!7 1>) 0(3,8) <0(3,8) 0>")
  -- |+ note 12
  # "FMRhodes1"
  # pan 0.7
  # tremrbus 51 (range 0 20 "^34")
  # tremdp 2
  # modIndex (range 0 8 "^54")
  # gain 1.4
  # room 0.2 # sz 0.3
d6 $ gF2 $ gM3
  -- $ slice 4 "0 1 2 3"
  $ whenmod 4 3 (|- note "0 <4 6>")
  $ slice 4 "2 <3!1 <1 1>>"
  $ "meth_bass:0"
  # cut 6
  # pan 0.8
  |* gain "0.85 1.1"
  # room 0.2
  # gain 0.9
  # octersubbus 61 (range 0 1 "^30")
-- TODO Make d7 the new d9 and another lead in d7
d7 $ gF3 $ gM3
  $ note ("<d g f a>" + "[0,7]" - 12)
  # "moogBass"
  # pan 0.3
  # gain 0.9
  # room 0.2
d8 $ gF1 $ gM1 -- BREAK THAT SHIT
  $ midiOn "^60" (slice 8 $ run 16)
  $ midiOn "^92" (ply "2 <2 <4 [4 8]>>")
  $ chop 8
  $ midiOn "^36" (loopAt 1 .  (# "jungle_breaks:72")) -- Sables mouvants
  $ midiOn "^56" (loopAt 1 . (# "jungle_breaks:19")) -- Break sable noir
  $ loopAt 2
  $ "jungle_breaks:22" -- Sable blanc
  # lpf 4000
  # gain 1.4
d9 $ note "<d4 e4 f4 <g4 a5>>" # "moog:1"
  # cut 9
