do
-- setcps (134/60/4)
-- resetCycles
setcps (112/60/4)
let width = pF "width"
let gMask = (midiOn "^41" (mask "t!3 <t!3 [f <t f>]>"))
let gMute = (midiOn "^73" (mask "f*16"))
let gMute2 = (midiOn "^74" (mask "f*16"))
let gMute3 = (midiOn "^75" (mask "f*16"))
let dMask = (whenmod 8 7 (mask "t t <t f> f"))
let gM1 = gMask . gMute
let gM2 = gMask . gMute2
let gM3 = gMask . gMute3
d1 $ gF1 $ gM2 
  $ midiOn "^42" (<| "k k k <k k*2 k <k [~ k] k*2 [~ . k*2 k*<1 2>]>>")
  $ midiOff "^42" (<| "k . <~!8 k!8> ~ ~ k")
  -- $ fix (|* gain 0.6) "jazz"
  $ "[jazz]"
  # gain 0.9
d2 $ gF1 $ gM1
  $ midiOn  "^43" ((whenmod 4 3 (superimpose (("e" <~) . ply "<1 2 [4 2] [8 4]>" . (|* gain 0.95)))) . (<| "~ s ~ s*<1 <2 [2 4]>>") . (# legato 0.5))
  $ midiOff "^43" (<| "~ <s <~ [~ s]>>")
  $ "vec1_claps" 
  # gain 1
  # room (slow 16 $ range 0 0.8 perlin)
  # sz 0.67 
  # dry 0.9
  # gain 0.8
  -- # att 0.03 # rel 2
d3 $ gF1 $ gM1 
  $ midiOff "^44" (mask "t(4,8,1)")
  $ "h*[<12 16 32 8> <8 [4 16]>]"
  # "drum:2"
  # gain 1.2
  # room 0.3 # dry 0.8
d4 $ gF2 $ gM3 
  $ midiOn "^57" ( 
    |+ note (arp "up" "<c'maj'4!8 g'maj'4!8> c'maj'4")
  )
  $ struct "t. t(<3 5 8>,8)"
  $ note "<d3 e3 fs3 e3>" 
  # "bassWarsaw" 
  # gain 0.8
  # room 0.4 # sz 0.4
d5 $ gF3 $ gM3 
  $ midiOn "^90" (ply "8 <8 16>")
  $ slice 8 ("<0 1 2 3 4 5 6 7>")
  -- $ loopAt 4
  $ "cricri:7" 
  # cut 5
  # gain 1.2
  # room 0.6 # sz 0.4 # dry 1.2
  # octersubsub 0.8
d11 $ gF3 $ gM3 
  $ ("s" ~>)
  $ slow 2
  $ "cricri" # n "<0 1 2 3>"
  # pan 0.3
d7 $ gF1 $ gM1
  -- $ fast 2 $ ply 2 $ slice 2 "<0 0 0 1>"
  $ juxBy 0.2 (rev)
  $ loopAt 2 
  $ chop 8
  $ "trance_loops:3" 
  # cut 8
  # room 0.4 # dry 0.9
  # att 0.24 # rel 2
  # gain 1
  # octersub (slow 16 $ range 0 1.9 saw)
  # pan (segment 16 $ range 0.07 0.93 (slow 4 perlin))
  # room (slow 16 $ range 0 0.9 saw) 
  # sz 0.8 # dry 0.9
d8 $ gF1 $ gM1
  $ fast 2 $ ply 2 $ slice 2 "<0 0 0 1>"
  $ loopAt 2  $ chop 8
  $ "jungle_breaks:16" 
  # cut 8
  # room 0.4 # dry 0.9
  # att 0.24 # rel 2
  # gain 0.8
  # pan 0.8
d9 $ gF3 $ gM3 
  $ slow 2 $ note "<a fs e fs>" 
  # "90s_glassatm:2" 
  # room 0.8 
  # gain 0.5
  # legato 2 # att 0.01 # rel 2
  # cut 9
  

d4 
  $ arp "up" $ slow 4 $  note (scale "indian" (run 8)) 
# "cricri:3" # gain 1.3 # cut 4
# lpf 400
# gain 2

once $ note "a" # "cpluck:" # cut 1
