resetCycles

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 (159/60/4)
d1 $ g
  $ mask "<f!3 t!125>"
  $ someCyclesBy "<0!8 2 0!55>" (<| "k*12")
  $ someCyclesBy "<0!6 2!2 0!56>" (<| "k*8")
  $ someCyclesBy "<0!9 1!55>" (<| "k . ~ k ~ ~")
  $ someCyclesBy "<1!9 0!55>" (<| "k*4")
  $ "reverbkick" # sus "0.25"
  # gM' 0 1 "^78"
d2 $ g
  $ mask "<f!9 t!55>"
  $ "~ s ~ s*<1 2 1 1>"
  # "[snare:21,snare:22,snare:3]"
  # gM' 0 1.2 "^79"
  # note (range "-4" 12 "^51")
d3 $ g
  $ whenmod 128 64 (
    slice 8 (run 8) . (loopAt 1) . (>| "breaks165")
    . (|* gain "<1.1!8 0.95!24>")
  )
  $ "d*[8!3 <[8 . 8 4] [16 <4 16>]>]"
  # "[hh27,drum:2]"
  # gM' 0 1 "^80"
d4 $ g
  $ mask "<f!9 t!55>"
  $ novaOn "^44" (chop 4)
  $ whenmod 16 8 (rev)
  $ slice 8 ("0(3,8)" + "0 <0 1!3>")
  $ "fbass:3"
  # crush (range 10 4.5 "^32")
  # gM' 0 1.1 "^81"
  # pan 0.2
  # cut 1
d5 $ g
  $ someCyclesBy "<1!64 0!64>" (# octave 4)
  $ novaOn "^57" (scramble 4 . fast 4)
  $ slice 4 ("<0 1 2 3>")
  $ "fguitar:1"
  # pan 0.7
  # crush (range 10 2 "^33")
  # room 0.2 # sz 0.8
  # gM' 0 1.1 "^82"
  # cut 1


once
  $ "meth_bass:2"
  # speed "0.90"
  # gain (slow 8 $ range 0.85 0.95 sine)
  # cut 1


d4 $ g
  $ novaOn "^76" (# width 1)
  -- $ whenmod 16 8 (|+ note (scale "lydian" ("<4 4 6 7>")))
  $ note (scale "lydian" (prog + "0"))
  # "bassWarsaw"
  # lpq (range 0 0.125 "^52")
  -- FIXME(#54) d4 drives more controls than the grid gives it (B4 + C4). ^17 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.
  -- # satt ("^17")
  -- 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 $ g
  $ sometimesBy "<[f t!3]!1 t!7 f!24>" (# silence)
  $ 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
d6 $ g
  $ degradeBy (1 - "1 ^55!7")
  $ novaOn "^58" (superimpose (|+ note 12))
  $ juxBy 0.8 (rev . chop 2)
  $ note (scale "lydian" "<1!3 4> . [1 2] <1 4 4 4>")
  # "FMRhodes2"
  # octave 4
  # gM' 0.3 0.85 "^83"
d7
  $ mask "<f!24 t!8>"
  $ "~ clap"
  # gM' 0 1 "^84"
  # dry 0.99  # room 0
  # note (-2)
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.5 "^36"* "^77") * (slow 16 $ range 0.45 0.65 sine))
d9 $ g
  $ "<[~ ~ ~ w] w(3,8) w(5,8)>"
  # "wobble:1"
  # gain ((range 0 1.5 "^56" * "^77") * (slow 16 $ range 0.6 0.9 saw))
  # pan 0.8
  # room 0.2
  # cut 21

once $ "ffills:0" # gain 0.8


once $ "meth_bass" # gain 0.85 # cut 1



do
setcps (120/60/4)
d1
  $ mask "<f!3 t t!4 f!4 t!12>"
  $ "k*<1!4 2!3 1> ~ . ~ k*<1!3 2>" # "jazz" # gain 0.9
d2
  $ mask "<t!4 [t f!3]!2 [t . f t] [t f!3]>"
  $ mask "f t f t"
  $ slice 4 "0 1 2 3*<1 2>"
  $ "fbreak120:6"
  # gain 0.65
  # cut 1
d3
  -- $ mask "<f!8 t!24>"
  $ note "<0 0 [3 2] 0>" # "choir" # gain 0.75 # cut 2
  # room 0.2
d5
  $ scramble 8
  $ slice 4 (run 4)
  $ "fguitar:36"
  # cut 5
  # pan 0.8
  # gain 0.6
d4
  $ note (slow 2 $ scale "lydianMinor" ("<0 1 2 3>"))
  # "bassWarsaw"
  # octave 2
  # gain 0.9
  # cut 2


d5 $ loopAt 2 $ slice 4 ("0 0 1*2 2") $ "choir:2" # cut 1 # gain 0.55



d2 $ g
  $ (# gM' 0.35 0.9 "^79")
  $ novaOn "^42" (slow 2)
  $ novaOn  "^75" (const $ loopAt 1
    $ slice 4 ("<0 0 2 0> <1 1 3 1> 2 3")
    $ "breaks165")
  $ novaOff "^75" (slice 8 "[~ <0 1>]*4" )
  $ loopAt 2
  $ "fbreak80:1"
d3 $ g
  $ sometimesBy "<f!8 t!8 f!16>" (# cut 3)
  $ sometimesBy "<f!16 t!16>" (# legato "<1!8 2!8>")
  $ slice 4 ("<0!4 1!4>*4") $ "choir:4/4"
  # pan 0.4
  # legato "<1!8 2!8>"
  # gM' 0 1 "^80"
d4 $ g $ slice 8 ("<0!3 1 1 0 1 0>(<3 <1 5>>,8)") $ "choir:4"
  # pan 0.8
  # cut 4
  # gM' 0 0.8 "^81"
d5 $ g
  $ novaOn "^89" (chop (4 + ("12" * "^57")))
  $ whenmod 4 2 (stutWith 4 "e" (# legato 0.25))
  $ note (chords)
  # "moogBass"
  # gM' 0.2 0.5 ("^82" / (1 + (0.4) * "^33"))
  # crush (range 16 4 "^53")
  # chorus (range 0 4 "^33") -- 0.7



once $ slice 8 ("0 1 2 3") $ "choir:4" # gain 0.8 # cut 1

-- TODO REWORK ARABIC LOOP
do
-- resetCycles
setcps (85/60/4)
d1
  $ mask "<f!8 t!29>"
  $ "k . k(<3!3 5 5 5 3 [3 <1 5>]>,8)"
  # "[h2ogmbd:0,bd]"
d2
  $ superimpose (const $
    fast "<8!4 [16 <8 8 16 [16 <8 4>]>]!4>"
    $ "drum:2")
  $ mask "<f!7 t!25>"
  $ fast "<2!2 4!4 [4 8 4]!4 [8 4 8 4]!4>" $ "~ snare:21" # gain 0.8
d3
  $ whenmod 16 8 (scramble "<4 2 4 1> <1 4 8 16>")
  $ whenmod 4 3 (rev)
  $ note (scale "harmonic" ("0 1 2 3 3 2 1 <0!4 1 1 2 1>"))
  # "choir"
  # cut 3
  # room 0.5 # dry 0.8
  # pan 0.7
d4
  -- $ mask "<f!8 t!8>"
  $ off 2 (slice 4 ("0 <1 2> <2 1> 3"))
  $ "choir:2/4"
  # gain 0.6
  # pan 0.9
  # cut 4
d5
  $ mask "<f!16 t!16>"
  $ "c*<1 <<2 4> [8 4]>>" # "choir:3"
  # gain 1
  # cut 5

d10 $ ""
