do
-- resetCycles
setcps (114/60/4)
d1  $ gF1 $ gM2
  $ sometimesBy "^29" (fast 2)
  $ midiOn "^41" (<| "k k k k*2")
  $ midiOff "^41" (<| "k . k(3,8)")
  $ stack [
      "kick:5"  # gain 1.4 # lpf 200,           -- character (KICK16, click+body)
      "bd:5"    # gain 1.0 # lpf 90 # hpf 25    -- sub thump (90% sub @ 43Hz)
    ]
  -- alt punchier replacement: "hardkick:5" (sub + 9% mid click, distorted)
d2 $ gF1 $ gM1
  $ midiOn "^42" (<| "~ <s!4 [~ s] s s s*2> ~ <s [s s*<1 2>]>")
  $ midiOff "^42" (<| "~ s")
  $ stack [
      "cp:1"      # gain 1.05 # speed 0.95,     -- 80s hand clap (HANDCLPA)
      "snare:54"  # gain 0.65 # hpf 280,        -- existing snare, crack only
      "808sd:5"   # gain 0.5 # hpf 180          -- 808 body underneath
    ]
  -- # room 0.45 # sz 0.55
  -- # delay 0.2 # delayt "e" # delayfb 0.25
d3 $ gF1 $ gM1
  $ stack [
      -- light closed offbeats, velocity-layered
      "~ h ~ h ~ h ~ h*<1 1 2 [2 4]>"
        # n "<2 3 4 3>"                          -- Med/Soft/Softest closed
        # gain (range 0.42 0.62 (slow 5 sine)),
      -- open hat once every 4 cycles, last 8th note (NTO breath)
      "~ ~ ~ ~ ~ ~ ~ <~!3 1>"
        # n 7                                    -- HatOpen-Med
        |* gain 0.65
    ]
  # s "h2ogmhh"
  # gain 1.4
d4 $ gF2 $ gM3 
  $ midiOn "^44" (# n 3)
  $ midiOff "^44" ( -- MONTEE
    whenmod 16 12 (# n "<[1 2] 2*2>"))
  $ midiOff "^76" (slice 4 "<[0 1] [2 3]>")
  $ "like_sugar:0" # cut 4
  # gain 1.4 
  -- # room 0.3 # sz 0.3 
  -- # delay 0.6 # delayt 0.01 # delayfb 0.2
  # crushbus 41 (range 16 3.5 "^32")
  # bandf (range 50 1200 "^52")
d5  $ gF3 $ gM3
  $ slow 2 -- Adjusted to Sugar rhytm <3
  $ midiOn "^89" (ply "<4!3 8>" . (# begin "0 <0 0.25> 0.5 0.5"))
  -- $ ply 4
  -- $ slow 4
  $ fix (# begin "<0 0 [0@3 0.7] 0.7>") (n 12) -- Sex appeal
  $ fix (# begin "<0!3 [0.7!3 0.55]>") (n 13) -- Sex appeal
  $ n (cat [
    "0", "~" , "0" , "~ [0*[4 2] ~]", -- Brother
    "1", "1 2", "2 0", "2", -- You can't plug out
    "~", "~", "3", "~", -- Lose yourself
    "4", "~", "<5 <19 21>>", "~", -- Revolution
    "6", "~", "6", "~", -- Commercials
    "7", "8", "9", "10", -- Nixon
    "31", "~", "~", "~", -- NOT BE TELEVISED
    "11", "12", "12@3 12", "12*[4 4 [4 8] [8 16]]", -- Sex Sex!!
    "13", "~", "13", "13*[4 4 8 4]", -- The Nubs
    "14", "15", "~", "0", -- Not five pounds thinner
    "16", "17", "18", "19" -- STOLEN AMBULANCE
    ])
  # "the_revolution" 
  # cut 5 
  # gain 1.5
  -- # end 0.6 
  -- # begin 0.65
  -- # begin 0.82 
  # room 0.4
  # sz 0.4
  # delayt "q"
  # delay (slow 8 $ range 0 0.9 perlin)
  # delayfb (slow 16 $ range 0 0.24 perlin)
  # pan 0.8
d7 $ gF2 $ gM3 -- LEAD: Rhodes arp in D Dorian (i7 → IV7 → bIII → v)
  $ midiOn "^91" (jux rev)
  $ midiOff "^59" (degradeBy 0.15)
  $ sometimesBy "^35" (# squiz "<1 2 3 1>")
  $ fast 2
  $ arp "<up updown down converge  up updown thumbup converge>"
  $ note "<d3'min7 g3'7 f3'maj7 a3'min7>"
  # s "FMRhodes1"
  # cutoff (range 1200 4500 "^55")
  -- FIXME(#54) d7 3rd+ effect: the grid gives d7 B7 + C7. Fold ^55 in via gSel rather than borrowing a column.
  # resonance (range 0.1 0.3 "^55")
  # room 0.6 # sz 0.5
  # delay 0.5 # delayt "q" # delayfb 0.35
  # pan 0.3
  # gain 1.1
  # modIndex (slow 16 $ range 0.4 2.5 perlin)
  # legato 0.9
d8  $ gF1 $ gM1
  $ midiOn "^92" (ply "<2 <4 [4 8]>>")
  $ midiOff "^60" (mask "t(4,8,1)" . chop 16)
  $ chop 16 
  $ loopAt 2
  $ midiOn "^36" (# n "102")
  $ midiOn "^56" (loopAt 0.5 . (# n "42"))
  $ "jungle_breaks:45"
  # cut 8 
  # gain 1.3
  # lpf 4000
d9 $ gF3 $ gM3 -- SUGAR CHOIR
  $ "like_sugar/2"
  # n (slow 2 "<9 10 11 12 9 10 11 12 12 12 12 13 12 14 15 16>")
  # cut 9
  # room 0.4 # sz 0.3
d10 $ gF3 $ gM3 -- SUGAR KEY SWEET TRIGGER
  $ "like_sugar:21" 
  -- # end 0.92 # speed 1.2 
  # room 0.4 # sz 0.4 # dry 0.9
  # cut 10
d11 $ gF3 $ gM2 -- SUGAR GLITCH: stuttered chops + bitcrush
  -- $ midiOn "^61" (stut 4 0.6 0.125)
  -- $ sometimesBy "^31" (hurry "<1 2 0.5 [2 4]>")
  $ every 4 (rev . chop 32)
  $ chop "<8 16 [16 32] 8>"
  $ "like_sugar/2"
  # n "<10 11 12 9 13 14 15 16>"
  # cut 11
  -- # coarse (slow 4 $ range 0 10 sine)
  -- # squiz "<1 1 2 1>"
  -- # crush (range 12 6 "^59")
  # room 0.3 # sz 0.5
  # delay 0.3 # delayt "e" # delayfb 0.4
  # pan "<0.35 0.65>"
  # gain 1.0
d12 -- HEY HEY!
  $ chop 8
  $ "like_sugar:20/4" 
  # room 0.5 
  # gain 0.8
  # pan "[0.2 0.8]*8"
