-- Quand les aigus arrivent, il manque qqch qui vient apres
-- Quand les djf baissent, il manque un drop au retour

do
resetCycles
setcps (90/60/4)
let whenPont it = (someCyclesBy "<0!32 1!8 0!32>" it)
-- DESHADOW(#96): now global in BootTidal.hs; body kept in case it was music
-- let gMask = mask "t!3 <t!7 f>"
let gDJFDown = ((someCyclesBy "<f!24 t!8>" (# djfbus 1 (range 0.5 0.1 saw))))
let gDJFUp = ((someCyclesBy "<f!32 t!16 f!16>" (# djfbus 2 (range 0.15 0.85 saw))))
let g = gDJFDown . gDJFUp
d1 $ g $ gMask -- Kick sub-bass
  $ mask "<f!8 t!56>"
  $ whenPont (# silence)
  $ struct "[t*<1!8 <1 2!3> 1!6 <1 2>> <~ t>] ~!3 . ~ <~!8 t!8> ~ <~!3 <t <~ t>>>"
  $ "jungbass"
  # cut 1
d2 $ g $ gMask -- Snare adéquat + claps opportuns
  $ mask "<f!7 [t f!3] t!56>" -- Intro
  $ mask "<t!32 f!7 [t f] t!24>"
  $ whenmod 64 0 ( -- claps opportuns
    (whenmod 32 8 (ply "<1!3 2>"))
    . fix (|* gain 0.85) "cp"
    . superimpose ((# "[cp,ab:11]")
    . (# lpf "<2000!3 [2500 3000]>") . (# room 0.2) . (# sz 0.9) . (# dry 1)))
  $ whenPont (# lpf 2000)
  $ whenmod 32 8 (fast 2)
  $ "~ . [snare:5,sn:4] ~"
  # gain 0.65
d3 $ g $ gMask -- Drumroll structuré
  $ mask "<f!7 [t t f t] f!4 [t f] f!3 t!16>" -- Intro
  $ degradeBy "0 . 0 <0.33!3 0.25> <0!3 0.38> 0" -- Élaguage
  $ whenPont (# hpfbus 31 (slow 8 $ range 4500 0 (saw+sine/2)))
  $ whenmod 4 3 (ply "[1|2|<1!3 2>]*4")
  $ struct "[t*8 . t*<8!3 <16 [16 8] 16 [16 [32 16 32 [16 8]]]>>]"
  $ "drum:2"
  # pan 0.3
  # room 1.2 # sz 0.2 # dry 1
  # gain "<0.65!3 0.75>"
d4 $ g $ gMask -- Bassline de compagnie
  $ whenmod 64 32 (# crushbus 41 (slow 4 $ range 12 4 saw)) -- Fade in final
  $ whenmod 64 32 (|* gain (slow 32 $ range 0.5 1 saw)) -- Fade in final
  $ whenmod 4 3 (off 0.5 (mask "f t"))
  $ note "[ef4 c4]@3 [<as3 gs3 gs3 gs4>] . ~!3 <~!3 g4>"
  # "bassWarsaw"
  # gain 0.55
  # lpfbus 41 (slow 32 $ (range 5500 500 saw + perlin)) -- Submarine
  # room 0.8
  # sz 0.56
  # pan 0.8
d5 $ g -- Piano baseline
  $ whenmod 64 32 (# speed 0.75)
  $ mask "<f!4 t [t f]!3 t!24>"
  $ whenmod 64 32 (|* gain (slow 32 $ range 0.5 0.9 saw)) -- Fade in final
  $ mask "<t(<1!3 3>,4)!16 t!48>"
  $ slice 8 ("0 <0!4 1!4> 2 <3!3 <[4 5] [5 6]>>"
  + "<0!8 4!8> <0!8 [4 <4!12 2!3 4>]!8>")
  $ "fpiano:12"
  # pan 0.42
  # gain 0.6
  # room (slow 8 $ range 0.3 0.45 saw)
  # sz 0.8
  # cut 5
d6 $ g $ gMask -- Breakbeat fidèle
  $ mask "<f!64 t!64>"
  $ someCyclesBy "<f!16 t!16 f!8 t!24>" (|* gain 0.8)
  $ mask "<t(<1 2 3 4>,4)!16 t!16 f!8 t!24>"
  $ whenmod 4 3 (ply "<1 2>" . rev)
  $ slice 4 ("0 1" + "<0!3 <2 0> <2!3 <0 2>>>")
  $ loopAt 2
  $ "break:13"
  # cut 6
  # pan "<0.65!6 0.8 0.9>"
  # gain (slow 32 $ range 0.5 0.75 saw)
  # room 0.98
  # sz 0.4
  # dry "<1!3 0.993>"
d7 -- ChOiR
  $ mask "<f!32 t!32>"
  $ superimpose (+| note (arp "up" (
    "<c'maj'8!3 c'min'4 c'man'8!2 c'min'4 g'min'4>"
    - 24
  )))
  $ note "[ef4@4 <c4!3 g4 c4 g4 c4 g4 g4 g4 g4 c4 g4 g4 c4 g4>]"
  # "moogBass"
  # panbus 71 (range 0.13 "<0.5!3 0.8>" saw)
  # gain 0.45
d8 $ g -- Nappes <3
  $ mask "<f!8 t!56>"
  $ note (
    "[ef4 c4]@3 [<as3 gs3 as3 gs4*<1 2>>] . ~!3 <~!3 g4>"
  + 12)
  # "moog:4"
  # cut 8
  # pan 0.96
  # att 0.09
  # rel 10
  # gain 0.35
