-- TODO: Chords might not be best when matched with samples
do
-- resetCycles
let slideTime = pF "slideTime"
let width = pF "width"
let cutoff = pF "cutoff"
let preamp = pF "preamp"
let detune = pF "detune"
setcps (80/60/4)
d1
  $ mask "<f!4 t!4 f!2 t!6 f!4 t!4>"
  $ whenmod 32 24 (fast "<2!6 4 1>")
  $ whenmod 32 16 (|* gain (slow 16 $ range 1 1.1 saw))
  $ "<[k . k(<3!3 5>,8,<0!8 3!8>)]!16 [k k k <k k*2>]!15 [k k(5,8)]>"
  # "[jazz,reverbkick]"
  # gain 0.65
d2
  $ fix (mask "<f!3 t f!3 t!21>" . (|* gain (range 0.8 0.95 saw))
  ) (n 1)
  $ fix (mask "<f!4 t!28>" -- Snare rolling
    . (|* gain 0.9)
    . (# cut 22)
  ) (n 2)
  $ fix (mask "<f!7 t!21>" -- Hats
    . (|* gain (slow 16 $ range 0.5 1.05 saw))
    . (|+ pan (sine/2)))
  (n 3)
  $ fix (mask "<f!4 t!28>" -- Snare contretemps
    . (|* gain 1.35))
  (n 6)
  $ n (stack [
    "~ 0 ~ <0 [~ 0*2]>",
    "1(<10 10 5 10>,16,<0!4 4!4>)",
    "~ 2*<1 2 4 [8 4]>",
    "3*[16 <4 8>]",
    "[~ 6(<1 2 1 3>,<1 8>,<0 2 0 0>)]*2",
    ""
    ])
  # "amencutup"
  # cut 2
  # gain 0.65
  # room 0.5 # dry 0.95 # sz 0.8
d3
  $ mask "<f!4 t!24>"
  $ whenmod 4 3 (ply 2)
  $ loopAt 2
  $ slice 4 (run 4) $ "fpiano:10"
  # n "<10!6 11!2>"
  # gain (slow 32 $ range 0.75 0.45 sine)
  # pan 0.8
  # cut 3
d4
 $ mask "<t!3 f t!24>"
 $ loopAt 2
 $ slice 4 (run 4) $ "fbass:10"
 # gain (slow 32 $ range 0.45 0.75 sine)
 # pan 0.1
 # cut 4
d5
  $ superimpose (
    slow 2
    . mask "<t!4 f!4 t!20>"
    . arpeggiate
    . (|+ note ("<c'major'4!3 <c'major'4 c'dim7'4>>" + 12))
    . (# pan 0.6)
    )
  $ note "<d e f g>"
  # "bassWarsaw"
  # octave 3
  # slideTime 0.99
  # width 0.12
  # detune (1 + ("<0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8>" / 20))
  # cutoff 300
  # preamp 10
  # pan 0.8
  # gain 0.8

solo 5

once $ arpeggiate $ note ("d3" + "c'major'4") # "moogBass" # gain 0.85
once $ arpeggiate $ note ("e3" + "c'major'4") # "moogBass" # gain 0.85
once $ arpeggiate $ note ("f3" + "c'major'4") # "moogBass" # gain 0.85
once $ arpeggiate $ note ("g3" + "c'dim7'4") # "moogBass" # gain 0.85
