-- Tentative SynthWave #2
-- Docs:
-- https://recording-voice.com/how-to-make-synthwave/
-- https://www.orpheusaudioacademy.com/synthwave-chords/

-- Noises pacman-like
"tacscan:4"

"electro1:2" -- Drums 80s
"electro1:3" -- Drums 80s

once $ "electro1:1" # gain 1.5

do
let modIndex = pF "modIndex"
let f1 = (# djfbus 1 (range 0.15 0.85 "^49"))
let f2 = (# djfbus 2 (range 0.15 0.85 "^29"))
let mBreak = (midiOn "^41" (mask "t f . f <f!4 t!4> <f!2 t!6> t"))
let m = mBreak
setcps (110/60/4)
d1 $ f1
  $ midiOn "^41" (fast 4)
  $ "[jazz,bd]"
  # midiG' "^78" 0 1.8
d2 $ f1
  $ whenmod 8 6 (superimpose (const
    $ n "~ 2*<1 2> ~ <2 2*2 3 [3 2]>"
    # "electro1"
    # midiG' "^79" 0 1.8
  ))
  $ "~ snare:20"
  # midiG' "^79" 0 1.8
d3 $ f1
  $ "t*[16!3 <8!3 16>]"
  -- $ "t*[<4!4 8!4> <8!3 [16 <16 8>]>]"
  # "[tek_hh:1,drum:2]"
  # midiG' "^80" 0 1.4
d4 $ f2
  $ superimpose (
    (# cut 4)
    . (|+| note ("12 <7!3 9>" - 12))
  )
  $ midiOn "^57" (chop 8)
  $ note "<d4 d4 e4 f4 d4 d4 g4 f4>"
  # "supersaw"
  # octave 4
  # voice 0.05
  # crushbus 4 (range 16 2 "^53")
  # midiG' "^81" 0 1.3
d5 $ f2
  $ note "<d'min d'min d'7sus2 d'min d'min d'min d'7sus2 d'min d'7sus2 d'7sus2 d'min d'7sus2 d'min d'min d'7sus2 d'min>"
  # "FMRhodes1"
  # modIndex (range 0.1 32 "^54")
  # crushbus 5 (range 10 2 "^34")
  # midiG' "^82" 0 1.8
  # pan 0.8



d4
  $ "moog/2" # n "<2!4 5!4>"
  # cut 4
  # legato 2
  # gain 0.4


d5
  $ "fsynth/2" # n "<13>"
  # cut 5
  # gain 0.8