-- Solar - breakbeat nostalgic playground


do
setcps (110/60/4)
let modIndex = pF "modIndex"
let gDJF1 = (# djfbus 1 (range 0.02 0.98 "^49"))
let gDJF2 = (# djfbus 2 (range 0.05 0.95 "^50"))
let g1 = (gDJF1)
let g2 = (gDJF2)
let mBreak = (midiOn "^41" (mask "t f . f <f!4 t!4> <f!2 t!6> t"))
let mDegrade = (midiOn "^73" (chop 4))
let m = mBreak . mDegrade
d1 $ g1 $ m --
  $ mask "<f!4 t!12>"
  $ fix ((# cut 1). (|* gain 0.85)) ("808bd")
  $ midiOn "^42" (<| "k k k <k [<~ k> k]>")
  $ midiOff "^42" (<| "k . ~ <k k ~ ~> k*<1!3 2 2 2 1 2> <~ ~ k <k ~>>")
  $ "[jazz,808bd:1,hh:5]"
  # midiG' "^78" 0 1.7
d3 $ g1 $ m -- Snare
   -- $ mask "<f!3 [f t] t!8 [t f]!4>"
   -- $ fast "<1!4 2!10 4 [4 8]>"
   $ s "~ s ~ s"
   # "sn"
   # speed (range 0 2 "^51")
   # n "[14,20]"
   # note "<0!7 -4>"
   # midiG' "^79" 0 1.4
d2 $ g1 $ m -- BREAK
  $ midiOn ("^44" - "^76") (ply 2)
  $ midiOn "^76" (striate 4)
  $ loopAt 2
  $ whenmod 8 6 (off "h" id . mask "t . f")
  $ slice 8 (run 8)
  $ "break:11"
  # hpf 500
  # speed (range 0 2 "^52")
  # octerbus       20 (range 0 0.5 "^32")
  # octersubbus    21 (range 0 1.2 "^32")
  # octersubsubbus 22 (range 0 1.2 "^32")
  # midiG' "^80" 0 1.9
  # cut 2
d4
  $ whenmod 4 3 (off "q" id)
  $ midiOn "^57" ((
    (|+| note (
    arp "<up!8 converge!7 diverge>"
    "c'maj'8" - "[0,12]")
  )))
  $ rev
  $ struct "~ t"
  $ slow 4
  $ arpeggiate
  $ note "e3'maj"
  # "bassWarsaw"
  # crushbus 51 (range 16 4.6 "^53")
  # midiG' "^81" 0 1.25
  # pan 0.2
d5 $ g2
  $ midiOn "^58" (superimpose (
    (sometimesBy "0!3 0.45" (ply 2)) .
    (|+| note (
    arp "<up!8 converge!7 diverge>"
    "c'maj'8" - "[12 24]*2")
  )))
  $ struct "~ t"
  $ slow 4
  $ arpeggiate
  $ note "e3'maj"
  # "FMRhodes1"
  -- # room "<0.4!3 0.7>"
  # pan 0.8
  # modIndex (range 0 128 "^34")
  # crushbus 51 (range 16 4.6 "^54")
  # midiG' "^82" 0 2
d9 $ g1 $ m
  $ midiOff "^60" (mask "<f!8 t!124>")
  $ midiOn "^92" (<| "[~ c]*[4 <4 8 4 [8 4]>]")
  $ midiOff "^92" (<| "~ c")
  $ "clap"
  # speed (range 0.5 1.5 "^56")
  # midiG' "^84" 0 1.0




-- REGION BACKYARD

d8 $ g2 -- FIXME REMOVE OR SAVE
  $ whenmod 8 4 (rarely (striate 2))
  $ whenmod 16 8 (sometimesBy "0 1" rev)
  $ midiOn "^59" (
    slice 2 (run "<2 1 2 4 1 4 6 16>")
  )
  $ loopAt 2
  $ "forgan:2"
  # midiG' "^83" 0 1
  # crushbus 8 (range 16 1.5 "^55")
  # cut 8
  # pan 0.8

d7 $ g -- Hello PWM!
  $ (|* gain "<1!15 0.8>")
  $ midiOn "^57" (chop "<[8 <4 16>]!15 1>")
  $ midiOn "^89" (superimpose $ segment 16)
  $ note (mel - 12)
  # "superpwm"
  # semitone "<7!3 5>" -- 2nd Oscillator quinte/quarte
  # accelerate "<0!7 <6 12>>"
  # rate "<1!5 2 4 <1 4>>"
  # resonance (slow 32 $ range 0.2 0.6 sine)
  # crushbus 71 (range 10 3 "^53")
  # midiG' "^81" 0 1.42


d7 $ g2 -- Back bows: dissonant now, not the best angels I ever saw
$ superimpose ((# cut 71)
. (# n 3)
. mask "t(<1 1 0 [3 <3 1>]>,8)"
)
$ someCyclesBy "<f!4 t!3 g>" rev
$ struct "t(<1 <3 5>>,8)"
$ arp "up"
$ note "<e'maj'4!3 b'maj'4!4 e'maj'4>"
# "cbow"
# n "0"
# midiG' "^83" 0 0.7
# room 0.3
# pan 0.7
# cut 7
-- Funky Bassline: not convicned?
d4 $ g $ m
$ striate 2
$ loopAt 2
$ slice 8 (run 8)
$ "fbass:3"
# midiG' "^81" 0 1.4
# crushbus 4 (range 16 1.5 "^53")
# cut 4
# pan 0.2


d6 $ g -- Nappes Rhodes
  $ note (
    prog
    + "0 12"
  )
  # "FMRhodes1"
  # pan 0.2
  # modIndex (range 0 100 "^54")
  # crushbus 61 (range 16 5 "^34")
  # midiG' "^82" 0 1.5
d9 $ g
  $ midiOff "^60" (mask "<f!8 t!124>")
  $ midiOn "^92" (<| "[~ c]*[4 <4 8 4 [8 4]>]")
  $ midiOff "^92" (<| "~ c")
  $ "clap"
  # speed (range 0.5 1.5 "^56")
  # midiG' "^84" 0 1.7



d1 $ "jazz*4" # gain 0.6
d3 $ note (scale "aeolian" "2 0*<1 2> 3 <5!3 5(3,8,<0 4>)>"
  + "[0,7]")
  # "bassWarsaw"
  # tremolodepth 12
  # tremolorate 4
  # gain 0.75 # octave 4
