setcps 0.8

do
  let bars = 32
  let br2 = (bars - 4)
  let br1 = (bars - 8)
  let brEnd = (bars - 1)
  d1 -- Poum tchak poum tchak
    -- $ whenmod (bars*2) bars (mask "t(<[2|4|8] [3|5]>,16)")
    $ whenmod bars brEnd (# gain "0!3 0.9")
    $ whenmod bars br1 (# gain 0)
    $ fix (
      superimpose ((# s "abstract:2") . (# release 0.5))
      . (# s "kick:4")
      ) ("k")
    $ fix (
      sometimes (whenmod 4 3 (hurry 2))
      . sometimes (# lpf 5000)
      . (# s "snare:30")
      ) ("s")
    $ s "<k [~ <k k*2>]> s [~ k] [s <~ s?>]"
    # release 0.75
    # pan (slow 4 $ "<0.3 0.7>")
    -- # gain 0.9
  d2 -- Le rush
    -- $ degradeBy 0.5
    -- $ whenmod (bars*2) bars (mask "f(<[2|4|8] [3|5]>,16)")
    $ whenmod bars brEnd (# gain 1.2)
    $ whenmod bars br1 (hurry 2)
    $ rarely (# crush 6)
    $ someCycles (fast "1 . 2 1")
    $ sometimesBy "0 0.5" (# n 7)
    $ sometimesBy "0.5 0" (# n 8)
    $ s "hh*8"
    # pan (slow 24 $ sine * 0.8)
  d3 -- Vent numeriques montants
    $ whenmod bars br2 (# gain 1)
    $ whenmod bars br1 (# gain 0)
    $ sometimes (# crush "<9!3 8>")
    $ jux rev
    $ n "<0 3 2>(<3 5>,8)" # s "wind"
    # speed (range 0.4 1 rand)
    # note (slow 16 $ range (-16) 0 saw)
    # gain (slow bars $ range 1 0.7 saw)
  d4 -- vent renversant avant drop
    $ whenmod bars br1 (
      fast "<1 2 1 1 2 4 8>" . (# gain 0.8))
    $ slow 2
    $ s "space:3"
    -- # speed "<1 0.75 0.7 0.6>"
    # room "<0.2 0.4>"
    # gain 0
  d5 -- synthe fou
    $ degradeBy (slow 8 "<0 0 0.5 [0.5 0]>")
    $ s "~ c([3|4|6?],8)"
    # note (
      "<c2'min!3 <d2'min b1'min>>" + "-12"
      + (slow 4 $ "<0 [0|12]>")
      )
    # s "[casio]" # gain 0.9
