setcps 0.45

do
  let bars = 96
  let slowdown = 14
  let chordC = "[0, 12, 16, 19]"
  let chordG = "[-5, 11, 14, 19]"
  let chordF = "[-7, 12, 17, 21]"
  let timeless = [chordC, chordG, chordF, chordG]
  let metronome = "<4!3 [4|2]>"
  let semiRoll = "32 8"
  let fullRoll = "16 [32 . 4 16]"
  let cutProg = "0 <[1 0]> <1!3 0> <1!3 0.5>"
  let cutMost = "0 0.9"
  let cutFew = "0 0.1"
  d1 -- Kick
    $ whenmod bars (bars - slowdown)
    -- (# cps (0.45 - "<0.03 0.05 0.1 0.1 0.1 [0.1 0.05]>")) -- SLOWDOWN
    (degradeBy 0.9)
    $ every 8 degrade
    $ s "k(<3!3 1>,8,<0!3 1>) . k(3,4,<1 3>)" # s "jazz" # gain 1.2
  d2 -- Snares + white noise
    $ s "~ <s!3 s*2> . ~ <<s ~> s*2>" # s "[glitch:2,snare:11]" # gain 0.9
  d3 -- Metronomo-roll
    $ sometimes (jux id)
    $ whenmod bars (bars - slowdown) -- SLOWDOWN? Nope!
    (fast "<0.5 0.25 1 0.5 [1 2] [2 4]>")
    $ fast (slowcat [metronome, metronome, metronome, semiRoll])
    $ s "dr"
    -- # room 0.5
    # size 0.1 # dry 0
    # cut 1
    # pan (slow 8 $ range 0.6 0.8 sine)
  d4 -- Piano
    $ degradeBy (slowcat [cutMost, cutMost,
      cutProg, cutProg, cutProg, cutProg, cutFew])
    $ sometimes (off 0.125 (|+ note "12 0?"))
    $ sometimesBy 0.5 (off 0.375 (|+ note "<12 5>"))
    $ note ((slowcat timeless) - 12)
    # s "superpiano"
    # velocity 0.55
  d5 -- basse
    $ chew 4 "0*2 1(3,8) <2 [~ 2]> <3 [3 2]>"
    $ arp "updown"
    $ note ((slowcat timeless) - 36)
    # s "supersaw" # voice 0.05
    # sustain 0.25
    # gain (slow 4 $ 0.55)
    # pan (slow 8 $ range 0.5 1 sine)
  d6 -- brass hits
    $ whenmod bars (bars - slowdown) (# gain 0.5) -- SLOWDOWN? Gain up
    $ s "~ ~ b/8 ~" # s "brass:6"
    # note (scale "major" ("<1 1 2 1>"))
    # gain 0.5
  d8 -- Forks in tune
    $ whenmod 32 16 (# accelerate "<0!3 <0.1 0.2>>")
    $ euclid "<5 4 5 <8 [16 32]>>" 8
    $ s "superfork"
    # note ((slowcat timeless) - 24)
    # sustain "<0.5!7 [0.25 0.125]>"
    # gain (slow 32 $ range 0.5 0.8 cosine)
    # pan (slow 2 $ rand / 2)
