-- Hip-hop pensif, majeur, triomphal sur la fin


setcps 0.5

do
  d1 -- beat hip-hop
    $ whenmod 16 12 (# gain 1.3)
    $ whenmod 16 11 (# gain 1)
    $ whenmod 16 8 (# gain 0)
    -- $ s "k k k [<k k?> <~ k>]" -- techno!#
    $ every' 8 6 (degradeBy "0 1 . 1 . 1") -- Hip hop!
    $ s "b ~ b b ~ b b ~"
    # s "electro1:5"
    # pan (slow 4 $ "<0.45 0.55>")
  d2 -- Snares bruités
    $ every' 8 6 (degradeBy "<1 0>")
    $ every' 8 3 (degradeBy 0.9)
    -- $ jux rev
    $ sometimes (off (1/16) id)
    $ s "~ <~ <t? t>> ~ t"
    # s "snare:1"
    # gain (slow 16 $ "<0.6 0.7>")
  d3 -- Drums
    $ fast "<[2|4]!3 8> . <[8|16]!3 8> <4 4 8 16>"
    $ s "drum:8"
    # gain (slow 16 $ 0.5 * sine + 0.75)
  d4 -- 80s Break drums
    $ juxBy 0.25 rev
    $ degradeBy "<1 1 1 <[1 0.8 0.2 0] 0>>"
    $ s "~ electro1(6,8)"
    # n (choose [2,3,4])
  d5 -- basse
    $ whenmod 64 32 (# gain (slow 32 $ sine * 0.3 + 0.6))
    -- $ whenmod 32 0 (# crush 8) -- pont electrique!
    $ every' 8 0 (degradeBy "0 0 0 1")
    $ superimpose ((arp "<up down updown downup>") . (# gain 0.9))
    $ whenmod 8 3 (fast 2)
    $ whenmod 8 0 (slow 2)
    $ note (scale "major" "<[0, 7, 9, 11] [-3, 6, 8, 11] [-4, 5, 7, 10] [-6, 5, 7, 10]>"
    )
    # s "bassWarsaw"
    |- note 32
    # gain 0.9
    # pan 0.35
  d6 -- piano triomphal
    $ degradeBy "0 0.75!2 0"
    $ whenmod 64 63 (degradeBy "0 0.25 . 0.75 1")
    $ whenmod 64 59 (|+ velocity 0.1)
    $ whenmod 64 54 (|- velocity 0.1)
    $ whenmod 64 48 (|+ velocity 0.1) -- pont octave!
    $ degradeBy (slow 64 $ sine * 0.5)
    $ note "[0 0? 0]*4"
    # note (scale "major" "<[0, 7, 9, 11] [-3, 6, 8, 11] [-4, 5, 7, 10] [-6, 5, 7, 10]>"
    )
    # s "superpiano"
    # velocity 0.55
    # sustain ("[0.5 0.5 <0.05 0.15>]*4" + (rand * 0.15))
  d7 -- quinte complement 1 3 56 8
    $ note ("[0,5]" -- quinte
    + "0 0 . 0 0 ~ 0 " -- rythme
    + "<7 7 5 5>" -- variations
    - 12
    )
    # s "superpiano"
    # velocity 0.35
    # sustain 1
    # room 0.2
  d8 -- Choeurs <3
    $ every' 4 3 (arp "<down up downup updown>")
    $ note (scale "major" "<[0, 7, 9, 11] [-3, 6, 8, 11] [-4, 5, 7, 10] [-6, 5, 7, 10]>"
    )
    # s "moogBass"
    |- note 12
    # gain 0.8
  d9 -- Cymbale
    $ whenmod 16 14 (sometimesBy "0.6 0.7 0.8 0.9" (#s "hh:10"))
    $ sometimesBy "0 0 0 0.05" (#s "hh:8")
    $ s "h(3,8) h(3,8,<0 <2 4>>)"
    # s "hh"
    # gain (slow 16 $ sine * 0.6 + 0.6)
  d10 -- background voice "You"
    $ superimpose (chop 8 . (# crush 5) . (# sustain 2) . (# room 0.4))
    $ note "0/4"
    # accelerate (slow 4 $ "<0 <0.2 -0.1>>")
    # s "alphabet" # n (slow 4 $ "20")
    # gain 0.5
  d11  -- claps
    $ s "~ c ~ <c!2 c? c*2>"
    # s "clap"
    # gain 0.7