-- Le jour te fatigue
-- La nuit te répare
do
setcps (90/60/4)
let scale = getScale (scaleTable ++ [("blues",[0, 3, 5, 6, 7, 10])])
let modIndex = pF "modIndex"
let gMask =  (midiOn "^41" (mask "t . <f t f <f t>> <t f f <t f>>"))
let gMute1 = (midiOn "^73" (mask "f*16"))
let gMute2 = (midiOn "^74" (mask "f*16"))
let gMute3 = (midiOn "^75" (mask "f*16"))
let gM1 = gMask . gMute1
let gM2 = gMask . gMute2
let gM3 = gMask . gMute3
d1 $ gMute2 $ gF1 -- Le pouvoir de voler
  $ midiOn  "^42" (<| "k k*<1!3 2> k <k k*2>")
  $ midiOff "^42" (<| "k . k(3,8)")
  $ fix (|* gain 1) "808bd"
  $ fix ((|* gain 0.8)) "909"
  $ "[jazz,909,808bd:4]"
  # gain 1.4
d2 $ gM1 $ gF1 -- Every superhero needs a clap
  $ midiOn "^43" (fast 2)
  $ "~ cp"
  # "h2ogmcp"
  -- # note (-2)
  # gain 1.1
d3 $ gM1 $ gF1 -- Gretsch frappe ton os pour le renforcer
  $ midiOn "^76" (fast "2")
  $ midiOn "^44" (fast "1 2")
  $ sometimesBy "^52" (ply "1 2 1 2")
  $ fix ((|* gain 0.86) . (# n "[4|5]")) "gretsch"
  $ "~ h ~ h ~ h ~ h*<1 2>" # "[hh,gretsch]"
  -- # midiG' "^80" 0 1.75
d4 $ gMute3 $ gF2 -- BASSLINE VOLTAIQUE
  $ midiOn "^57" ((|+ note 12) . (# legato 4))
  $ note ("<bf g bf g bf g bf c c!4 g bf c6@2>" - 24)
  -- $ note ("c6")
  # "90s_matrix:3"
  # cut 4
  # pan 0.3
  # gain 1
  # lesliebus 41 (range "-1" 1 "^17")
  # lrate (slow 4 $ "<[0.7 1.2!3] 2.4 4.8 6.7>")
  # lpf 5000
  # lsizebus 42 (range 1.9 6.7 "^33")
  # crushbus 43 (range 16 2 ("^53" - 0.1 * (fast 4 perlin)))
  # lpfbus   44 (range 12000 200 "^53")
  # room 0.2
d5 $ gM3 $ gF3 -- BLUES RUN
  $ someCyclesBy (range 0.95 0.05 ("^18!15 1")) (mask "t(3,8)")
  $ slice 16 (run 16)
  $ midiOn "^58" (striate 2)
  $ superimpose (# modIndex (range 0 96 "^34"))
  $ ply "1 4"
  $ note (scale "blues" (
    -- arp
    -- up, down, updown, downup, converge, diverge, disconverge, pinkyup,
    arp "<up pinkyup downup thumbupdown>" "[0,1,2,<3 4>,<4 <5 6>>]")
  + "0!3 <0!3 <1 3>>"
  - 24
  )
  # "FMRhodes1"
  # crushbus 5 (range 16 4.2 "^54")
  # gain 1.85
  -- # pan (slow 8 $ range 0.5 1 (saw - (slow 2 perlin)))
  # pan (slow 16 $ range 1 0.8 saw)
d7 $ gM3 $ gF2 -- G0dz1ll4
  $ midiOn "^59" (off 1 (
    (|+ pan 0.3)
    . (# cut 91)
    . (|+| note "[0|12]*8")
    . (|* gain 0.9)
    . (# squizbus 92 (range 0 10 perlin))
    ))
  $ "90s_matrix:1/4"
  # cut 9
  # gain 0.55
  # crushbus 9 (range 16 2.5 "^55")
  # roombus 91 (slow 16 $ range 0 0.82 perlin)
  # dry 2
  # sz 0.9
  # pan 0.7
  # gain 1.2

let scale = getScale (scaleTable ++ [("blues",["c", "ef", "f", "fs", "g", "bf"])])

-- REGION SANDBOX
once
  $ note (fastcat )
  # "FMRhodes1"


once $ "90s_weird" # cut 4

once $ "90s_matrix:3" # cut 1
