setcps 0

-- Pray the Funk: choeurs laudatifs
-- Tags: Breakbeat, gospel, funk
resetCycles

do
  solo 1 -- Kick chaloupé
  solo 2 -- Tambours de Gretsch
  solo 3 -- AcceleRoll
  solo 4 -- Broken piece
  solo 5 -- Fragments of Wiley
  solo 7 -- Claps
  setcps (60/60/4)
  solo 10 -- NOISE
  d10 $ funk_noise
  d1
    -- KICK
    $ whenmod 8 6 (# silence)
    -- $ mask "t(11,12)" . fast "<2!6 4 2>" -- Folie
    -- $ "k . k(<3 5>,8)" -- L'intro TODO
    $ "k([1|2|5],8) . k(<3 5>,8)" -- Le classique
    -- $ "k*<1!8 2!8> . k(<0 1 0 1 3 5 5 8>,8,<0!3 2>)" -- L'annonce
    # "[reverbkick,<kick!8 ~!8>]"
    # lpf ("<5!3 <2 0.5>>" * 1000)
    # gain 0.65
  d4 -- BREAKBEAT
    $ slice 8 (
      -- "0 4" -- Intro
      -- "0 2 4 <4 <2 6>>" -- Intro
      -- "0 1 2 <3!2 ~ 3> 4 5 6 7*<1 <2 4>>"  -- Fulltime!
      "0 <1 1(<3 5>,8,<0 4>)> 2 3(<3 5>,8)" -- Laggy
      -- "4*2 5 6(3,8) <[~ 7] 7?>" -- Laggy end
      -- (fast "<4 8>" $ run 2)  -- Repeat! TODO Transition grace
    )
    $ loopAt 1
    $ "break:1"
    # gain (
      slow 32 $ range 0.35 0.7 saw
      -- 0.65 -- TODO Fulltime post-intro
      )
    # cut 4
  d2 -- Snares gretscha
    $ someCycles (
      (whenmod 16 8 (# lpf (slow 8 $ range 15000 1000 saw)))
      . hurry 2
      . (|* gain 0.9)
    )
    $ fast 2
    $ n ("6(<4 <3 5>>,8)")
    # "gretsch" # gain (slow 16 $ range 0.6 0.8 saw)
  d3
    $ someCycles (fast "1 . 2 4")
    $ "gretsch*<8!3 [16 . [16 | 32]]>" # n "[4|5]"
    # note ("<-2 -4 -2 0>")
    # gain 0.75
  d5 -- Fragments of Wiley
    $ "pray" -- TODO INTRO then /4
    # n "<0!4 1!8>"
    # gain (slow 8 $ range 0.5 0.75 sine)
    # cut 5
    -- |> gain 0.5 # lpf 200 # waveloss 65  -- TODO INTRO WAVELOSS/gain 65 45 25 12.5
  d7
    $ fast 2
    $ whenmod 32 16 (whenmod 4 3 (ply "<2 3 [2 4] [3 2]>"))
    $ whenmod 16 8 (every' 4 0 (off "-0.125" id))
    $ s "clap"
    # gain 0.75
    # djf (slow 32 $ range 0.5 0.85 sine)
    # room 0.5 # size 0.4 # dry 0.95

    resetCycles







-- SANDBOX

  d6 -- Transipiano
    $ slice 4 (cat [
      -- "2*4 3*2 . 0*2 1",
      "0!2 ~ 3 0!2 ~ 3"
    ])
    $ s "fpiano:6" # cut 6 # gain "<0.5 0.55 0.6 0.65>"

  d6 -- Bassline (FIXME improve sonorite/variations)
    $ superimpose (
      arp "<up pinkyup>" . (# octave 6)
        . (|* gain 0.9)
      )
    $ note (
      ("[a2 <g2 <b2 e3>>]!2") + "[0,4,7]"
    )
    # "bassWarsaw"
    # pan 0.4
    # gain 0.9
