import Sound.Tidal.ParVagues.Control

setcps 0.5

d4 $ n "0 2 4 12" # s "midi"


do
let gDJF = (# djfbus 1 (range 0.1 0.9 "^49"))
let g = gDJF
d1 $ g
  $ midiOn "^73" (fast 2)
  $ midiOn "^41" (<| "k*<1!12 2!4> k*<1!8 2!8> k*<1!12 2!4> [<k ~ k k> <~ k>]")
  $ midiOff "^41" (<| "k*2")
  $ "[cpu2,jazz]"
  -- # att "^30"
  -- # rel "^50"
  # midiG' "^78" 0 2
  # room 0.2
  -- # crushbus 11 (range 16 0.95 "^14")
d2 $ g
  $ midiOn ("^75") (fast 2)
  -- FIXME(#94) d2 drives more controls than the grid gives it (BT2 only — BL1-3 are the family mutes). ^43 now belongs to another orbit, so this step STILL FIRES ACROSS COLUMNS — turning ^43 for its new owner also moves this. NOT commented out: this is a `$`-step and something above it is a partial application waiting for it, so removing it would stop the whole block compiling. Fold it onto d2's own control with gSel.
  -- FIXME(#94) d2 drives more controls than the grid gives it (BT2 only — BL1-3 are the family mutes). ^43 now belongs to another orbit, so this step STILL FIRES ACROSS COLUMNS — turning ^43 for its new owner also moves this. NOT commented out: this is a `$`-step and something above it is a partial application waiting for it, so removing it would stop the whole block compiling. Fold it onto d2's own control with gSel.
  $ midiOn ("^42"-"^43") (fast 2)
  $ "~ [cp,clap:1]"
  # midiG' "^79" 0 3
  # note (range "-12" "12" "^51")
  # room 0.4 # dry 0.98
  # crushbus 11 (range 16 1.95 "^15")
d3 $ g
  -- FIXME(#94) d3 drives more controls than the grid gives it (BT3 only — BL1-3 are the family mutes). ^76 now belongs to another orbit, so this step STILL FIRES ACROSS COLUMNS — turning ^76 for its new owner also moves this. NOT commented out: this is a `$`-step and something above it is a partial application waiting for it, so removing it would stop the whole block compiling. Fold it onto d3's own control with gSel.
  -- FIXME(#94) d3 drives more controls than the grid gives it (BT3 only — BL1-3 are the family mutes). ^76 now belongs to another orbit, so this step STILL FIRES ACROSS COLUMNS — turning ^76 for its new owner also moves this. NOT commented out: this is a `$`-step and something above it is a partial application waiting for it, so removing it would stop the whole block compiling. Fold it onto d3's own control with gSel.
  $ midiOn ("^43" + "^76") (
    const $ loopAt "<1!6 2 2>"
    $ someCyclesBy 0.2 (scramble 4)
    $ rarely (ply "2 <4 8>")
    $ slice 8 (run 8)
    $ "breaks165"
    # cut 3
    # note (range "-12" "12" "^31")
    # midiG' "^80" 0 1.8
  )
  $ rarely ("e" ~>)
  $ every' 4 3 (fast "<1 2> <2 4>")
  $ "[drum:2,tech:7]*8"
  # midiG' "^80" 0 1.9
d4 $ g -- Mecano Course
  $ midiOn "^76"  (
    slice 8 ("0*<1 2> 1 2 3*<2 1>")
    -- . (>| "breaks125")
    )
  $ midiOn "^44" (slice 8 "0 <1 ~> 7 3*<1 2 4 4>")
  $ sometimesBy "0 ^33!7" (shuffle 8)
  $ someCyclesBy "^32" (iter "1 4")
  $ chop 8
  $ loopAt 1
  $ "breaks125:3"
  # midiG' "^81" 0 1.2
  # cut 4
d5 -- Runny Maracas Pitchables
  $ g
  $ mask "t(16,32)"
  $ midiOn "^89" (ply "<2!3 4>")
  $ 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' "^82" 0 2
  # room "^33"
  # note (range "-24" "0" "^53")
  -- FIXME(#54) d5 drives more controls than the grid gives it (B5 + C5). ^54 now belongs to another orbit, so the line(s) below are COMMENTED OUT rather than left firing across columns. Nothing is lost — restore by removing the dashes once gSel folds this onto d5's own control.
  -- # crushbus 51 (range 16 4.2 "^54")
d6 -- Running Hats
  $ g
  -- $ degradeBy ("1 0 0 1!13" - "^52")
  $ midiOn "^58" (slow 2)
  $ midiOn "^90" (fast 2)
  $ "hh*[8 . 8 <16 8 4 [4 8]>]"
  -- # n "[0|0|0|0|1|1|3|3]*8"
  # midiG' "^80" 0 (1.7 + (slow 4 perlin/4))
  # room  (slow 8 $ range 0.2 0.45 saw)
  # sz    (slow 8 $ range 0.8 0.2 saw)
  # dry   (slow 4 $ range 0 2 perlin)
  # pan 0.6
  # cut 6





d8 $ g
  $ note (scale "aeolian" (iter 4 $ slow 4 $ arpeggiate "c'min'4") - 24)
  # "supersaw"
  # midiG' "^36" 0 1
  # crushbus 51 (range 16 2 "^56")

  # pan 0.2
  # velocity 0.9
  # room 0.4
