-- DOUX
do
resetCycles
setcps (70/60/4)
let endSong = (someCyclesBy "<0!48 1!999>" (# silence))
d1 $ gF1 $ gM1 $ endSong
  $ "k . k(<<3 4> 3 3 [3 <5 8>]>,8)"
  # "kicklinn"
  # gain 1.2
  # lpf 5000
d2 $ gM2 $ gF1 $ endSong -- Snare le fantome de la plage
  $ "~ s ~ <s [s*2 <~ s*4>]>"
  # "hh:11"
  # att 0.3
  # octersub 2
  # rel 2
  # gain 1.5
d3 $ gF1 $ gM2 $ endSong
  $ midiOn "^76" (ply 2)
  $ whenmod 8 6     (juxBy 0.8 rev)
  $ "hh*[8 <[8!7 16] [8!3 16] 8 [16 32 16]>]"
  # "drum:2"
  # delay 0.5
  # delayt 0.15
d4 $ gF2 $ gM3 -- Dubesque bass
  $ superimpose ((# crushbus 41 (range 16 5 "^53")) . (# lpf 500))
  $ note ("g2 <g2 [<g2 a2> <a2 g2>]>")  -- Melodie
  + "0(<3 3 5 3>,8) 0(<3!3 <1 [2 1] 5 8>>,8)" -- Structure
  # "bassWarsaw"
  # gain 1.1
  # squizbus 42 (range 0 8 "^33")
  # room 0.3 # sz 0.8 # dry 1.1
  # pan 0.4
d5 $ gF3 $ gM3 -- Marimba bulles de savon dans l'espace
  $ slow 2
  $ superimpose
    (
      (|+| note ("0(3,8,1) [0(3,8),<7(<0 <1 3>>,8)>]"))
      . (# "marimba1")
      . (# octave 8)
      . (|+ pan 0.1))
  $ note ("[g2@3 d3 . e3@3 <d3!2 g3!2>]")
  # "FMRhodes1"
  # pan 0.6
  # room 0.4
d8 $ gF1 $ gM2 $ endSong -- Unconditional loving breaks
  $ midiOn "^92" (slice 8 "0 <1 [~ 1*2]> <2 [3 2]> <3 [2 3]> [4 5]*<2 2 4 8> [4 5]*2 6 7*<4 <8 [16 8]>>")
  $ whenmod 4 3 (struct "t([4 4 8 4],8,<0 1>)" . chop 8) -- STUTTER
  $ chop 8
  $ midiOn ("^36" - "^56") (loopAt 1 . (# "jungle_breaks:45"))
  $ midiOn ("^56" - "^36") (loopAt "<1!3 <0.5 [0.5 . 0.25 1]>>" . (# "jungle_breaks:24"))
  $ loopAt 2
  $ "break:0"
  # cut 8
  # room 0.5 # dry 1.1
  # sz 0.8
d9 $ gF3 $ gM3 $ endSong-- Background Keys
  $ someCyclesBy
  "<0!15 1!9 0!24>"  -- Real orchestration
  -- "<0!7 1!9>"  -- DEBUG orchestrationm
  ((>| note "<[d4,g4,b4] ~>") -- COLOR SCHEME: SUMMUM GLOIRE GLOIRE
  . (# legato 4)
  . (# rel 8) . (# sus 8)
  . (|* gain 0.9))
  $ note "<[g3,b3,d4] <[a3,c4,e4] [e3,g3,b3]>>" -- LOVE YOUR OWN COLOR SCHEME <3
  # rel 4
  # att 0.3
  # sus 4
  # stack [
  "organTonewheel2" # lpf (slow 4 $ range 10000 200 sine),
      "organTonewheel3" # hpf (slow 4 $ range 0 800 sine)
  ]
  # room 0.4 # sz 0.5
  # pan 0.6
  # gain 0.9
d10 $ endSong
  $ mask "<f!12 t!4 f!4 t!4 f!8>"
  $ slice 4 "<0 0 0 1>"
  $ "risers:12"
  # cut 8
  # room 0.2

once $ "movie_dance:1"
  # cut 1 # end 0.16
  # gain 1.3
  # speed 0.9
