resetCycles

do
  let fxSlowDegrade = (# waveloss 10)
  let fxPontHPF = (whenmod 64 48 (# djf (slow 16 $ range 0.2 0.8 cosine)))
  let dGlob = (fxPontHPF . fxSlowDegrade)
  -- let dGlob = (# djf 0.4)
  let dGlob = (id)
  let mMin = "<c'min!3 <f'min d'min>>"
  let mMajSm = "<c'min'4 c'min'2 c'maj'4 c'maj'2>"
  let mMajMd = "<c'min'3 f'min'3 c'maj'3 c'maj'3>"
  let mMajLg = "<c'min'8 c'min'7 c'maj'8 c'maj'6>"
  let melMin = [mMin, mMin, mMin, mMin]
  let melMed = [mMajSm, mMajSm, mMajMd, mMajSm]
  let melMaj = [mMajMd, mMajSm, mMajLg, mMajMd]
  let melEnd = [mMajLg, mMajLg, mMajLg, mMajLg]
  let melody = note (cat (melMin ++ melMed ++ melMaj ++ melEnd))
  let bCharge = "<2!3 3>(3,8)" -- Charge !
  let bAttente = "<0!4 1!4 2!4 3!4>"  -- Attente
  let bFull = "0 1 2 3" -- Fulltime
  let bEnd = "0 1 0 <3 0>" -- End of file
  let b1 = [bFull,bFull,bFull,bFull,bAttente,bAttente,bAttente,bAttente]
  let b2 = [bAttente,bFull,bAttente,bFull,bAttente,bFull,bFull,bFull]
  let b3 = [bCharge,bCharge,bCharge,bCharge,bFull,bEnd, bEnd, bEnd]
  let bLine = b1 ++ b2 ++ b3
  setcps 0.5
  solo 1 -- KICK 4
  solo 2 -- Claps
  unsolo 3 -- Hypno-Hats
  solo 4 -- LEAD BASSLINE
  unsolo 6 -- Riffs
  solo 9 -- Background hoover FIXME
  solo 10 -- Noise
  d1
    -- $ mask "<f!8 t!20>"
    $ whenmod 8 6 (# lpf "<2000 500>")
    $ dGlob
    $ superimpose (# "jazz:0")
    $ "k k k <k!3 [<k? ~> k]>"
    # "808bd"
    # n "[1,3]" # legato 0.8
    # gain 0.75
  d2
    -- $ mask "<f!4 t!26 f t>"
    -- $ dGlob
    $ fast 2
    $ "~ <c!3 c*2>"
    # note (slow 4 $ "<-5 -7>")
    # djf 0.8
    # legato "<0.4!3 0.8>"
    # "cp"
    # pan 0.3
    # gain 0.8
  d3
    $ degradeBy "<0.9 [0 0.75!3]!3 0!20 [0 0.5!2 0]!8>"
    $ whenmod 16 8 (juxBy 0.75 (degradeBy 0.25 . rev))
    $ often (off "e" id)
    $ dGlob
    $ s "hh*4"
    # room "<0.2!4 0.4!2 0.6 0.8>" # sz 0.5
    # dry (range 0.2 4 perlin)
    # pan (slow 8 $ sine)
    # legato "<[q|e|s]!3 [h|q|e]>"
    # cut 3
    # gain (slow 2 $ range 0.65 0.8 perlin)
  d4
    $ whenmod 32 28 (fast 2) -- VIBRE
    $ whenmod 32 24 (fast "2 4") -- reviens
    $ whenmod 32 16 (slow 2) -- éclairci
    $ dGlob
    $ slice 4 (cat bLine)
    $ "fbass:23"
    # cut 4
    # gain 0.9
  d6
    $ whenmod 8 6 ((# crush "<3 2.5>") . (|* gain 0.8))
    $ bite 4 ("0*<2!2 <0 [0|0|2]> 1>")
    $ "fguitar:23"
    # cut 6
    # gain (slow 4 $ range 0.8 1 tri)
  d9
    $ superimpose (
      ply "<2!4 [2|4]!2 4!2>"
      . arp "down <down up>"
      )
    $ melody
    # octave 4
    # slide ("<1!3 -1>")
    # s "superhoover"
    -- # decay ("<0!8 0.25!4 0.5!4 0.6 0.8 0.95 0.99>")
    # gain 0.25
  d10
    $ superimpose (
      const $ (1 ~>) $ note (slow 4 $ mMin) # "supersiren"
      # octave 2
      # sustain 4
      # gain 0.45
    )
    $ "glitch(<4!3 5>,8,<0!8 4!8>)"
    # n "2 <[2,3] 5>"
    # gain 0.4
    # pan "0.4 0.6"


d5 $ degradeBy "0 0.5 0.25 0"
  $ fast "12" $ s "cpu:1" # gain (range 0.7 0.9 saw)

once $ s "fguitar:23" # cut 21
