do
setcps (160/60/4)
-- resetCycles
let gMute = (midiOn "^73" (mask "f*16"))
let gM = gMask . gMute
-- Harmonic foundation: 16-bar cycle (each chord = 2 bars)
-- Main Bbm/F vamp with Db/Ebm variation at the end
let rt = slow 2 "<bf3 f3 bf3 f3 bf3 f3 df3 ef3>"
d1 $ gF1 $ gM1 -- KICK: Deep 4otf house kick
  $ midiOn  "^41" (<| "k k k <k k*2 k [~ k]>")
  $ midiOff "^41" (<| "k")
  $ fix ((# att 0.01) . (# rel 0.5) . (# lpf 2000)) "kick:4"
  $ "[techno:0,808bd:2,kick:4]"
  # gain 1.3
d2 $ gF1 $ gM -- CLAP: h2o natural handclap, reverbed
  $ midiOn "^42" (<| "~ cp ~ [cp <~ cp>]")
  $ midiOff "^42" (<| "~ cp ~ <~ cp*<1 2>>")
  $ "h2ogmcp"
  -- # room (slow 32 $ range 0.3 0.6 saw)
  -- # sz (slow 32 $ range 0.1 0.45 cosine)
  # dry 1
  # gain 1.1
d3 $ gF1 $ gM -- HATS: h2o sparse offbeat + light flourish
  -- FIXME(#94) d3 drives more controls than the grid gives it (BT3 only — BL1-3 are the family mutes). ^76 now belongs to another orbit, so this step STILL FIRES ACROSS COLUMNS — turning ^76 for its new owner also moves this. NOT commented out: this is a `$`-step and something above it is a partial application waiting for it, so removing it would stop the whole block compiling. Fold it onto d3's own control with gSel.
  -- FIXME(#94) d3 drives more controls than the grid gives it (BT3 only — BL1-3 are the family mutes). ^76 now belongs to another orbit, so this step STILL FIRES ACROSS COLUMNS — turning ^76 for its new owner also moves this. NOT commented out: this is a `$`-step and something above it is a partial application waiting for it, so removing it would stop the whole block compiling. Fold it onto d3's own control with gSel.
  $ midiOn "^76" (ply 2) -- double time on button
  $ midiOff "^43" (mask "t(3,8)")
  -- n: 0-4 closed Hard→Soft, 5-9 open, 15-19 semi-open
  $ "~ h ~ h ~ h ~ <h!3 h*2>"
  # "h2ogmhh"
  # n "~ 3 ~ 2 ~ 4 ~ <3!3 [3 6]>" -- occasional open hat flourish
  # gain (1.5 * "~ 0.7 ~ 0.8 ~ 0.65 ~ <0.7!3 [0.7 0.5]>")
d4 $ gF3 $ gM3 
  $ loopAt 16 $ chop 8 
  $ "gfunk_lead:7"
  # gain 1.2 
  # room 0.3 
  # crushbus 41 (range 16 3.5 "^32")
  # lpfbus 42 (range 300 1200 "^52") 
d5 $ gF3 $ gM3 $ loopAt 16 $ chop 8 
 $ "gfunk_lead:7" 
 # octersubbus 51 (range 0 2.9 "^33")
 # hpf 1000
 # gain 1.3
d8 $ gF1 $ gM2 
  $ loopAt 2 $ chop 8 
  $ midiOn "^36" ((|* gain 1.2)  . loopAt 2 . (>| "jungle_breaks:19"))
  $ "jungle_breaks:74"
 
