once "dr*8"

-- region Mad Funk: joyeuse intro techno-funk, partant run 160bpm
-- Tags: Techno, run, funk, crushade
-- Ready: 9.5/10
resetCycles
-- endregion

do
  solo 1 -- Kick
  solo 2 -- Snare roll/rush
  solo 3 -- Drumroll
  solo 4 -- Bassline
  solo 5 -- Guitare intro/pompe
  unsolo 6 -- Epiano groovy
  solo 7 -- Claps from grace
  let bpm = 80 -- Que tu crois!
  setcps (bpm/60/4)
  solo 10 -- NOISES
  d10 $ funk_noise
  d1
    -- $ every' 8 7 (# lpf 200)
    -- region Pauses Hip-hop
    -- $ whenmod 8 6 (juxBy 0.5 rev)
    -- $ "k . k(<3 <5 4>>,8)" -- Le simple
    -- $ "k*<1!4 2!4> . k(<3!3 <5 8>>,8)" -- L'agité
    -- region hardkick
    -- $ whenmod 32 0 (
    --   superimpose (
    --     (# "hardkick:4")
    --     . (sometimesBy "<0!3 0.5>" (stut 2 0.8 "s"))
    --     . (# legato 0.9)
    --     -- . (# note (-4))
    --     . (|* gain 0.65)
    --     )
    -- )
    -- region INTRO/Run
    -- $ slow 2 -- intro
    -- $ whenmod 8 6 (# silence)
    $ "k k k k k k k <k [~ k]>"
    # "[jazz,tech:6]"
    # gain 1.1
    # pan 0.45
  d2
    $ slow 2
    $ someCycles (hurry 2)
    $ juxBy 0.75 (rev . sometimes (mask "t(16,16)" . ply 2))
    -- region Manual snare rush
    $ "~ s*<1 <2 <4 <8 [8 16]>>>>"
    # "snare:3"
    # note ("<0 -1 -2 -3>")
    # gain 0.9
    # pan (slow 8 $ range 0.4 0.8 sine)
  d3 -- Drumroll
    -- $ slow 8 -- TODO IN/OUTRO
    $ fast (slow 8 "<1 [2 [2|4]] 4 [4 8]>" )
    $ ply "2 <4 8>" $ "drum:8"
    # gain (slow 4 $ range 1.2 1.3 saw)
    # pan (slow 8 $ range 0.2 0.6 cosine)
  d4  -- Bassline
    $ juxBy 0.5 id
    $ slow 2
    -- $ whenmod 16 8 (
      -- region reverse cowgirl
      -- sometimesBy "0 1" rev)
    $ slice 8
    (
      -- iter (slow 2 "<2 4>") $
      -- run 8 -- Classique: jumpy groovy
      "0*4 <1 2 3> <2 3 1> <1 2 3> 4 5 6 7*2"-- HAVE FUN
      -- "<0!3 1>*2 3*2 <0 1> 4*<2 4 8>" -- Jumpy rappel
      -- "<0 4 0 0*2> 4 <0 1 2 3> <0 4!2>" -- Attente
      -- "<0!3 <1 2>>*8" -- COME ON CRUSH
    )
    $ "fbass:8"
    # legato 1
    -- # crush (3.5 + "6 <5 4>") -- CRUSH THIS
    # gain 1
    # pan 0.6
  d5 -- Guitare pompe
    -- region Guitare pompe
    $ slice 8 (cat [
      "0*4",
      "0 1 2 3",
      "0*4 1 3(3,8) 5",
      "4 5 6 7",
      "0 7 4 7",
      "[0 4]*4",
      "7 <7 6> <3 5> <7 4>",
      "4*4 . 4*<8 16>",
      "7 0 7 0",
      "0*4"
    ]) $ n 9
    -- region INTRO-guitar
    -- $ slice 8 ( -- Intro
      -- "0(<1 4>,<1 4 8>) . [1*<1 2 4>, 3(<1 3 5>,8)]"
    -- ) $ n 11
    # "fguitar"
    -- # crush 5.5 -- TODO CRUSH THIS! 12 - 4 - 5
    # cut 8
    # gain (slow 64 $ range
      -- 0.7 0.9
      1.2 1.4
    cosine)
    # pan 0.3
  d6 -- Epiano groovy
    -- $ whenmod 32 16 (whenmod 4 2 (jux rev)) -- TODO variations once introduced
    $ slow 2
    -- $ mask "f(<1!16 2!16>,2,<1!4 0!4>)" -- TODO INTRO MASK THIS
    $ slice 8 (
      "0 3 2 1 4 5 6 7*<1 2>" -- regulier
      -- "0 3 2 1 0 3 <2 6> 7" -- variant
      -- "3*4 <0 5> 0 <3 4>*2 0*2 5 0 4" -- TODO FREESTYLE
      -- "3*4 <0 5> 0 <3 4>*2 0*2 5 0 4" -- TODO FREESTYLE
      -- "0 1 2 [3*<4 2>]!4 [5 <4 5>]"
      -- "2*4 3*4 5(3,8)"
      -- "0 3 2 1!5" -- repeat aigu
      -- "5!7 7" -- END OF FILE
      -- "4!5 5 6 7*<1 2>" -- repeat end
    )
    $ s "fepiano"
    # n (slow 8 "<24 25>")
    # gain 0.9 -- 0.99 -- TODO OUTRO 0.7 0.67 0.57 0.47 0.37
    # cut 6
    # pan 0.7
  d7 $ fast 2 $ s "clap"
    # lpf 2000
    # gain (slow 16 $ range 0.8 1.1 saw)
    # room 0.4
