-- Softer version via Roberta Flack

k 1/8
hh 8/8

resetCycles

do
setcps (72/60/4)
let gF1 =  (# djfbus 1 (range 0.05 0.95 "^49"))
let gF2 = (# djfbus 2 (range 0.05 0.95 "^50"))
let gF3 = (# djfbus 3 (range 0.05 0.95 "^51"))
let gMask = (midiOn "^41" (mask "t . <f t f <f t>> <t f f <t f>>"))
let gMute = (midiOn "^73" (mask "f*16"))
let gMute2 = (midiOn "^74" (mask "f*16"))
let gM = gMask . gMute
let gM2 = gMask . gMute2
let modIndex = pF "modIndex"
d1 $ gF1 $ gM -- Kick
  $ midiOn "^42" (struct "t . ~ t ~ <~!7 t>")
  -- $ struct ("t <t!3 [~ t]> t <t!6 ~!2>") -- RUN!
  $ "cpu"
  # midiG' "^78" 0 1.2
  # pan 0.8
d2 $ gF1 $ gM2  -- Snare
  $ midiOn  "^43" (struct "~ t ~ t")
  $ midiOff "^43" (struct "~ . t")
  $ "808sd:6" -- "snare:5"
  # release 0.4
  # att 0.02
  # midiG' "^79" 0 1.5
d3 $ gF1 $ gMute -- Hats complément
  $ midiOn "^44" (fast 2)
  $ midiOn "^76" (ply "<2 4>")
  -- $ "~ h ~ <h!3 ~> ~ <~!8 h!8> ~ h"
  $ "h h h h" # "cpu:4"
  -- # "snare:51"
  # att 0.0125 # rel 2 # hpf 3000
  # pan 0.7
  # midiG' "^80" 0 1
d8 $ gF3
  $ midiOn "^92" (ply 8)
  $ midiOn "^60" (>| "break:22")
  $ loopAt 2 $ chop 4 $ "break:21"
  # midiG' "^84" 0 1
  # cut 8
d4 $ gF2
  $ midiOn "^57" (struct "t(3,8)" . arpeggiate . (# legato 2) . (# room 0.2) . (# size 0.8))
  -- $ note (slow 2 "<[c4, e4, a4] [g3, b4, d4]>")
  -- TODO: Try with just the fundamentals:
  -- "e3 a3 d3 g3 e3 a3 d3 c3 g2 c3 f3 e3" -- 12 Chorus
  -- "e3 ~" -- Bridge x2 -- OR SILENT?
  -- "a3 d3 g3 c3 a3 d3 e3 e3 a3 d3 g3 b2" -- 12 Verse
  -- Pasted: Chorus/Bridge/Verse/Chorus/Bridge2/Verse/Chorus/Bridge8
  $ midiOn "^89" (chop 8)
  -- $ note ("<e3 a3 d3 g3 e3 a3 d3 c3 g2 c3 f3 e3 e3 ~ a3 d3 g3 c3 a3 d3 e3 e3 a3 d3 g3 b2 e3 a3 d3 g3 e3 a3 d3 c3 g2 c3 f3 e3 e3 ~ a3 d3 g3 c3 a3 d3 e3 e3 a3 d3 g3 b2 e3 a3 d3 g3 e3 a3 d3 c3 g2 c3 f3 e3 e3 ~ e3 ~ e3 ~ e3 ~>")
  -- TODO: Move along new fundamentals
  -- Mapping to: F G Ab Bb C Db Eb
  -- Map   from: E Ff G A B C D
  -- FIXME: Remove/replace intro sync
  -- let introSync = "bf4 ef4 af4*[4 8]"
  $ note ("<bf4 ef4 af4*[4 8] f3 bf3 ef3 af3 f3 bf3 ef3 df3 af2 df3 gf3 f3@2>")
  # "bassWarsaw"
  # legato 1
    -- # cut 4
  # midiG' "^81" 0 1


-- TODO: Add the bass gimmick on 7/8th bars

resetCycles

-- Chorus 12
-- Bridge 2
-- Verse 12
-- Chorus 12
-- Bridge 2
-- Verse 12
-- Chorus 12
-- Bridge 8
-- Chorus 12
  -- # cut 4


do
-- Chorus
-- Alternate 2xMain 2xAlt chords for 8 bars
let chorusMainArp = "[a c e g]"
let chorusMainChord = "[c4, e4, a4]"
let chorusAltArp =   "[g fs a c]"
let chorusAltChord = "[g3, b4, d4]"
once $ note chorusMainChord
  # "bassWarsaw" # gain 0.7

g c f f
let

fs
a
g
b
d
g

--

-- FIXME: Adapt or remove former copy-pasted content
do
setcps (92/60/4)
let gF1 =  (# djfbus 1 (range 0.05 0.95 "^49"))
let gF2 = (# djfbus 2 (range 0.05 0.95 "^50"))
let gMask = (midiOn "^41" (mask "t . <f t f <f t>> <t f f <t f>>"))
let gMute = (midiOn "^73" (mask "f*16"))
let gM = gMask . gMute
let modIndex = pF "modIndex"
d1 $ gF1 $ gM -- Kick
  $ midiOn "^42" (struct "t . ~ t ~ ~")
  -- $ struct ("t <t!3 [~ t]> t <t!6 ~!2>") -- RUN!
  $ fix (|* gain 0.7) "jazz"
  $ fix ((|* gain 0.7) . (# "jazz") . (# n "<4 4 <3 3 4 4> 3>")) "sub"
  $ "[808bd,<808bd:4!2 808bd:3!2>,jazz]"
  # midiG' "^78" 0 1.2
  # pan 0.8
d2 $ gF1 $ gMask -- Snare
  $ midiOff "^43" (struct "~ ~ ~ t")
  $ midiOn  "^43" (struct "~ t ~ t")
  $ "808sd:6"-- "snare:5"
  # release 0.4
  # att 0.02
  # midiG' "^79" 0 1.5
d3 $ gF1 $ gMute -- Hats complément
  $ midiOn "^76" (ply "<2 4>")
  $ "~ h ~ <h!3 ~> ~ <~!8 h!8> ~ h"
  # "snare:51"
  # att 0.0125 # rel 2 # hpf 3000
  # pan 0.7
  # midiG' "^80" 0 1
d4 $ gF2 $ gMute -- Hats pirouette
  $ mask "<[t f] t>"
  $ "~ . [s [~ s] s ~ . ~]"
  # note "0 . [[0 [2 0] 0] . 0]"
  # "snare:51"
  # midiG' "^80" 0 0.8
  # pan 0.65
d5 $ gM $ gF2  -- BASSLINE!
  $ midiOn "^58" (|- note 24)
  $ mask "<t!3 t(<1 8>,8)>"
  $ midiOn "^90" ( -- FIRELINE
    off 0.5 (
      -- (# crush 6) .
  (|- note 12)
  . (# cut 51)
  . (# pan 0.8)
  . (# room 0)
  . (|* gain 0.9)
  ))
  $ note ("<e a4 d <g4 [c ~]>>"
    + "0 . [-2 0@3]" -- Algoritmic addition
    - 0) -- Scholar :nerd:
  -- $ note ("<e e e c>@6 d@2" - 24) -- Nice but is that it?
  # "FMRhodes1"
  # cut 5
  # legato 2
  # room 0.64 # sz 0.5 # dry 1
  # pan 0.2
  # midiG' "^82" 0 1.6
  # modIndex (range 0 2 "^54")
d6 $ gM $ gF1
  $ fix (|* gain 0.7) "cpu"
  -- $ sometimesBy "0 0.25" (mask "t . t(<3 5 8 1>,8)")
  $ "[hh,cpu:1]*8"
    # rel 0.5
    # att 0.5
    # lpf 6000
    # room 0 # dry 0
    # midiG' "^83" 0 1.6



d7
  $ midiOff "^91" (mask "f")
  $ note ("c" -7)
  # release 2
  # att 1
  # "pad:2"
  # midiG' "^83" 0 1
  # cut 7

once $ "organDonor" # cut 7 # gain 1.4

once $ "ikedaBass" # gain 2

d8 $ gM $ gF1
  $ midiOn "^92" (ply "<2!3 [<4 1> 1]>")
  $ chop 8
  $ loopAt 1
  $ "break:4/2"
  # cut 8
  # midiG' "^84" 0 1



-- Graveyard: other break
d8 $ struct "t([5 <<5 5 3 5> <10 5 10 16>>], 16)" $ chop 16 $ "break:1" # cut 2
  # pan 0.28
  # gain 0.3

-- t d t d t db t d

scaleList

once $ note (scale "marva" (run 8) + 12)
  # "pluck"
  # cut 12 # gain 0.8
