import Sound.Tidal.ParVagues.Control


do
let modIndex = pF "modIndex"
let g = (midiDJF "^49" 150 9850 0 1000)
setcps (60/60/4)
d1 -- Snare
  $ g
  $ midiOn "^41" (fast 2)
  $ "k k k <<k ~> k>"
  -- $ "k . k"
  # "[jazz,cpu]"
  # midiG' "^78" 0 0.9
d2 -- Snare
  $ midiOn "^41" (fast 4)
  $ g
  $ midiOff "^41" (slow "<2!16 1!16>" )
  $ "~ [snare:20,clap]"
  # midiG "^79"
  # room 0.8 # sz 0.8 # dry 0.99
d3 $ g
  $ often (fast "1 2")
  $ fast "4 . 8"
  $ "drum:2"
  # midiG "^80"
d4 $ g
  $ whenmod 8 6 (off "q" (fast "<1 2>"))
  $ midiOn "^76" (slice 8 ("0 1 2 3*<8!3 [8 4]>"))
  $ midiOn "^44" (off "h" id . mask "t f")
  $ slice 8 (run 8)
  $ loopAt 2
  $ "break:3"
  # panbus 4 (range 0.2 0.8 perlin)
  # cut 4
  # midiG' "^80" 0 1.1
d5 -- Bassline
  $ g
  $ midiOn "^57" (-- + Arps aigus!
    superimpose (
      often (off "h" rev)
      . (|+ note (
        "[0 <12 <12 24>>]" -- spread
        + "0(5,8)" |+ "0 [7 12]"
        -- + 12
      ))
      . (# crushbus 51 (range 12 1.85 "^53"))
    )
  )
  $ note ("d . ~ <c(3,8)!4 [c(2,3),d(2,4,1)]!4>")
  # octave 3
  # "bassWarsaw"
  # crushbus 5 (range 10 5 "^53")
  # room 0.5
  # sz 0.4
  -- # pan 0.21
  # midiG' "^81" 0 1.2
d6 $ g
  $ off "e s" (|+ note 7)
  $ note "<d d f g d d f d g g f g d d b d>(3,8)"
  # octave 3
  # modIndex "[0,5]"
  # "FMRhodes1"
  # crush (range 10 4.8 "^54")
  # midiG' "^82" 0 1.4
d7 $ g
  -- $ slice 8 ("7*4")
  $ note "<<c'min c'six> c'min7>"
  # "brass:20"
  # midiG "^83"
d8 $ g -- Da Bogdan MOFO
  $ "bogdan:9"
  # waveloss (slow 24 $ range 0 60 sine)
  # hpqbus 8 (range 0 0.5 cosine)
  # lpqbus 8 (range 0 0.5 sine)
  # crush (slow 16 $ range 16 2.5 perlin)
  # cut 8
  # gain "^56"

  once $ "dr" # gain 1
