import Sound.Tidal.ParVagues.Control

linput = pI "linput"
lname = pS "lname"

once $ qtrigger 1 $ "looper" # n "<0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15>" # lname "mojo"

do
setcps (122/60/4)
d1 $ "jazz*4" # gain 0.9

-- Hello Parov!
d10 $ "mojo:5"
  # gain 1.2


do
let pontH = (someCyclesBy "<0!32 1!8 0!24>" (# hpf (slow 8 $ range 0 500 saw)))
let pontL = (whenmod 16 12 (# lpf 2000))
let toPontL = (every' 16 11 (# lpf 5000))
let chords = "<c'min'2!4 c'maj'2!4>"
let prog = ("<cs5!4 a4 a4 b4 gs4>")
let chorus = pF "chorus"
let mix = pF "mix"
let modIndex = pF "modIndex" -- 0.2
let gG a = (gain (1.2 * "^77" * a)) -- gain Global
let gM' l h a = (gG (range l h a)) -- gain Modéré
let gM a = (gM' 0.2 0.8 a) -- gain Modéré doux
let gDJF = (# djfbus 1 (range 0.05 0.95 "^49"))
let gFreqL = (# lpq (range 0 0.25 "^29"))
let gFreqH = (# hpq (range 0 0.25 "^30"))
let gFreqs = (gFreqH . gFreqL)
let g = (gDJF . gFreqs)
setcps 0.5
d1 $ g
  $ midiOn "^41" ( -- KICK RUN
    ((>| "[reverbkick,kick:5]*<4 4 4 [4!3 8] 4 4 2 <2 [2 8]>>")
    . (|* gain 0.8)
    )
  )
  $ midiOff "^41" (<| "[k([1|<3!3 5 [3 8]>],8)]*<1!16 2!16>")
  $ "jazz"
  # midiG' "^78" 0 1.4
d2 $ g  -- Breathing snare contretemps
  -- $ midiOn "^43" (fast "<2 2 2 2 4 2 2 4 4>")
  $ "[hh27:2 hh27:7,~ snare:30]"
  # room 0.6 # sz 0.7 # dry (slow 20 $ range 0 2 perlin)
  # midiG' "^79" 0.5 1
d3 -- Runny Maracas
  $ g
  $ whenmod 16 8 (often $ fast 2)
  $ someCyclesBy "<1!16 0!16>" (often $ slow "2!3 1")
  $ fix ((|* gain 0.9) . (# release 0.8)) (n 9)
  $ "hh27*8"
  # n "2 <2 <[2|9] [9 <9 ~> <~ 9> 2]>>"
  # midiG' "^80" 0.5 1.17
d6 $ g -- Hello Parov! Piano
  $ n "3"
  |>| note (
    "0 <7 12>*<1 2 4 1>"
  )
  -- |>| n "3 [4 ~]"
  # "mojo"
  # cut 6
  # midiG' "^81" 0.5 1.5
d7 $ g -- Hello Parov! Piano2
  $ midiOn "^58" (|+| n ("0*<1!4 2!3 4 4 4 8 16>"
  ))
  $ "mojo" # n "<6 7>"
  # cut 7
  -- # begin "0.15"
  # pan 0.8
  # midiG' "^82" 0.5 1.5
