do -- BreakBass: Break to DNB
-- region moogBass parameters
let cutoff = pF "cutoff"
let lagamount = pF "lagamount"
let rel = pF "rel"
let chorus = pF "chorus"
-- endregion
-- region bassWarsaw parameters
let satt = pF "att"
let sdec = pF "dec"
let ssus = pF "sus"
let srel = pF "rel"
let width = pF "width" -- 0.15
-- , detune = 1.005, preamp = 4
-- endregion
-- region Nova Utils
let gF = 1.5 -- gain factor
let gG a = (gain (gF * "^77" * a)) -- gain Global
let gM' l h a = (gG (range l h a)) -- gain Modéré
let gM a = (gM' 0.2 0.8 a) -- gain Modéré doux
let novaOn  ch pat = someCyclesBy ch pat
let novaOff ch pat = someCyclesBy (1 - ch) pat
let gReverb = ((# room "^29") . (# sz (range 0 0.9 "^30")) . (# dry (range 0 2 "^13")))
let gLPF = (# lpf (min 10000 ((range 200 20400 ("^49")))))
let gHPF = (# hpf (max 0 (min 7500 ((range "-7500" 7500 ("^49"))))))
let gDJF = (gLPF . gHPF)
-- endregion Nova Utils
let g = (gDJF . gReverb)
let prog = "<1 1 2 4>"
setcps (160/60/4)
-- resetCycles
d1 $ g
  -- $ mask "<f!4 t!16 t!3 f f!4 t f!2 t!2>"
  $ novaOn  "^41" (<| "k k k k")
  -- $ novaOff "^42" (<| "k . ~ k ~ ~")
  $ "[reverbkick,kick:5,kick:9]"
  # gM' 0 1 "^78"
d2 $ g
  $ whenmod 32 24 (slow 2)
  $ novaOn "^75"  (slice 8 (run 8) . (loopAt 1) . (>| "breaks165"))
  $ novaOff "^75" (<| "~ s ~ s*<1 2 1 1>")
  $ "snare:21"
  # note (range "-4" 6 "^51")
  # gM' 0 1.1 "^79"
d3
  $ g
  $ novaOn "^43" (chop 16)
  $ slow (slow 2 "<1 2 2 4 4 8 8 8>")
  $ "meth_bass:2"
  # cut 1
  # gM' 0.3 1 "^80"
d4
  $ note ("<d2!4 g2!4>")
  # "bassWarsaw"
  # crush (range 10 3.13 "^32")
  # gM' 0.3 1.4 "^81"
d6 $ g
  $ degradeBy (1 - "1 ^55!7")
  $ note ("d g . d g ~ <~!3 g>" + "<c'maj'2!4 c'min'2!4>")
  # "FMRhodes2"
  # pan 0.8
  # octave 4
  # gM' 0.3 1 "^82"
d7 $ g
  $ mask "<f!24 t!8>"
  $ "~ clap"
  # gM' 0 1 "^35"
  # dry 0.99  # room 0
  # note (-2)

-- region SANDBOX
once $ "meth_bass:3" # cut 1 # gain 0.8 -- Comete

once $ "meth_bass:4" # cut 1 # gain 0 -- ALERTE

d3
  $ g
  -- 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.
  $ novaOn ("^76")  (slice 8 (run 8) . (loopAt 1) . (>| "breaks165"))
  $ "d*[8!3 <[8 . 8 4] [16 <4 16>]>]"
  # "drum:2"
  # gM' 0 1 "^80"
d4 $ g
  $ novaOn "^44" (# width 1)
  -- $ whenmod 16 8 (|+ note (scale "lydian" ("<4 4 6 7>")))
  $ note (scale "lydian" (prog + "0 . 0(<3!3 5>,8)"))
  # "bassWarsaw"
  # satt ("^52")
  -- FIXME(#54) d4 drives more controls than the grid gives it (B4 + C4). ^33 now belongs to another orbit, so the line(s) below are COMMENTED OUT rather than left firing across columns. Nothing is lost — restore by removing the dashes once gSel folds this onto d4's own control.
  -- # ssus ("^33")
  # octave 2
  # gM' 0.35 1.1 "^81"
  # crush (range 10 3.13 "^32")
  # legato 0.85
d5
  $ sometimesBy "<[f t!3]!1 t!7 f!24>" (# silence)
  $ g
  $ whenmod 4 3 (slice 4 "0 1 2 2")
  $ every' 4 2 (slice 4 "0 1 0 1")
  $ whenmod 16 8 (chop 16)
  $ "choir:4"
  # room 0.4
  # gM' 0 0.65 "^82"
  # cut 5
d8
  $ g
  $ mask "<f!32 t!32>"
  $ slice 8 ("~ <0 0 1 <1 2>>") $ "meth_bass:2"
  # pan 0.8 # room 0.2
  # gain ((range 0 1.3 "^36"* "^77") * (slow 16 $ range 0.45 0.65 sine))
d9
  $ "<[~ ~ ~ w] w(3,8) w(5,8)>"
  # "wobble:1"
  # gain ((range 0 1.5 "^56" * "^77") * (slow 16 $ range 0.6 0.9 saw))
  # hpf 200
  # pan 0.8
  # room 0.2
  # cut 21
