d1 $ slow 4 $ note melody # s "supersaw" # gain 0.6 # voice 0.1 # legato 1.1

d2 $ scramble 4 $ chop 8 $ s "tablex" # n (irand 2) # gain 0.9 # speed (cycleChoose [1,1.5,00.5])

do
  let melody = "[-24, <-17 -17 -18 -17 -17 -14>]"
  d3  -- drumroll
    $ fast "16 <8!3 [32 <8 16>]>" $ s "dr"
    # gain 0.7
    # pan (slow 16 $ range 0.2 0.8 saw)
  d2  -- Snares
    $ sometimes (superimpose (# s "glitch3:4")
    $ someCycles (hurry 2)
    $ s "s(<1 3 5>, 8)"
    # s "sn:10"
    # gain (slow 8 $ range 0.5 0.7 sine)
  d4  -- Allez
    $ s "<k!3 k*2> k([1||1|1|3|3|5],8)"
    # s "reverbkick"
    # lpf (slow 16 $ range 200 2000 sine)
    # gain 0.7
  d7
    $ superimpose (# s "supergong") . (# gain 0.45)
    $ s "~ f f*2 ~"
    # s "superfork"
    # note melody
    # gain 0.45
    # release 0.5

-- Part 2: Church

let melody = scale "mixolydian" "[-14, <-9 -9 -10 -7 -7 -5>]"

d1 $ superimpose ((# s "superpiano") . (# gain 0.8)) $ slow 4 $ note melody # s "supersaw" # voice 0.2 # gain 0.65 # legato 1.1 # triode 0.2

d2 $ scramble "<4 8 16>" $ chop "<4 8 16>" $ s "tablex" # n (irand 3) # gain 0.9 # speed ((cycleChoose [1,0.8, 0.9]) * cycleChoose([-1])) # coarse (cycleChoose [8,2,16])

d3 $ fast (cycleChoose [1,4,4,6]) $ s "juno" # gain 0.7 # triode 0.2 # legato 0.5 # silence

d4 $ s "glitch(12,16)" # gain 0.95 # n ((choose [3,2,6]) + 0) # legato 1

d5 $ note ("  "melody + 12) # s "supervibe" # gain 0.85


do
  let melody = scale "mixolydian" "[-14, <-9 -9 -10 -7 -7 -5>]"
  d6 -- drumroll
    $ fast "16"
    $ s "[dr,hh:8]"
    # gain 0.8
  d7  -- Snares
    $ whenmod 8 7 (fast "<1 [2 1]>")
    $ sometimesBy "<0 0 0 [0 0.75]>" (hurry 2)
    $ s "s(<1 3 5 8>, 8)"
    # s "sn:10"
    # gain 0.8
  d8  -- Allez
    $ s "jazz(<3 5> <1!3 2>,8)"
    # gain 0.85
  d9
    $ superimpose (
    stut 4 0.95 "<0.25 0.5>" .
    (# s "supergong") . (|- gain 0.1)
    (|+ note 12)
    )
    $ sometimes (off 0.5 (|+ note 5))
    $ off 0.25 (|+ note "<0 12>")
    $ slow 4
    $ note (melody - 2)
    # s "superfork" # gain 0.7


-- Grave cool ta superfork !
-- Thanks ! Ca fait des super gongs/cloches


-- DYNAMISME VIA EFFETS:

d5 $ note ((inside 4 (fast (cycleChoose [2,4])) $ "0 4 0 <7 12 10>") + melody + (cycleChoose [12, 24])) # s "supervibe" # gain 0.75 # legato 3 # coarse (cycleChoose [8,2,1,1]) # hpf (slow 4 $ range 440 2000 sine) # tremdp 1 # tremolorate 15 # hpq (slow 3 $ range 0 0.5 sine)

-- Part 3: Outro

let melody = scale "<lydian lydian mixolydian>" "[-14, <-9 -9 -10 -7 -7 -5>]"

d1 $ superimpose ((# s "superpiano") . (# gain 0.85)) $ slow 4 $ note melody # s "supersaw" # voice 0.2 # gain 0.6 # legato 1.1 # silence

d2 $ jux rev $ scramble "<4 8>" $ chop "<4 8>" $ s "tablex" # n (irand 3) # gain 0.9 # speed ((cycleChoose [1,1.2, 0.9]) * cycleChoose([-1])) # coarse (cycleChoose [8, 2,16]) # hpf (slow 6 $ range 200 1000 sine) # hpq (slow 4 $ range 0 0.4 sine) # silence

d4 $ s "glitch(12,16)" # gain 0.95 # n ((choose [3,2,6]) + 3) # legato 4 # silence

d5 $ note ((inside 4 (fast (cycleChoose [2,2,4,4,3])) $ "0 4 0 <7 12 10>") + melody + (cycleChoose [12, 24])) # s "supervibe" # gain 0.75 # legato 3 # coarse (cycleChoose [8,2,1,1]) # hpf (slow 4 $ range 440 2000 sine) # tremdp (slow 12 $ range 0 1.5 saw) # tremolorate (slow 8 $ range 0 15 saw) # hpq (slow 3 $ range 0 0.5 sine) # silence

do
  let melody = scale "<lydian lydian mixolydian>" "[-14, <-9 -9 -10 -7 -7 -5>]"
  d6 -- drumroll
    $ rarely (degradeBy "0 1!8")
    $ fast "<8!3 16>  [16 [32 16]]"
    $ s "dr"
  d7  -- Snares
    $ fix (# s "hh:8") (s "h")
    $ fix (# s "sn:10") (s "s")
    $ s "~ [s*[1|2] h]"
    # gain 0.7
  d8  -- Allez
    $ whenmod 16 12 (# gain 0)
    $ sometimesBy "0 0.5" (fast 2)
    $ s "k(5,8)"
    # s "jazz"
    # gain 0.7
  d9
    $ superimpose (
        (# s "supergong") . (|- gain 0.1) .
        (|+ note 12)
    )
    $ sometimes (off 0.5 (|+ note 5))
    $ off 0.25 (|+ note "<0 12>")
    $ slow 4
    $ note (melody - 2)
    # s "superfork" # gain 0.5


-- Changement de modes dans la progression harmonique
-- nice, jamais tenté auparavent
-- C du jazz maintenant lol
-- En tout cas de la muique msodale
--J'avoue c'est devenu etonnament harmonieux
