-- Pixels roses: le combat est inévitable
resetCycles

do
setcps (60/60/4)
let modIndex = pF "modIndex"
-- DESHADOW(#96): now global in BootTidal.hs; body kept in case it was music
-- let gF1 = (someCyclesBy "<f!10 t!6 f!112>" (# djfbus 1 (slow 6 $ range 0.5 0.1 saw))) -- Intro DJF
-- DESHADOW(#96): now global in BootTidal.hs; body kept in case it was music
-- let gF2 = (whenmod 64 48 (# djf (slow 16 $ range 0.5 0.2 saw))) -- Parts DJF
let gF = gF1 . gF2 -- Global filter
-- DESHADOW(#96): now global in BootTidal.hs; body kept in case it was music
-- let gM1 = (whenmod 16 8 (whenmod 8 7 (mask "t(<3 [3 4]>,4)")))
-- DESHADOW(#96): now global in BootTidal.hs; body kept in case it was music
-- let gM2 = (whenmod 32 16 (whenmod 16 12 (mask "t t <f t> <f f t f>")))
-- DESHADOW(#96): now global in BootTidal.hs; body kept in case it was music
-- let gM3 = ((someCyclesBy "<f!32 t!8>" (mask "<f f t t> <f t t t> <f t> <f f t f>")))
let gM = gM1 . gM2 . gM3 -- Global mask
let fadeOut = (whenmod 128 120 (|* gain (slow 8 $ range 1 0.5 saw)))
-- d11 $ slow 8 $ n (run 8) # "numbers" # gain 0.35
d1
  $ gF $ gM $ fadeOut
  $ mask "<f!5 t!27>" -- Orchestration
  $ "<k [k k ~!6 . ~]>"
  -- $ "<k [k . [~!3 . k*<2 2 1 <2 1>> [<k*<2!5 1 1 2> [~ k]> <k!3 [~ k]>]]]>" -- FIGHT NOW
  # "[reverbkick,jazz]"
  # room 0.8
  # dry 1
  # gain 0.9
  # lpf 2000
d2
  $ gF $ gM $ fadeOut
  $ mask "<f!8 t!24>" -- Orchestration
  -- $ "~ <~!8 s!8> ~ <s!3 <<s [~ s]> s*2>>" -- Snare rhythm instictif
  $ "~ s" -- Snare rhythm minimaliste tarba
  # "[sn:13,snare:20,snare:45]"
  # pan 0.6
  # gain 0.8
d3-- Drumroll
  $ gF $ gM $ fadeOut
  $ mask "<f!3 [f!3 t] t!28>" -- Orchestration
  $ fast "16 24 . 8 <16 <32 [32 16]>>"
  $ "[drum:2,cpu:4]"
  # gain 0.7
  # pan 0.2
d4 -- Main theme choir
  $ whenmod 128 64 ( -- Second part more instrumental
    (|* gain (slow 64 $ range 1 0.45 saw))
  )
  $ someCyclesBy "<t!8 f!56>" -- intro mask
  (
    (|* gain (slow 32 $ range 0.64 0.9 saw))
    . (mask "t t <f!2 t!2> <f!3 t> t t <f!4 f!4> <f!6 t f>")
  )
  $ always ( -- Echo
  juxBy 0.2 (
    (# rel (range 0.4 1 perlin))
    . (|+ pan 0.1)
    )
   . (|* gain 0.74) -- Compensate echo loudness
  )
  $ note "<gs <<es es c es>!2 g!2>>*8"
  # "moogBass"
  # pan 0.8
  # room (slow 8 $ range 0.5 0.8 saw)
  # sz 0.76
  # dry 2.2
  # rel (0.45 + 0.2 * perlin)
  # gain ((slow 16 $ range 0.85 1.1 saw) + 0.1 * perlin)
d5 -- Support bassline
  $ gF
  $ mask "<f!8 t!24>" -- Orchestration
  $ whenmod 64 48 ( -- Crushed outro
    (# crushbus 50 (slow 16 $ range 10 2.5 saw))
    . (|* gain     (slow 16 $ range 1  0.8 saw))
  )
  $ note (
    "0(3,8) 0*<8!3 4>" |+| "<gs <<es es c es>!2 g!2>>*8"
    - 24)
  # "bassWarsaw"
  # pan 0.25
  # room 0.8
  # gain 0.67
d6 -- RHODE ELECTRIC ARPS bassline
  $ gF
  $ mask "<t!120 f(<3!3 <2 4>>,4)!8>" -- Outro
  $ mask "<f!16 t!6 f t f!4 t!3 f t!32>" -- Orchestration
  $ whenmod 64 20 (superimpose (
    whenmod 8 4 (mask "t f . t(<1 3 5 7>,8)")
    -- . degradeBy (slow 32 $ "0 1!14 0" * (range 0.9 0.05 saw))
    . (arp "up")
    . (|+ note "<<c'maj'2 c'maj'4> c'maj'4 <c'min'4 c'min'2> c'maj'4>")
  ))
  $ note (
    "<gs <<es es c es>!2 g!2>>*8"
    - 12
  )
  # "FMRhodes1"
  # modIndex (slow 16 $ range 1 15 perlin)
  # room 1.05
  # sz (0.28 + 0.2 * perlin)
  # gain (slow 16 $ range 0.7 0.8 cosine)
  # pan (0.75 + 0.1 * perlin)
d8 -- Breakbeat for ya
  $ gF $ gM
  $ mask "<t(<1 2>,8)!8 t!7 f t!8 t(1,4,<0!3 1>)!4 t!3 f t!16 t(8,16)!16 t!16 t(5,16)!16>" -- Orchestration
  -- $ degradeBy (slow 32 $ range 0.05 0.9 sine)
  $ loopAt 2
  $ slice 16 ((sometimes (ply "2 <4 <8 [8|16]>>")) $ run "<16!6 8 <8 16>>")
  $ "break"
  # cut 8
  # pan 0.7
  # gain (0.8
    * "<0.5!4 0.75!4 1!120>" -- intro
  )
d9 -- Bones NOISE
  $ gF $ whenmod 128 8 (gM)
  $ slice 4 (run "<1 <1 2> 4 4> <2 2 4 <4 8>>")
  $ "igor:0"
  # begin (0.1 * perlin)
  # end (slow 4 $ range 0.85 1 perlin)
  # cut 9
  # room 0.3
  # sz 0.3
  # dry 0.9
  # gain (slow 64 $ range 0.7 0.35 saw)
