; SONG_MATRIX - "Main Matrix": the computer world.  Hypnotic and synthetic, C minor, 129 BPM:
; a four-bar loop (Cm Ab Fm G) the whole way, an octave-pumping 8th-note bass, fast synth
; arpeggios on pulse 2 (each 8th note runs root-third-fifth-octave), a four-on-the-floor kick.
; A (8 bars: short "data" blips on a bell; the kick alone, then off-beat hats) B (8: a held
; synth tune; the arps in a 3+3+2 rhythm; open hats).  Loop 16 bars = 30 s.
;   Cm | Ab | Fm | G   (four times)
speed 7
loop

def ob = c8 > c8 < c8 > c8 < c8 > c8 < g8 > c8 <    ; bass: octave pump with a fifth (K = the root)
def ar = c8 c8 c8 c8 c8 c8 c8 c8                    ; arps: a bar of 8ths (K = the root)
def tr = c8. c8. c8 c8. c8. c8                      ; arps: 3+3+2, twice
def k4 = k4 k4 k4 k4
def kh = k8 h8 k8 h8 k8 h8 k8 h8
def ko = k8 h8 k8 o8 k8 h8 k8 o8

; ---- lead
p1: L @bell o4
p1: r4 g8 g8 > c4 < g4 | r4 a-8 a-8 > c4 e-4 < | r4 f8 f8 a-4 > c4 < | b4 > d4 < b4 g4 |
p1: r4 g8 g8 > c4 e-4 < | r4 a-8 a-8 > c4 < a-4 | r4 f8 f8 a-4 > c4 < | b4 > d4 f4 d4 < |
p1: @lead o5 g2 e-4 c4 | c4 e-4 a-2 | a-2 f4 c4 | < b2. > d4 |
p1: e-4. d8 e-4 g4 | a-4. g8 a-4 e-4 | f4. e-8 f4 a-4 | g2 f4 d4 |

; ---- pulse 2: synth arpeggios
p2: L o4
p2: [ @arpx K0 $ar | @arpMx K-4 $ar | @arpx K-7 $ar | @arpMx K-5 $ar | ]2
p2: [ @arpx K0 $tr | @arpMx K-4 $tr | @arpx K-7 $tr | @arpMx K-5 $tr | ]2 K0

; ---- bass
tri: L @bass8 o2
tri: [ K0 $ob | K-4 $ob | K5 $ob | K7 $ob | ]4 K0

; ---- drums
noise: L $k4 | $k4 | $k4 | $k4 | $kh | $kh | $kh | k8 h8 k8 h8 s8 s8 s16 s16 s8 |
noise: c8 h8 k8 o8 k8 h8 k8 o8 | $ko | $ko | $ko | $ko | $ko | $ko | k8 h8 k8 h8 s16 s16 s16 s16 s8 s8 |
