
once $ "methbass:2" # cut 1 # gain 1 -- JUMP

once $ "methbass:3" # cut 1 # gain 0 -- Comete

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

resetCycles

do
-- region Nova Utils
let gFactor = 1.2
let gG a = (gain ("^77" * a * gFactor)) -- 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 gLPF = (# lpf (min 10000 ((range 200 20000 ("^49")))))
let gHPF = (# hpf (max 0 (min 7500 ((range "-7500" 7500 ("^49"))))))
let gDJF = (gLPF . gHPF)
let novaOn  ch pat = (someCyclesBy  ch pat)
let novaOff ch pat = someCyclesBy (1 - ch) (pat)
let novaIf ch patIf patElse = (someCyclesBy ch (>| patIf) patElse)
-- endregion Nova Utils
let gDelayD = (# delay (range 0 5 "^13"))
let gDelayFB = (# delayfb (range 0 0.9 "^14"))
let gRoom = ((|+ room (range 0 0.5 "^29")) . (# dry 0.99))
let gSize = (|+ size (min 0 (range "-0.5" 0.5 "^29")))
let gDelay = (gDelayD . gDelayFB . (# delayt 0.25) . (# orbit 2))
let g = (gDJF . gRoom)
let chords = "<d3'min d3'maj>"
setcps (165/60/4)
let modIndex = pF "modIndex" -- 0.2
let mel = "4(<1 2>,2) 5*[1|2|4] 6 7"
-- resetCycles
d1 $ g
  $ novaOn "^41" (mask "<f!24 t!104>")
  -- $ mask "f"
  $ "k . ~ k ~ ~"
  # "[jazz,tech:5]"
  # gM' 0 2 "^78"
d2 $ g -- Snare
  $ novaOn "^41" (mask "<f!24 t!104>")
  -- $ mask "f"
  -- $ fast 2
  $ novaOn ("^43") --BOUTON NASSIM
  (slice 8 (run 8) . (loopAt 1)
  . novaOn "^75" ((|* gain 0.9) . (>| "fbreak120:1"))
  . novaOff "^75" (>| "breaks165:1")
  )
  $ novaOff ("^43") (<| "~ s ~ s")
  $ "[sn,snare:1,snare:27]"
  # note (range "-4" 6 "^51")
  # gM' 0 1.8 "^79"
  # pan 0.6
d5 $ g -- Hats
  $ novaOn "^41" (mask "<f!16 t!16>")
  $ novaOn "^44" (fast 2)
  $ novaOn "^76" (slow 2)
  $ slow 2
  $ "hh*<8!3 [16 8]>"
  # pan 0.6
  # gM' 0 2.5 "^80"
d3 $ g -- BASSLINE
  $ novaOn "^41" (mask "<f!8 t!120>")
  $ loopAt 2
  $ note (scale "aeolian" $ mel)
  # "bassWarsaw"
  # pan 0.2
  # octave 2
  # cut 3
  # crush (range 16 5 "^53")
  # gM' 0.8 1.8 "^81"
d4 $ g
  $ whenmod 16 8 (fast 2 . rev)
  $ note (scale "aeolian" $ mel + (slow 4 "<c c'maj c'min c'maj>"))
  # "FMRhodes1"
  # pan 0.8
  # modIndex (range 0 100 "^54")
  # gM' 0 1.8 ("^82" * (range 1 0.9 "^54"))
d6 $ g  -- ABS BASS!
  -- $ mask "<f!16 t!16>"
  $ novaOn "^41" (mask "t*4 . <[t f t f] <f [f t]>>")
  $ "abstract:1" # cut 6
  # gain (range 0.2 0.95 "^84")
d7 -- TODO: Retravaille guitare
  $ chop 8
  $ novaOn  "^59" (loopAt 2 . mask "t(3,8)")
  $ novaOff "^59" (loopAt 4)
  $ "fguitar:25"
  # gM' 0.35 1.6 "^83"
  # cut 8
