-- Clameur pour clément

once $ "dr"

do
let gMute = (midiOn "^73" (mask "f*16"))
let f2 = (# djfbus 2 (range 0.05 0.95 "^50"))
let f1 =  (# djfbus 1 (range 0.05 0.95 "^49"))
let f1l = (# djfbus 3 (range 0.45 0.55 "^49"))
setcps (93/60/4)
d1 $ f1 $ gMute
  $ midiOn "^41" (<| "<k k k*2 k> ~ . ~ ~ <~!2 k <~ k*2>> <~ k>")
  $ midiOff "^41" (<| "<k ~> . ~ ~ ~ <k k ~ k>")
  $ "[jazz,kick:5]"
  # midiG' "^78" 0 1.2
d2 $ gMute
  $ juxBy 0.85 (whenmod 8 7 rev)
  $ f1
  $ midiOn "^42" (
    someCyclesBy "<0 1>" (off "<-e!3 -s>" (|* gain 0.8)) -- Bonus prehit
  )
  $ midiOff "^42" (mask "<f t>")
  $ fix (# note (-4)) "cp"
  $ "~ snare"
  # "[cp,snare:20,snare:50]"
  # lpf 4000
  # room 0.3
  # dry 1.06
  # sz 0.4
  # gain 0.8
  # midiG' "^79" 0 1.2
d3 $ f1l $ gM2
  $ midiOn "^43" (ply 2)
  -- 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 2 4 2]!3 [2!3 4]>" . (# room 0.2))
  $ ply "1 . <1!6 2 2> <2!3 [2 4]>"
  $ "dr*4"
  # room (slow 32 $ range 0 (range 0 0.8 "^31") saw)
  # sz (slow 64 $ range 0.1 0.92 saw)
  # dry 1.5
  # midiG' "^80" 0 1
d4  -- BASSES
  $ f2
  $ fix (
    (# "90s_matrix:0") . gMute
    . (# note (scale "aeolian" (slow 2 "<0 0 2 3>")))
    . (# cut 4)
    . (# room 0.3)
    . (# dry 0.9)
    . (# sz 0.7)
    . (# pan 0.8)
    . (# crushbus 41 (range 16 4 "^32"))
    . (|* gain (range 0 1 "^52"))
    ) "matrix"
  -- FIXME(#54) d4 drives more controls than the grid gives it (B4 + C4). ^33 now belongs to another orbit, so this step STILL FIRES ACROSS COLUMNS — turning ^33 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 d4's own control with gSel.
  -- FIXME(#54) d4 drives more controls than the grid gives it (B4 + C4). ^33 now belongs to another orbit, so this step STILL FIRES ACROSS COLUMNS — turning ^33 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 d4's own control with gSel.
  $ fix (
    (<| note (scale "aeolian" "<0 [<0 2> . <2!3 3> <3!3 5>]>"))
  . (# "bass1")
  . (|* gain (range 0 1.5 "^33"))
  . (# cut 41) -- TODO Confirm better with headset avoiding overlapping subs
  ) "infra"
  $ "[matrix,infra]"
  # cut 4
  # midiG' "^81" 0 1.5
d6 $ f2 -- VOICES
  $ fix ( -- Morohai Morshiyum Morohai Naroz
    (# "voices_celtic:32")
    . ply ("<1!3 4>")
    . slice 4 (slow 2 "<0 1 <2 0> 3>")
    . (# cut 61)
    . (# pan 0.2)
    . (# hpf 2500)
    . (# room "<0.5 0.8 0.8 <0.8 0.1>>")
    . (# squizbus 61 (range 0 4 "^34"))
    . (|* gain 0.9)
    ) "morohai"
  $ fix (
    (# "voices_persian:10")
    . (# note (scale "aeolian" ("<0!3 3>") - 12))
    . (|* gain 0.81)
    . (# pan 0.9)
    . (# room 0.4)
    ) "wooh"
  $ stack ["~ <~!3 wooh>", "<morohai ~>"]
  # midiG' "^83" 0 1.5
d7 $ f2 -- LEADS
   -- Pad-like choir
  -- $ whenmod 4 3 (off "0.25" (|+ note 12))
  $ fix (
    (# "moogBass") . gMute
    . (superimpose (|+ note 7))
    . (# note (scale "aeolian" (slow 2 "<0 0 2 [3 [5 4]]>")))
    . (# room 0.4)
    . (# sz 0.3)
    . (# pan 0.3)
    . (|* gain (range 0 0.8 "^35"))
  ) "pad"
  $ fix (
    (# "superpiano") . gM3
    . whenmod 64 16 (
      whenmod 4 3 (arp "up" . ply "1!3 2") -- Second hit et montée
      )
    . (superimpose (|+| note "0 . <7 12>"))
    . (>| note (scale "aeolian" (
      "<[~ 0] [<0 2> . <2!3 3> <3!3 5>]>"
      ) - 12))
    . (|* gain "^55")
    . (# velocity "0.85 0.9!7")
    . (# pan 0.9)
    ) "piano"
  $ "[pad,piano]"
  # midiG' "^82" 0 0.9
d8 $ f1 $ gM2
  $ chop 8
  $ midiOn  ("^60"+"^92") (slice 8 "0 <1 [1 1]!2 1> [0 ~] <3 3*<2 4>>") -- DARK
  $ midiOff ("^60"+"^92") (slice 8 "0 1 <2 ~> <3!3 ~>") -- Light side
  $ loopAt 2
  $ "break:1"
  # room 0.4 # sz 0.4 # dry 0.9
  # midiG' "^84" 0 1.5
