498 lines
52 KiB
TypeScript
498 lines
52 KiB
TypeScript
// Music tracks, playback, and intensity control
|
|||
|
|
|
||
|
|
import { getCtx, getMusicGain, isMusicPlaying, setMusicPlaying, getMusicTimeout, setMusicTimeout } from './context'
|
||
|
|
import { chorusTone, fmLead, kick, snare, hihat, setDelayNodeGetter, noise, tone } from './primitives'
|
||
|
|
|
||
|
|
// === MUSIC CONSTANTS ===
|
||
|
|
|
||
|
|
const BARS = 8
|
||
|
|
const STEPS = 16 // per bar
|
||
|
|
|
||
|
|
// Shared delay effect for fullness
|
||
|
|
let delayNode: DelayNode | null = null
|
||
|
|
let delayGain: GainNode | null = null
|
||
|
|
|
||
|
|
// Register delay node getter so primitives (fmLead etc.) can access it
|
||
|
|
setDelayNodeGetter(() => delayNode)
|
||
|
|
|
||
|
|
function getMusicDelay(): GainNode {
|
||
|
|
const musicGain = getMusicGain()
|
||
|
|
if (delayGain && delayNode) return delayGain
|
||
|
|
const c = getCtx()
|
||
|
|
delayNode = c.createDelay(0.5)
|
||
|
|
delayNode.delayTime.value = 0.18 // 8th note delay
|
||
|
|
delayGain = c.createGain()
|
||
|
|
delayGain.gain.value = 0.25
|
||
|
|
const feedback = c.createGain()
|
||
|
|
feedback.gain.value = 0.3
|
||
|
|
delayNode.connect(feedback)
|
||
|
|
feedback.connect(delayNode) // feedback loop
|
||
|
|
delayNode.connect(delayGain)
|
||
|
|
delayGain.connect(musicGain!)
|
||
|
|
return delayGain
|
||
|
|
}
|
||
|
|
|
||
|
|
// === GENRE-SPECIFIC SYNTH VARIANTS ===
|
||
|
|
|
||
|
|
// Thick distorted sub-bass with overtones
|
||
|
|
function thickBass(freq: number, dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
const sub = c.createOscillator()
|
||
|
|
sub.type = 'sine'
|
||
|
|
sub.frequency.value = freq / 2
|
||
|
|
const subG = c.createGain()
|
||
|
|
subG.gain.setValueAtTime(0.25, t)
|
||
|
|
subG.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
sub.connect(subG); subG.connect(dest)
|
||
|
|
sub.start(t); sub.stop(t + dur)
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = 'sawtooth'
|
||
|
|
osc.frequency.value = freq
|
||
|
|
const dist = c.createWaveShaper()
|
||
|
|
const curve = new Float32Array(256)
|
||
|
|
for (let i = 0; i < 256; i++) { const x = (i / 128) - 1; curve[i] = (Math.PI + 6) * x / (Math.PI + 6 * Math.abs(x)) }
|
||
|
|
dist.curve = curve
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.2, t)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc.connect(dist); dist.connect(g); g.connect(dest)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
const oct = c.createOscillator()
|
||
|
|
oct.type = 'square'
|
||
|
|
oct.frequency.value = freq * 2
|
||
|
|
const octG = c.createGain()
|
||
|
|
octG.gain.setValueAtTime(0.06, t)
|
||
|
|
octG.gain.exponentialRampToValueAtTime(0.001, t + dur * 0.5)
|
||
|
|
oct.connect(octG); octG.connect(dest)
|
||
|
|
oct.start(t); oct.stop(t + dur)
|
||
|
|
}
|
||
|
|
|
||
|
|
function chordPad(freqs: number[], dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
for (const freq of freqs) {
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = 'triangle'
|
||
|
|
osc.frequency.value = freq
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.04, t)
|
||
|
|
g.gain.setValueAtTime(0.04, t + dur * 0.8)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc.connect(g); g.connect(dest)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function pulseBass(freq: number, dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = 'square'
|
||
|
|
osc.frequency.value = freq
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.18, t)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc.connect(g); g.connect(dest)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
}
|
||
|
|
|
||
|
|
function slapBass(freq: number, dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = 'sine'
|
||
|
|
osc.frequency.setValueAtTime(freq * 1.5, t)
|
||
|
|
osc.frequency.exponentialRampToValueAtTime(freq, t + 0.02)
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.3, t)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + Math.min(dur, 0.12))
|
||
|
|
osc.connect(g); g.connect(dest)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
}
|
||
|
|
|
||
|
|
function subBass(freq: number, dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = 'sine'
|
||
|
|
osc.frequency.value = freq
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.25, t)
|
||
|
|
g.gain.setValueAtTime(0.25, t + dur * 0.8)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc.connect(g); g.connect(dest)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
}
|
||
|
|
|
||
|
|
function distortedBass(freq: number, dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = 'sawtooth'
|
||
|
|
osc.frequency.value = freq
|
||
|
|
const dist = c.createWaveShaper()
|
||
|
|
const curve = new Float32Array(256)
|
||
|
|
for (let i = 0; i < 256; i++) { const x = (i / 128) - 1; curve[i] = Math.tanh(x * 3) }
|
||
|
|
dist.curve = curve
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.22, t)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc.connect(dist); dist.connect(g); g.connect(dest)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
const sub = c.createOscillator()
|
||
|
|
sub.type = 'sine'
|
||
|
|
sub.frequency.value = freq * 0.5
|
||
|
|
const sg = c.createGain()
|
||
|
|
sg.gain.setValueAtTime(0.12, t)
|
||
|
|
sg.gain.exponentialRampToValueAtTime(0.001, t + dur * 0.7)
|
||
|
|
sub.connect(sg); sg.connect(dest)
|
||
|
|
sub.start(t); sub.stop(t + dur)
|
||
|
|
}
|
||
|
|
|
||
|
|
function organBass(freq: number, dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
for (const [waveType, vol, mult] of [['square', 0.1, 1], ['sine', 0.12, 2], ['sine', 0.06, 3]] as [OscillatorType, number, number][]) {
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = waveType
|
||
|
|
osc.frequency.value = freq * mult
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(vol, t)
|
||
|
|
g.gain.setValueAtTime(vol, t + dur * 0.85)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc.connect(g); g.connect(dest)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function sharpLead(freq: number, dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = 'square'
|
||
|
|
osc.frequency.value = freq
|
||
|
|
const osc2 = c.createOscillator()
|
||
|
|
osc2.type = 'square'
|
||
|
|
osc2.frequency.value = freq
|
||
|
|
osc2.detune.value = 6
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.1, t)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc.connect(g); osc2.connect(g); g.connect(dest)
|
||
|
|
if (delayNode) g.connect(delayNode)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
osc2.start(t); osc2.stop(t + dur)
|
||
|
|
}
|
||
|
|
|
||
|
|
function smoothLead(freq: number, dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
const car = c.createOscillator()
|
||
|
|
car.type = 'triangle'
|
||
|
|
car.frequency.value = freq
|
||
|
|
const mod = c.createOscillator()
|
||
|
|
mod.type = 'sine'
|
||
|
|
mod.frequency.value = freq * 1.5
|
||
|
|
const modG = c.createGain()
|
||
|
|
modG.gain.value = 40
|
||
|
|
mod.connect(modG); modG.connect(car.frequency)
|
||
|
|
const vib = c.createOscillator()
|
||
|
|
vib.type = 'sine'
|
||
|
|
vib.frequency.value = 5
|
||
|
|
const vibG = c.createGain()
|
||
|
|
vibG.gain.value = 4
|
||
|
|
vib.connect(vibG); vibG.connect(car.frequency)
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.001, t)
|
||
|
|
g.gain.linearRampToValueAtTime(0.14, t + dur * 0.15)
|
||
|
|
g.gain.setValueAtTime(0.14, t + dur * 0.7)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
car.connect(g); g.connect(dest)
|
||
|
|
if (delayNode) g.connect(delayNode)
|
||
|
|
car.start(t); car.stop(t + dur)
|
||
|
|
mod.start(t); mod.stop(t + dur)
|
||
|
|
vib.start(t); vib.stop(t + dur)
|
||
|
|
}
|
||
|
|
|
||
|
|
function aggressiveLead(freq: number, dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
const car = c.createOscillator()
|
||
|
|
car.type = 'sawtooth'
|
||
|
|
car.frequency.value = freq
|
||
|
|
const mod = c.createOscillator()
|
||
|
|
mod.type = 'square'
|
||
|
|
mod.frequency.value = freq * 3
|
||
|
|
const modG = c.createGain()
|
||
|
|
modG.gain.value = 300
|
||
|
|
mod.connect(modG); modG.connect(car.frequency)
|
||
|
|
const car2 = c.createOscillator()
|
||
|
|
car2.type = 'sawtooth'
|
||
|
|
car2.frequency.value = freq
|
||
|
|
car2.detune.value = -15
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.13, t)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
car.connect(g); car2.connect(g); g.connect(dest)
|
||
|
|
if (delayNode) g.connect(delayNode)
|
||
|
|
car.start(t); car.stop(t + dur)
|
||
|
|
car2.start(t); car2.stop(t + dur)
|
||
|
|
mod.start(t); mod.stop(t + dur)
|
||
|
|
}
|
||
|
|
|
||
|
|
function wahLead(freq: number, dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = 'sawtooth'
|
||
|
|
osc.frequency.value = freq
|
||
|
|
const filter = c.createBiquadFilter()
|
||
|
|
filter.type = 'bandpass'
|
||
|
|
filter.Q.value = 5
|
||
|
|
filter.frequency.setValueAtTime(freq * 2, t)
|
||
|
|
filter.frequency.exponentialRampToValueAtTime(freq * 8, t + dur * 0.3)
|
||
|
|
filter.frequency.exponentialRampToValueAtTime(freq * 2, t + dur)
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.2, t)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc.connect(filter); filter.connect(g); g.connect(dest)
|
||
|
|
if (delayNode) g.connect(delayNode)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
}
|
||
|
|
|
||
|
|
function gothicLead(freq: number, dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = 'sawtooth'
|
||
|
|
osc.frequency.value = freq
|
||
|
|
const vib = c.createOscillator()
|
||
|
|
vib.type = 'sine'
|
||
|
|
vib.frequency.value = 6.5
|
||
|
|
const vibG = c.createGain()
|
||
|
|
vibG.gain.value = 8
|
||
|
|
vib.connect(vibG); vibG.connect(osc.frequency)
|
||
|
|
const osc2 = c.createOscillator()
|
||
|
|
osc2.type = 'triangle'
|
||
|
|
osc2.frequency.value = freq * 2
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.12, t)
|
||
|
|
g.gain.setValueAtTime(0.12, t + dur * 0.75)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc.connect(g); g.connect(dest)
|
||
|
|
const g2 = c.createGain()
|
||
|
|
g2.gain.setValueAtTime(0.04, t)
|
||
|
|
g2.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc2.connect(g2); g2.connect(dest)
|
||
|
|
if (delayNode) g.connect(delayNode)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
osc2.start(t); osc2.stop(t + dur)
|
||
|
|
vib.start(t); vib.stop(t + dur)
|
||
|
|
}
|
||
|
|
|
||
|
|
function darkPad(freqs: number[], dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
for (const freq of freqs) {
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = 'sawtooth'
|
||
|
|
osc.frequency.value = freq
|
||
|
|
const filter = c.createBiquadFilter()
|
||
|
|
filter.type = 'lowpass'
|
||
|
|
filter.frequency.value = freq * 3
|
||
|
|
filter.Q.value = 1
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.03, t)
|
||
|
|
g.gain.setValueAtTime(0.03, t + dur * 0.8)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc.connect(filter); filter.connect(g); g.connect(dest)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function brightPad(freqs: number[], dur: number, dest: AudioNode, t: number) {
|
||
|
|
const c = getCtx()
|
||
|
|
for (const freq of freqs) {
|
||
|
|
const osc = c.createOscillator()
|
||
|
|
osc.type = 'square'
|
||
|
|
osc.frequency.value = freq
|
||
|
|
const g = c.createGain()
|
||
|
|
g.gain.setValueAtTime(0.025, t)
|
||
|
|
g.gain.setValueAtTime(0.025, t + dur * 0.8)
|
||
|
|
g.gain.exponentialRampToValueAtTime(0.001, t + dur)
|
||
|
|
osc.connect(g); g.connect(dest)
|
||
|
|
osc.start(t); osc.stop(t + dur)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
// Style dispatch tables
|
||
|
|
type SynthStyle = 'epic' | 'gothic' | 'funky' | 'heroic' | 'metal' | 'emotional' | 'ninja' | 'speed' | 'atmospheric' | 'military' | 'bouncy' | 'boss'
|
||
|
|
type BassFunc = (freq: number, dur: number, dest: AudioNode, t: number) => void
|
||
|
|
type PadFunc = (freqs: number[], dur: number, dest: AudioNode, t: number) => void
|
||
|
|
|
||
|
|
const STYLE_BASS: Record<SynthStyle, BassFunc> = {
|
||
|
|
epic: thickBass, gothic: organBass, funky: slapBass, heroic: pulseBass,
|
||
|
|
metal: distortedBass, emotional: subBass, ninja: pulseBass, speed: slapBass,
|
||
|
|
atmospheric: subBass, military: thickBass, bouncy: pulseBass, boss: distortedBass,
|
||
|
|
}
|
||
|
|
const STYLE_LEAD: Record<SynthStyle, BassFunc> = {
|
||
|
|
epic: fmLead, gothic: gothicLead, funky: wahLead, heroic: sharpLead,
|
||
|
|
metal: aggressiveLead, emotional: smoothLead, ninja: sharpLead, speed: wahLead,
|
||
|
|
atmospheric: smoothLead, military: fmLead, bouncy: sharpLead, boss: aggressiveLead,
|
||
|
|
}
|
||
|
|
const STYLE_ARP_TYPE: Record<SynthStyle, OscillatorType> = {
|
||
|
|
epic: 'triangle', gothic: 'sawtooth', funky: 'square', heroic: 'square',
|
||
|
|
metal: 'sawtooth', emotional: 'triangle', ninja: 'square', speed: 'triangle',
|
||
|
|
atmospheric: 'sine', military: 'triangle', bouncy: 'square', boss: 'sawtooth',
|
||
|
|
}
|
||
|
|
const STYLE_PAD: Record<SynthStyle, PadFunc> = {
|
||
|
|
epic: chordPad, gothic: darkPad, funky: chordPad, heroic: brightPad,
|
||
|
|
metal: darkPad, emotional: chordPad, ninja: darkPad, speed: brightPad,
|
||
|
|
atmospheric: darkPad, military: chordPad, bouncy: brightPad, boss: darkPad,
|
||
|
|
}
|
||
|
|
|
||
|
|
// === TRACK DATA ===
|
||
|
|
interface MusicTrack {
|
||
|
|
name: string
|
||
|
|
bpm: number
|
||
|
|
synthStyle: SynthStyle
|
||
|
|
bass: number[]
|
||
|
|
lead: number[]
|
||
|
|
arp: number[]
|
||
|
|
chords: number[][]
|
||
|
|
drums: number[]
|
||
|
|
}
|
||
|
|
|
||
|
|
// I'm inlining ALL 20 tracks inline as a single constant to keep
|
||
|
|
// the file self-contained. Each track is identical to the original sounds.ts.
|
||
|
|
|
||
|
|
const track1: MusicTrack = {name:'Desert Storm',bpm:200,synthStyle:'epic',bass:[110,0,220,0,110,0,220,110,110,0,220,0,165,0,220,0,87,0,175,0,87,0,175,87,87,0,175,0,131,0,175,0,73,0,147,0,73,0,147,73,73,0,147,0,110,0,147,0,82,0,165,0,82,0,165,82,82,0,165,0,123,0,165,0,110,0,220,110,110,165,220,110,110,0,220,110,110,165,220,165,131,0,262,131,131,196,262,131,131,0,262,131,131,196,262,196,87,0,175,87,87,131,175,87,87,0,175,87,87,131,175,131,82,0,165,82,82,123,165,82,82,165,247,330,165,82,0,0],lead:[440,0,523,659,880,0,659,523,440,0,523,659,784,880,784,659,349,0,440,523,698,0,523,440,349,0,440,523,587,698,659,523,294,0,349,440,587,0,440,349,587,698,880,1047,880,698,587,440,330,0,440,523,659,0,784,880,1047,0,880,784,659,523,440,330,880,1047,1319,1760,1319,0,1047,880,784,659,880,1047,1319,1047,880,659,1047,1319,1568,1319,1047,784,659,784,1047,1319,1568,2093,1568,1319,1047,784,698,880,1047,1397,1760,0,1397,1047,880,698,880,1047,1397,1047,880,698,659,784,880,1047,880,784,659,523,440,523,659,880,659,0,0,0],arp:[440,523,659,523,440,523,659,880,659,523,440,523,659,880,659,523,349,440,523,440,349,440,523,698,523,440,349,440,523,698,523,440,294,349,440,349,294,349,440,587,440,349,294,349,440,587,440,349,330,415,523,415,330,415,523,659,523,415,330,415,523,659,523,415,440,659,880,659,440,523,659,880,1047,880,659,523,440,659,880,1047,523,784,1047,784,523,659,784,1047,1319,1047,784,659,523,784,1047,1319,349,523,698,523,349,440,523,698,880,698,523,440,349,523,698,880,330,523,659,523,330,415,523,659,880,659,523,415,440,523,659,0],chords:[[220,262,330],[175,220,262],[147,175,220],[165,208,247],[220,262,330],[131,165,196],[175,220,262],[165,208,247]],drums:[1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,4,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,4,1,0,3,0,2,3,4,3,1,3,1,3,2,0,3,0,1,3,1,3,2,0,3,0,1,3,1,3,2,0,3,0,1,3,1,3,2,3,4,3,1,3,1,3,2,3,1,3,1,3,1,3,2,3,1,3,1,3,1,3,2,3,4,3,1,1,2,1,2,2,2,2]}
|
||
|
|
const track2: MusicTrack = {name:"Vampire's Requiem",bpm:190,synthStyle:'gothic',bass:[147,0,294,147,147,0,294,0,147,0,294,147,175,220,294,220,117,0,233,117,117,0,233,0,117,0,233,117,147,175,233,175,98,0,196,98,98,0,196,0,98,0,196,98,131,147,196,147,110,0,220,110,110,0,220,0,110,0,220,110,139,165,220,165,147,294,147,294,147,294,175,220,147,294,147,294,175,220,294,349,117,233,117,233,117,233,175,233,175,349,175,349,175,349,220,262,98,196,98,196,131,196,262,196,98,196,98,196,131,196,262,330,110,220,110,220,139,220,277,220,110,0,220,0,110,0,0,0],lead:[587,0,698,880,1047,0,880,698,587,0,440,349,440,587,698,880,466,0,587,698,932,0,698,587,466,0,349,233,349,466,587,698,392,0,494,587,784,0,587,494,392,0,330,262,330,392,494,587,440,0,554,698,880,0,698,554,440,330,220,330,440,554,698,880,1175,0,1047,880,698,587,440,587,698,880,1047,1175,1397,1175,1047,880,932,0,880,698,587,466,349,466,587,698,880,932,1047,932,880,698,784,0,698,587,494,392,330,392,494,587,698,784,880,784,698,587,880,698,554,440,554,440,330,220,294,349,440,587,698,0,0,0],arp:[294,349,440,349,294,349,440,587,440,349,294,349,440,587,440,349,233,294,349,294,233,294,349,466,349,294,233,294,349,466,349,294,196,262,330,262,196,262,330,392,330,262,196,262,330,392,330,262,220,277,349,277,220,277,349,440,349,277,220,277,349,440,349,277,294,440,587,440,294,349,440,587,698,587,440,349,294,440,587,698,233,349,466,349,233,294,349,466,587,466,349,294,233,349,466,587,196,330,392,330,196,262,330,392,494,392,330,262,196,330,392,494,220,349,440,349,220,277,349,440,554,440,349,277,220,349,440,0],chords:[[147,175,220],[233,294,349],[196,233,294],[220,277,330],[147,175,220],[175,220,262],[233,294,349],[220,277,330]],drums:[1,0,0,3,2,0,0,3,1,0,0,3,2,0,0,3,1,0,0,3,2,0,0,3,1,0,0,3,2,0,3,4,1,0,3,3,2,0,0,3,1,0,3,3,2,0,0,3,1,0,3,3,2,0,0,3,1,0,3,3,2,0,3,4,1,3,0,3,2,0,3,3,1,3,0,3,2,0,3,3,1,3,0,3,2,3,0,3,1,3,0,3,2,3,4,3,1,3,1,3,2,3,1,3,1,3,1,3,2,3,1,3,1,1,2,1,2,1,2,1,2,2,2,2,2,2,2,2]}
|
||
|
|
const track3: MusicTrack = {name:'Street Heat',bpm:175,synthStyle:'funky',bass:[82,0,0,165,0,0,82,0,165,0,0,196,0,165,0,82,110,0,0,220,0,0,110,0,220,0,0,262,0,220,0,110,131,0,0,262,0,0,131,0,262,0,0,330,0,262,0,131,123,0,0,247,0,0,123,0,247,0,0,294,0,247,0,123,82,165,0,82,0,165,82,0,165,82,0,196,165,0,82,165,110,220,0,110,0,220,110,0,220,110,0,262,220,0,110,220,131,262,0,131,0,262,131,0,262,131,0,330,262,0,131,262,123,247,0,123,0,247,123,0,247,0,0,0,123,0,0,0],lead:[659,0,0,784,0,0,659,0,0,880,0,784,0,659,0,0,880,0,0,1047,0,0,880,0,0,1175,0,1047,0,880,0,0,1047,0,0,1175,0,0,1319,0,0,1175,0,1047,0,880,784,0,988,0,0,880,0,0,784,0,0,659,0,784,880,0,784,0,659,784,0,880,1047,0,880,0,659,0,784,880,1047,0,880,659,880,1047,0,1175,1319,0,1175,0,880,0,1047,1175,1319,0,1175,880,1047,1319,0,1568,1760,0,1568,0,1319,0,1047,880,784,0,659,0,880,659,0,784,659,0,523,0,494,0,659,0,784,0,0,0],arp:[330,0,392,0,494,0,392,0,330,0,494,0,659,0,494,0,440,0,523,0,659,0,523,0,440,0,659,0,880,0,659,0,523,0,659,0,784,0,659,0,523,0,784,0,1047,0,784,0,494,0,587,0,740,0,587,0,494,0,740,0,988,0,740,0,330,494,659,494,330,392,494,659,784,659,494,392,330,494,659,784,440,659,880,659,440,523,659,880,1047,880,659,523,440,659,880,1047,523,784,1047,784,523,659,784,1047,1319,1047,784,659,523,784,1047,1319,494,740,988,740,494,587,740,988,740,0,0,0,494,0,0,0],chords:[[165,196,247],[220,262,330],[262,330,392],[247,294,370],[165,196,247],[196,247,294],[220,262,330],[247,294,370]],drums:[1,0,0,0,2,0,0,3,0,0,1,0,2,0,3,0,1,0,0,0,2,0,0,3,0,0,1,0,2,0,3,4,1,0,3,0,2,0,0,3,0,3,1,0,2,0,3,0,1,0,3,0,2,3,0,3,0,3,1,0,2,0,3,4,1,0,3,0,2,3,0,3,1,3,1,0,2,0,3,0,1,3,3,0,2,3,0,3,1,3,1,0,2,3,3,4,1,3,3,3,2,3,0,3,1,3,3,3,2,3,1,3,1,1,2,1,2,1,2,3,1,1,2,2,2,2,2,2]}
|
||
|
|
const track4: MusicTrack = {name:'Steel Resolve',bpm:210,synthStyle:'heroic',bass:[131,0,262,131,131,0,262,0,131,0,196,0,131,262,196,131,196,0,392,196,196,0,392,0,196,0,262,0,196,392,262,196,220,0,440,220,220,0,440,0,220,0,330,0,220,440,330,220,175,0,349,175,175,0,349,0,175,0,262,0,175,349,262,175,131,262,131,262,131,262,196,262,196,392,196,392,196,392,262,392,220,440,220,440,220,440,330,440,175,349,175,349,175,349,262,349,131,196,262,330,262,196,131,196,196,262,330,392,330,262,196,131,175,262,349,440,349,262,175,131,131,262,0,0,131,0,0,0],lead:[523,659,784,1047,784,659,523,659,784,1047,1319,1047,784,659,523,392,784,1047,1175,1319,1175,1047,784,659,523,659,784,1047,1175,1047,784,659,880,1047,1175,1319,1175,1047,880,784,659,784,880,1047,1175,1047,880,659,698,880,1047,1175,1047,880,698,523,440,523,698,880,1047,880,698,523,1047,1319,1568,1319,1047,784,659,784,1047,1319,1568,2093,1568,1319,1047,784,1175,1319,1568,1760,1568,1319,1175,880,659,880,1175,1319,1568,1319,1175,880,880,1047,1175,1319,1175,1047,880,784,659,784,880,1047,1175,1047,880,784,698,880,1047,1175,1047,880,698,523,523,659,784,1047,784,0,0,0],arp:[262,330,392,330,262,330,392,523,392,330,262,330,392,523,392,330,392,494,587,494,392,494,587,784,587,494,392,494,587,784,587,494,440,523,659,523,440,523,659,880,659,523,440,523,659,880,659,523,349,440,523,440,349,440,523,698,523,440,349,440,523,698,523,440,262,392,523,784,523,392,262,392,523,784,1047,784,523,392,262,523,392,587,784,1047,784,587,392,587,784,1047,1319,1047,784,587,392,784,440,659,880,659,440,523,659,880,1047,880,659,523,440,659,880,1047,349,523,698,523,349,440,523,698,880,698,523,0,262,523,0,0],chords:[[262,330,392],[196,247,294],[220,262,330],[175,220,262],[262,330,392],[165,196,247],[175,220,262],[196,247,294]],drums:[1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,3,3,0,2,0,3,4,1,3,3,0,2,0,3,0,1,3,3,0,2,0,3,0,1,3,3,0,2,3,3,0,1,3,3,0,2,3,3,4,1,3,1,3,2,0,3,0,1,3,1,3,2,0,3,4,1,3,1,3,2,3,1,3,1,3,1,3,2,3,4,3,1,3,1,3,2,3,1,3,1,1,1,3,2,1,1,3,1,1,1,1,2,1,2,1,2,2,2,1,2,2,2,2]}
|
||
|
|
const track5: MusicTrack = {name:'Thunder Blade',bpm:230,synthStyle:'metal',bass:[123,123,247,123,123,123,247,123,123,123,247,0,185,247,185,123,98,98,196,98,98,98,196,98,98,98,196,0,147,196,147,98,82,82,165,82,82,82,165,82,82,82,165,0,131,165,131,82,92,92,185,92,92,92,185,92,92,92,185,0,139,185,139,92,123,247,123,247,123,247,185,247,123,247,123,247,185,247,294,370,98,196,98,196,98,196,147,196,98,196,98,196,147,196,247,294,82,165,82,165,82,165,131,165,82,165,82,165,131,165,196,247,92,185,92,185,92,185,139,185,92,185,247,370,247,185,0,0],lead:[988,0,988,1175,1480,0,1175,988,740,0,740,988,1175,0,988,740,784,0,784,988,1175,0,988,784,587,0,587,784,988,0,784,587,659,0,659,784,988,0,784,659,494,0,494,659,784,0,659,494,740,0,740,880,1109,0,880,740,554,0,554,740,880,0,740,554,988,1175,1480,1976,1480,1175,988,1175,1480,1976,1480,1175,988,740,988,1175,784,988,1175,1568,1175,988,784,988,1175,1568,1175,988,784,587,784,988,659,784,988,1319,988,784,659,784,988,1319,988,784,659,494,659,784,1480,1175,988,740,988,740,554,440,554,740,988,1175,1480,0,0,0],arp:[247,370,494,370,247,370,494,740,494,370,247,370,494,740,494,370,196,294,392,294,196,294,392,587,392,294,196,294,392,587,392,294,165,247,330,247,165,247,330,494,330,247,165,247,330,494,330,247,185,277,370,277,185,277,370,554,370,277,185,277,370,554,370,277,247,494,740,494,247,370,494,740,988,740,494,370,247,494,740,988,196,392,587,392,196,294,392,587,784,587,392,294,196,392,587,784,165,330,494,330,165,247,330,494,659,494,330,247,165,330,494,659,185,370,554,370,185,277,370,554,740,554,370,0,247,370,0,0],chords:[[247,294,370],[196,247,294],[165,196,247],[185,220,277],[247,294,370],[220,262,330],[196,247,294],[185,220,277]],drums:[1,1,1,3,2,1,1,3,1,1,1,3,2,1,4,1,1,1,1,3,2,1,1,3,1,1,1,3,2,1,4,1,1,1,1,1,2,1,1,1,1,1,4,1,2,1,1,1,1,1,1,1,2,1,4,1,2,1,1,1,2,2,4,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,4,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,4,1,1,1,1,1,2,1,4,1,1,1,1,1,2,1,4,1,1,1,2,1,2,1,2,1,2,2,2,2,2,2,2,2]}
|
||
|
|
const track6: MusicTrack = {name:'Crystal Elegy',bpm:150,synthStyle:'emotional',bass:[87,0,175,0,87,0,175,0,87,0,175,0,131,0,175,0,73,0,147,0,73,0,147,0,73,0,147,0,110,0,147,0,117,0,233,0,117,0,233,0,117,0,233,0,175,0,233,0,131,0,262,0,131,0,262,0,131,0,262,0,196,0,262,0,87,175,87,175,87,131,175,262,175,131,87,131,175,262,175,131,73,147,73,147,73,110,147,220,147,110,73,110,147,220,147,110,117,233,117,233,117,175,233,349,233,175,117,175,233,349,233,175,131,262,131,262,131,196,262,330,262,196,131,0,131,0,0,0],lead:[698,0,0,880,1047,0,0,880,698,0,0,523,440,0,523,698,587,0,0,698,880,0,0,698,587,0,0,440,349,0,440,587,466,0,0,587,698,0,0,587,466,0,0,349,233,0,349,466,523,0,0,659,784,0,0,659,523,0,0,440,330,0,440,523,1397,0,1175,1047,880,0,698,523,440,523,698,880,1047,880,698,523,1175,0,1047,880,698,0,587,440,349,440,587,698,880,698,587,440,932,0,880,698,587,0,466,349,233,349,466,587,698,587,466,349,1047,0,880,784,659,523,440,349,440,523,698,880,1047,0,0,0],arp:[175,220,262,220,175,220,262,349,262,220,175,220,262,349,262,220,147,175,220,175,147,175,220,294,220,175,147,175,220,294,220,175,233,294,349,294,233,294,349,466,349,294,233,294,349,466,349,294,262,330,392,330,262,330,392,523,392,330,262,330,392,523,392,330,175,262,349,523,349,262,175,262,349,523,698,523,349,262,175,349,147,220,294,440,294,220,147,220,294,440,587,440,294,220,147,294,233,349,466,698,466,349,233,349,466,698,932,698,466,349,233,466,262,392,523,784,523,392,262,392,523,784,0,0,262,0,0,0],chords:[[175,220,262],[147,175,220],[233,294,349],[262,330,392],[175,220,262],[220,262,330],[233,294,349],[262,330,392]],drums:[1,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,1,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,1,0,0,3,0,0,2,0,0,3,0,0,0,0,3,0,1,0,0,3,0,0,2,0,0,3,0,0,2,0,3,4,1,0,3,0,2,0,0,3,1,0,3,0,2,0,0,3,1,0,3,0,2,0,3,3,1,0,3,0,2,0,3,4,1,0,3,0,2,0,3,0,1,0,3,3,2,0,3,0,1,0,3,0,2,3,3,0,1,0,0,0,0,0,0,0]}
|
||
|
|
const track7: MusicTrack = {name:'Shadow Assault',bpm:215,synthStyle:'ninja',bass:[98,0,196,98,98,0,196,0,98,0,196,98,131,156,196,156,156,0,311,156,156,0,311,0,156,0,311,156,196,233,311,233,131,0,262,131,131,0,262,0,131,0,262,131,175,196,262,196,147,0,294,147,147,0,294,0,147,0,294,147,185,220,294,220,98,196,98,196,156,196,131,196,98,196,98,196,156,196,262,330,156,311,156,311,196,311,233,311,156,311,156,311,196,311,392,466,131,262,131,262,175,262,196,262,131,262,131,262,175,262,330,392,147,294,147,294,185,294,220,294,147,294,0,0,147,0,0,0],lead:[784,0,932,784,0,784,932,1175,1568,0,1175,932,784,0,659,784,622,0,784,622,0,622,784,988,1175,0,988,784,622,0,523,622,523,0,659,523,0,523,659,784,1047,0,784,659,523,0,440,523,587,0,740,587,0,587,740,880,1175,0,880,740,587,0,494,587,784,932,1175,1568,1175,932,784,932,1175,1568,1175,932,784,659,784,932,622,784,988,1319,988,784,622,784,988,1319,988,784,622,523,622,784,1047,1175,1568,1865,1568,1175,1047,1175,1568,1865,1568,1175,1047,784,659,523,587,740,880,1175,880,740,587,440,587,0,784,0,932,0,0,0],arp:[196,233,294,233,196,233,294,392,294,233,196,233,294,392,294,233,311,392,466,392,311,392,466,622,466,392,311,392,466,622,466,392,262,330,392,330,262,330,392,523,392,330,262,330,392,523,392,330,294,370,440,370,294,370,440,587,440,370,294,370,440,587,440,370,196,294,392,587,392,294,196,294,392,587,784,587,392,294,196,392,311,466,622,932,622,466,311,466,622,932,1175,932,622,466,311,622,262,392,523,784,523,392,262,392,523,784,1047,784,523,392,262,523,294,440,587,880,587,440,294,440,587,0,0,0,294,0,0,0],chords:[[196,233,294],[311,392,466],[262,311,392],[294,370,440],[196,233,294],[233,294,349],[311,392,466],[294,370,440]],drums:[1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,4,1,3,0,3,2,0,3,0,1,3,0,3,2,0,3,0,1,3,0,3,2,3,0,3,1,3,0,3,2,3,4,3,1,3,1,3,2,0,3,0,1,3,1,3,2,0,3,4,1,3,1,3,2,3,1,3,1,3,1,3,2,3,4,3,1,1,1,3,2,1,1,3,1,1,1,3,2,1,4,1,1,1,1,1,2,1,2,1,2,2,2,1,2,2,2,2]}
|
||
|
|
const track8: MusicTrack = {name:'Emerald Rush',bpm:195,synthStyle:'speed',bass:[98,0,0,196,0,0,98,0,196,0,0,98,0,196,0,98,82,0,0,165,0,0,82,0,165,0,0,82,0,165,0,82,131,0,0,262,0,0,131,0,262,0,0,131,0,262,0,131,73,0,0,147,0,0,73,0,147,0,0,73,0,147,0,73,98,196,0,98,196,0,98,196,0,196,98,0,196,98,196,262,82,165,0,82,165,0,82,165,0,165,82,0,165,82,165,247,131,262,0,131,262,0,131,262,0,262,131,0,262,131,262,330,147,294,0,147,294,0,147,294,147,0,0,0,98,0,0,0],lead:[784,0,880,1047,1175,0,1047,880,784,0,659,523,659,784,880,1047,659,0,784,880,1047,0,880,784,659,0,523,440,523,659,784,880,1047,0,1175,1319,1568,0,1319,1175,1047,0,880,784,880,1047,1175,1319,587,0,659,784,880,0,784,659,587,0,523,440,523,587,659,784,1175,1319,1568,1760,1568,1319,1175,1047,880,784,880,1047,1175,1047,880,784,1047,1175,1319,1568,1319,1175,1047,880,784,659,784,880,1047,880,784,659,1568,1760,2093,1760,1568,1319,1175,1047,880,784,659,523,659,784,880,1047,880,784,659,587,523,440,392,330,392,440,523,659,784,0,0,0],arp:[392,494,587,494,392,494,587,784,587,494,392,494,587,784,587,494,330,392,494,392,330,392,494,659,494,392,330,392,494,659,494,392,523,659,784,659,523,659,784,1047,784,659,523,659,784,1047,784,659,294,370,440,370,294,370,440,587,440,370,294,370,440,587,440,370,392,587,784,587,392,494,587,784,1047,784,587,494,392,587,784,1047,330,494,659,494,330,392,494,659,880,659,494,392,330,494,659,880,523,784,1047,784,523,659,784,1047,1319,1047,784,659,523,784,1047,1319,294,440,587,440,294,370,440,587,784,587,0,0,392,0,0,0],chords:[[196,247,294],[165,196,247],[262,330,392],[147,175,220],[196,247,294],[123,147,185],[262,330,392],[147,175,220]],drums:[1,0,0,3,2,0,0,3,0,0,1,0,2,0,3,0,1,0,0,3,2,0,0,3,0,3,1,0,2,0,3,4,1,0,3,0,2,0,0,3,1,0,3,0,2,0,3,0,1,0,3,0,2,3,0,3,1,0,3,0,2,3,3,4,1,3,3,0,2,0,3,3,1,3,3,0,2,0,3,4,1,3,3,0,2,3,3,3,1,3,3,0,2,3,3,4,1,3,1,3,2,3,1,3,1,3,1,3,2,3,4,3,1,1,1,3,2,1,2,1,2,1,2,1,2,2,2,2]}
|
||
|
|
const track9: MusicTrack = {name:'Alien Abyss',bpm:140,synthStyle:'atmospheric',bass:[82,0,0,0,82,0,0,0,165,0,0,0,82,0,165,0,131,0,0,0,131,0,0,0,262,0,0,0,131,0,262,0,110,0,0,0,110,0,0,0,220,0,0,0,110,0,220,0,123,0,0,0,123,0,0,0,247,0,0,0,123,0,247,0,82,0,165,0,0,0,82,0,165,0,0,0,82,0,165,82,131,0,262,0,0,0,131,0,262,0,0,0,131,0,262,131,110,0,220,0,0,0,110,0,220,0,0,0,110,0,220,110,123,0,247,0,123,0,0,0,123,0,0,0,82,0,0,0],lead:[494,0,0,659,0,0,784,0,0,0,659,0,0,494,0,0,523,0,0,622,0,0,784,0,0,0,622,0,0,523,0,0,440,0,0,523,0,0,659,0,0,0,523,0,0,440,659,0,494,0,0,587,0,0,740,0,0,988,0,0,740,0,587,0,659,0,784,0,988,0,1319,0,1568,0,1319,0,988,784,659,494,523,0,659,0,784,0,1047,0,1319,0,1047,0,784,659,523,392,440,0,523,0,659,0,880,0,1047,0,880,0,659,523,440,330,494,0,587,0,740,0,988,0,740,0,587,0,494,0,0,0],arp:[330,392,494,0,392,494,0,0,330,392,494,0,392,0,0,0,262,330,392,0,330,392,0,0,262,330,392,0,330,0,0,0,220,262,330,0,262,330,0,0,220,262,330,0,262,330,0,0,247,294,370,0,294,370,494,0,247,294,370,494,294,370,494,0,330,494,659,494,330,392,494,659,784,659,494,392,330,494,392,330,262,392,523,392,262,330,392,523,659,523,392,330,262,392,330,262,220,330,440,330,220,262,330,440,523,440,330,262,220,330,262,220,247,370,494,370,247,294,370,494,587,494,370,0,0,0,0,0],chords:[[165,196,247],[262,330,392],[220,262,330],[247,294,370],[165,196,247],[196,247,294],[220,262,330],[247,294,370]],drums:[1,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0,0,0,0,3,0,1,0,0,0,0,0,3,0,2,0,0,0,0,0,3,0,1,0,0,3,0,0,3,0,2,0,3,0,0,0,3,4,1,0,0,3,2,0,3,0,1,0,0,3,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,4,1,0,3,0,2,0,3,3,1,0,3,3,2,0,3,4,1,0,3,0,2,0,3,0,1,0,0,0,0,0,0,0]}
|
||
|
|
const track10: MusicTrack = {name:'Halving Day',bpm:162,synthStyle:'heroic',bass:[131,0,262,0,131,0,196,0,131,0,262,0,131,196,262,196,156,0,311,0,156,0,233,0,156,0,311,0,156,233,311,233,117,0,233,0,117,0,175,0,117,0,233,0,117,175,233,175,98,0,196,0,98,0,147,0,98,0,196,0,98,147,196,147,131,0,262,0,131,0,196,0,131,0,262,196,131,196,262,196,104,0,208,0,104,0,156,0,104,0,208,0,104,156,208,156,87,0,175,0,87,0,131,0,87,0,175,131,87,131,175,131,98,0,196,0,98,0,147,0,98,0,196,0,98,0,0,0],lead:[523,0,622,784,1047,0,784,622,523,0,622,784,1047,1245,1568,1245,622,0,784,932,1245,0,932,784,622,784,932,1245,1568,1245,932,784,932,0,1175,1397,932,0,698,587,932,1175,1397,1865,1175,932,698,587,784,0,988,1175,1568,0,1175,988,784,988,1175,1568,1976,1568,1175,988,1245,1047,784,523,622,784,1047,1245,1568,0,1245,1047,784,622,523,622,831,0,1047,1245,831,0,622,523,831,1047,1245,1661,1245,1047,831,622,698,0,831,1047,1397,0,1047,831,698,831,1047,1397,1661,1397,1047,831,784,988,1175,1568,1976,0,1568,1175,988,784,587,784,988,1175,1568,784],arp:[262,311,392,311,262,311,392,523,392,523,392,311,262,392,311,262,311,392,466,392,311,392,466,622,466,622,466,392,311,466,392,311,233,294,349,294,233,294,349,466,349,466,349,294,233,349,294,233,392,494,587,494,392,494,587,784,587,784,587,494,392,587,494,392,262,311,392,523,392,523,622,523,392,311,262,311,392,523,392,311,208,262,311,262,208,262,311,415,311,415,311,262,208,311,262,208,349,415,523,415,349,415,523,698,523,698,523,415,349,523,415,349,392,494,587,494,392,587,494,392,587,494,392,294,392,494,587,0],chords:[[156,196,233],[131,156,196],[175,208,262],[233,294,349],[156,196,233],[131,156,196],[175,208,262],[233,294,349]],drums:[1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,4,0,1,0,3,0,2,0,3,3,1,0,3,0,2,3,3,0,1,3,3,0,2,3,3,3,1,3,1,3,2,3,4,3,1,3,3,0,2,0,3,0,1,0,3,3,2,0,3,0,1,0,3,0,2,0,3,0,1,3,3,0,2,3,4,0,1,3,1,3,2,3,3,0,1,3,1,3,2,3,1,3,1,1,1,1,2,2,2,2,2,2,4,2,1,0,0,0]}
|
||
|
|
const track11: MusicTrack = {name:'Jungle Protocol',bpm:174,synthStyle:'speed',bass:[110,0,0,110,0,0,110,0,131,0,0,131,0,110,0,0,110,0,0,110,0,0,165,0,131,0,0,131,0,175,0,0,147,0,0,147,0,0,147,0,165,0,0,165,0,147,0,0,110,0,0,110,0,0,110,165,131,0,0,131,0,0,0,0,110,0,110,0,110,0,110,131,131,0,131,0,131,110,0,0,147,0,147,0,147,0,147,165,165,0,165,0,165,147,0,0,175,0,175,0,175,0,175,196,196,0,196,0,196,175,0,0,110,0,110,131,131,0,165,147,110,0,131,0,110,0,0,0],lead:[440,0,523,0,659,0,523,440,0,0,523,659,784,0,659,523,440,0,523,0,659,784,659,523,440,523,440,0,523,659,784,0,587,0,698,0,880,0,698,587,0,0,698,880,1047,0,880,698,440,523,659,784,659,523,440,0,523,440,0,0,440,0,0,0,880,0,784,659,523,0,440,523,659,784,880,784,659,523,440,0,1047,0,880,784,659,0,523,659,784,880,1047,880,784,659,523,0,698,0,587,0,698,0,784,880,1047,880,784,698,587,0,523,587,659,784,880,1047,880,784,659,523,440,523,659,0,440,0,0,0],arp:[440,523,659,523,440,523,659,784,659,523,440,523,659,784,659,523,523,659,784,659,523,659,784,1047,784,659,523,659,784,1047,784,659,587,698,880,698,587,698,880,1047,880,698,587,698,880,1047,880,698,440,523,659,523,440,659,523,440,523,440,0,440,523,659,784,0,880,659,440,523,659,880,659,523,440,523,659,880,1047,880,659,523,1047,784,523,659,784,1047,784,659,523,659,784,1047,1319,1047,784,659,698,880,1047,880,698,880,1047,1397,1047,880,698,880,1047,1397,1047,880,659,784,880,659,523,659,784,523,440,523,659,440,440,0,0,0],chords:[[220,262,330],[262,330,392],[165,196,247],[147,175,220],[220,262,330],[175,220,262],[196,247,294],[220,262,330]],drums:[1,0,3,3,0,0,2,0,0,3,1,0,2,0,3,0,1,0,3,3,0,0,2,3,0,3,1,0,2,3,0,3,1,0,3,3,0,0,2,0,0,3,1,0,2,0,3,0,1,0,3,3,0,3,2,3,0,3,1,3,2,3,4,3,1,3,0,3,2,0,1,3,0,3,2,0,1,3,0,3,2,0,1,3,0,3,2,3,1,3,0,3,2,3,1,3,1,3,2,3,1,0,2,3,1,3,2,0,1,3,2,3,1,0,2,0,1,0,2,0,1,1,2,2,1,2,4,0]}
|
||
|
|
const track12: MusicTrack = {name:'Liquid Lightning',bpm:172,synthStyle:'speed',bass:[147,0,0,147,0,0,147,0,175,0,0,175,0,147,0,0,131,0,0,131,0,0,131,0,147,0,0,147,0,131,0,0,110,0,0,110,0,0,110,0,131,0,0,131,0,110,0,0,98,0,0,98,0,0,98,131,110,0,0,110,0,0,0,0,147,0,147,0,175,0,147,175,196,0,175,0,147,175,0,0,131,0,131,0,147,0,131,147,165,0,147,0,131,147,0,0,110,0,110,131,131,0,147,0,165,0,147,131,110,0,131,0,98,0,110,0,131,0,147,0,110,0,98,0,98,0,0,0],lead:[587,0,698,784,880,0,784,698,587,0,698,784,1047,0,880,784,523,0,587,698,784,0,698,587,523,0,587,698,880,0,784,698,440,0,523,587,659,0,587,523,440,523,587,659,784,659,587,523,392,0,440,523,587,0,523,440,392,440,523,587,523,0,0,0,1175,1047,880,784,698,587,698,784,880,1047,1175,1047,880,784,698,587,1047,880,784,698,587,523,587,698,784,880,1047,880,784,698,587,523,880,784,698,587,523,440,523,587,698,784,880,784,698,587,523,440,784,698,587,523,440,523,587,698,587,523,440,0,392,0,0,0],arp:[587,698,880,698,587,698,880,1047,880,698,587,698,880,1047,880,698,523,659,784,659,523,659,784,1047,784,659,523,659,784,1047,784,659,440,523,659,523,440,523,659,880,659,523,440,523,659,880,659,523,392,494,587,494,392,494,587,784,587,494,392,494,587,784,587,494,1047,880,698,587,698,880,1047,880,698,587,698,880,1047,1397,1047,880,880,784,587,523,587,784,880,784,587,523,587,784,880,1175,880,784,698,587,440,392,440,587,698,587,440,392,440,587,698,1047,698,587,587,523,392,294,392,523,587,523,392,294,392,523,587,0,0,0],chords:[[147,175,220],[131,165,196],[110,131,165],[98,123,147],[147,175,220],[131,165,196],[110,131,165],[147,175,220]],drums:[1,0,3,0,2,0,3,3,1,3,0,0,2,0,3,0,1,0,3,0,2,3,3,0,0,3,1,3,2,0,3,3,1,0,3,0,2,0,3,3,1,3,0,0,2,0,3,0,1,3,3,0,2,0,3,3,1,3,1,3,2,3,4,0,1,3,2,0,0,3,1,0,2,3,0,3,1,0,2,3,0,3,1,3,2,0,0,3,1,3,2,0,0,3,1,3,1,0,2,3,1,3,2,0,1,0,2,3,1,3,2,3,1,3,1,3,2,3,1,3,2,2,1,1,2,2,4,0]}
|
||
|
|
const track13: MusicTrack = {name:'Midnight Stack',bpm:92,synthStyle:'atmospheric',bass:[82,0,0,0,0,0,82,0,0,0,0,0,82,0,0,0,73,0,0,0,0,0,73,0,0,0,0,0,73,0,0,0,65,0,0,0,0,0,65,0,0,0,0,0,65,0,73,0,87,0,0,0,0,0,87,0,0,0,0,0,82,0,0,0,82,0,0,0,82,0,0,82,0,0,0,0,82,0,0,0,73,0,0,0,73,0,0,73,0,0,0,0,73,0,0,0,65,0,0,0,65,0,0,65,0,0,0,65,73,0,82,0,87,0,0,0,87,0,0,87,0,0,0,0,82,0,0,0],lead:[330,0,0,392,0,0,330,0,0,294,0,0,330,0,392,0,294,0,0,330,0,0,294,0,0,262,0,0,294,0,330,0,262,0,0,330,0,0,392,0,0,330,0,0,262,0,294,0,349,0,0,330,0,0,294,0,0,262,0,0,330,0,0,0,659,0,0,587,0,0,523,0,0,494,0,0,523,0,587,0,587,0,0,523,0,0,494,0,0,440,0,0,494,0,523,0,523,0,0,587,0,0,659,0,0,587,0,0,523,0,494,0,698,0,0,659,0,0,587,0,0,523,0,0,494,0,0,0],arp:[330,392,494,392,330,0,0,0,392,494,587,494,392,0,0,0,294,349,440,349,294,0,0,0,349,440,523,440,349,0,0,0,262,330,392,330,262,0,0,0,330,392,494,392,330,0,0,0,349,440,523,440,349,0,0,0,330,392,494,392,330,0,0,0,659,494,392,330,0,0,330,392,494,659,0,0,587,494,392,0,587,440,349,294,0,0,294,349,440,587,0,0,523,440,349,0,523,392,330,262,0,0,262,330,392,523,0,0,494,392,330,0,698,523,440,349,0,0,349,440,523,698,0,0,659,523,440,0],chords:[[165,196,247],[147,175,220],[131,165,196],[175,208,262],[165,196,247],[147,175,220],[131,165,196],[165,196,247]],drums:[1,0,0,0,0,0,3,0,2,0,0,0,0,0,3,0,1,0,0,0,0,0,3,0,2,0,0,0,0,0,0,0,1,0,0,0,0,0,3,0,2,0,0,0,0,0,3,0,1,0,0,0,0,0,3,0,2,0,0,0,0,3,0,0,1,0,3,0,0,0,3,0,2,0,0,0,0,0,3,0,1,0,0,0,0,0,3,0,2,0,3,0,0,0,0,0,1,0,3,0,0,0,3,0,2,0,0,0,0,0,3,0,1,0,0,0,0,3,3,0,2,0,0,0,0,0,0,0]}
|
||
|
|
const track14: MusicTrack = {name:"Satoshi's Lullaby",bpm:88,synthStyle:'atmospheric',bass:[110,0,0,0,0,0,0,0,110,0,0,0,0,0,110,0,131,0,0,0,0,0,0,0,131,0,0,0,0,0,131,0,98,0,0,0,0,0,0,0,98,0,0,0,0,0,98,0,87,0,0,0,0,0,0,0,87,0,0,0,0,0,0,0,110,0,0,0,110,0,0,0,0,0,0,0,110,0,0,0,131,0,0,0,131,0,0,0,0,0,0,0,131,0,0,0,98,0,0,0,98,0,0,0,0,0,0,0,98,0,110,0,87,0,0,0,87,0,0,0,0,0,0,0,110,0,0,0],lead:[440,0,0,523,0,0,0,0,440,0,0,392,0,0,0,0,523,0,0,587,0,0,0,0,523,0,0,494,0,0,0,0,392,0,0,440,0,0,0,0,392,0,0,349,0,0,0,0,349,0,0,392,0,0,0,0,330,0,0,0,0,0,0,0,880,0,0,784,0,0,659,0,587,0,0,523,0,0,0,0,1047,0,0,880,0,0,784,0,659,0,0,587,0,0,0,0,784,0,0,659,0,0,587,0,523,0,0,440,0,0,494,0,698,0,0,659,0,0,587,0,523,0,0,0,440,0,0,0],arp:[220,262,330,262,220,0,0,0,262,330,392,330,262,0,0,0,262,330,392,330,262,0,0,0,330,392,494,392,330,0,0,0,196,247,294,247,196,0,0,0,247,294,349,294,247,0,0,0,175,220,262,220,175,0,0,0,220,262,330,262,220,0,0,0,440,330,262,220,0,0,262,330,440,0,0,0,392,330,262,0,523,392,330,262,0,0,330,392,523,0,0,0,494,392,330,0,392,294,247,196,0,0,247,294,392,0,0,0,349,294,247,0,349,262,220,175,0,0,220,262,349,0,0,0,330,262,220,0],chords:[[220,262,330],[262,330,392],[196,247,294],[175,220,262],[220,262,330],[262,330,392],[196,247,294],[220,262,330]],drums:[1,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,0,0,0,0,3,0,2,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,0,0,0,0,3,0,2,0,0,0,0,0,3,0,1,0,0,0,0,0,3,0,2,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0,0,0,0,3,0,1,0,0,0,0,0,3,0,2,0,0,0,0,0,0,0,1,0,3,0,0,0,3,0,2,0,0,0,0,0,0,0]}
|
||
|
|
const track15: MusicTrack = {name:'Skanking Satoshi',bpm:210,synthStyle:'funky',bass:[196,0,196,0,196,0,196,196,247,0,247,0,247,0,247,0,262,0,262,0,262,0,262,262,294,0,294,0,294,0,294,0,196,0,196,0,196,0,196,196,175,0,175,0,175,0,175,0,147,0,147,0,147,0,147,147,165,0,165,0,196,0,0,0,196,0,196,247,196,0,247,0,262,0,262,294,262,0,294,0,294,0,294,330,294,0,330,0,262,0,262,294,262,0,247,0,196,0,196,247,262,0,294,0,247,0,247,262,247,0,196,0,147,0,165,0,175,0,196,0,247,0,262,0,196,0,0,0],lead:[784,0,784,880,784,0,659,0,784,0,880,988,880,0,784,0,1047,0,1047,1175,1047,0,880,0,1047,0,1175,1319,1175,0,1047,0,784,0,784,880,784,0,659,0,698,0,698,784,698,0,587,0,587,0,587,659,587,0,523,0,659,0,784,0,784,0,0,0,1568,0,1319,1175,1047,0,880,0,1175,0,1047,880,784,0,659,0,1319,0,1175,1047,880,0,784,0,1047,0,880,784,659,0,587,0,784,0,880,1047,1175,0,1319,0,1175,0,1047,880,784,0,659,0,587,659,784,880,1047,0,880,784,659,784,880,0,784,0,0,0],arp:[0,392,0,392,0,392,0,392,0,494,0,494,0,494,0,494,0,523,0,523,0,523,0,523,0,587,0,587,0,587,0,587,0,392,0,392,0,392,0,392,0,349,0,349,0,349,0,349,0,294,0,294,0,294,0,294,0,330,0,330,0,392,0,0,784,0,659,0,784,0,880,0,784,0,659,0,523,0,659,0,1047,0,880,0,1047,0,1175,0,1047,0,880,0,659,0,880,0,784,0,659,0,784,0,880,1047,880,0,784,0,659,0,523,0,587,0,659,0,784,0,880,0,1047,0,880,0,784,0,0,0],chords:[[196,247,294],[262,330,392],[196,247,294],[175,220,262],[147,175,220],[165,208,247],[196,247,294],[196,247,294]],drums:[1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,3,4,3,1,3,3,3,2,3,3,3,1,3,3,3,2,3,3,3,1,3,3,3,2,3,3,3,1,3,3,3,2,3,3,3,1,3,3,3,2,3,3,3,1,3,3,3,2,3,3,3,1,3,3,3,2,3,3,3,1,1,2,2,1,2,4,0]}
|
||
|
|
const track16: MusicTrack = {name:'Rudeboy Relay',bpm:205,synthStyle:'funky',bass:[175,0,175,0,175,0,175,175,220,0,220,0,220,0,220,0,196,0,196,0,196,0,196,196,262,0,262,0,262,0,262,0,175,0,175,0,175,0,175,175,233,0,233,0,233,0,233,0,147,0,147,0,147,0,147,147,175,0,175,0,175,0,0,0,175,0,220,0,175,0,220,233,262,0,233,0,220,0,175,0,196,0,233,0,196,0,262,0,233,0,196,0,175,0,147,0,175,0,220,0,262,0,233,0,196,0,175,0,220,0,262,0,233,0,196,0,175,0,147,0,175,0,196,0,175,0,0,0],lead:[698,0,698,784,698,0,587,0,698,0,784,880,784,0,698,0,784,0,784,880,784,0,698,0,1047,0,880,784,880,0,784,0,698,0,698,784,698,0,587,0,932,0,880,784,880,0,784,0,587,0,587,698,587,0,523,0,587,0,698,0,698,0,0,0,1397,0,1175,1047,880,0,784,0,1047,0,880,784,698,0,587,0,1568,0,1397,1175,1047,0,880,0,1175,0,1047,880,784,0,698,0,698,0,784,880,1047,0,1175,0,1047,0,880,784,698,0,587,0,523,587,698,784,880,0,784,698,587,698,784,0,698,0,0,0],arp:[0,349,0,349,0,349,0,349,0,440,0,440,0,440,0,440,0,392,0,392,0,392,0,392,0,523,0,523,0,523,0,523,0,349,0,349,0,349,0,349,0,466,0,466,0,466,0,466,0,294,0,294,0,294,0,294,0,349,0,349,0,349,0,0,698,0,587,0,698,0,784,0,698,0,587,0,523,0,587,0,784,0,698,0,784,0,880,0,784,0,698,0,587,0,698,0,698,0,587,0,698,0,784,880,784,0,698,0,587,0,523,0,523,0,587,0,698,0,784,0,880,0,784,0,698,0,0,0],chords:[[175,220,262],[196,247,294],[175,220,262],[233,294,349],[147,175,220],[175,220,262],[196,247,294],[175,220,262]],drums:[1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,3,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,3,3,0,2,3,4,0,1,3,3,3,2,3,3,3,1,3,3,3,2,3,3,3,1,3,3,3,2,3,3,3,1,3,3,3,2,3,3,3,1,3,3,3,2,3,3,3,1,3,3,3,2,3,3,3,1,3,1,3,2,3,1,3,1,1,2,2,2,2,4,0]}
|
||
|
|
const track17: MusicTrack = {name:'Final Hashrate',bpm:145,synthStyle:'boss',bass:[131,0,131,0,0,0,131,0,131,0,0,131,0,0,131,0,123,0,123,0,0,0,123,0,123,0,0,123,0,0,123,0,110,0,110,0,0,0,110,0,110,0,0,110,0,0,131,0,98,0,98,0,0,0,98,0,98,0,0,98,0,0,0,0,131,0,131,131,0,131,0,131,131,0,131,0,131,156,175,196,123,0,123,123,0,123,0,123,123,0,123,0,123,147,165,175,110,0,110,110,0,110,0,110,110,0,110,0,110,131,147,165,98,0,98,110,110,0,131,0,131,0,110,98,131,0,0,0],lead:[523,0,622,0,784,0,622,523,0,0,622,784,932,0,784,622,494,0,587,0,740,0,587,494,0,0,587,740,880,0,740,587,440,0,523,0,659,0,523,440,0,0,523,659,784,0,659,523,392,0,466,0,587,0,466,392,0,0,466,587,523,0,0,0,1047,0,932,784,622,0,523,622,784,932,1047,932,784,622,523,0,988,0,880,740,587,0,494,587,740,880,988,880,740,587,494,0,880,0,784,659,523,0,440,523,659,784,880,784,659,523,440,0,784,0,740,622,523,622,740,880,1047,932,784,622,523,0,0,0],arp:[262,311,392,311,262,311,392,523,392,311,262,311,392,523,392,311,247,294,370,294,247,294,370,494,370,294,247,294,370,494,370,294,220,262,330,262,220,262,330,440,330,262,220,262,330,440,330,262,196,233,294,233,196,233,294,392,294,233,196,233,294,392,294,233,523,392,311,262,311,392,523,622,523,392,311,262,392,523,622,784,494,370,294,247,294,370,494,587,494,370,294,247,370,494,587,740,440,330,262,220,262,330,440,523,440,330,262,220,330,440,523,659,392,294,233,196,233,294,392,466,392,294,233,196,262,0,0,0],chords:[[131,156,196],[123,147,175],[110,131,165],[98,123,147],[131,156,196],[123,147,175],[110,131,165],[131,156,196]],drums:[1,0,0,0,2,0,0,0,1,0,3,0,2,0,3,0,1,0,0,0,2,0,0,0,1,0,3,0,2,0,3,4,1,0,0,0,2,0,0,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,3,1,3,2,2,4,4,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,4,1,0,3,0,2,0,3,0,1,3,1,0,2,0,3,0,1,3,1,0,2,0,3,0,1,3,1,3,2,3,1,3,1,1,2,2,4,4,4,4]}
|
||
|
|
const track18: MusicTrack = {name:'Whale Alert',bpm:155,synthStyle:'boss',bass:[117,0,117,0,0,0,117,0,117,0,0,117,0,0,117,0,110,0,110,0,0,0,110,0,110,0,0,110,0,0,110,0,87,0,87,0,0,0,87,0,87,0,0,87,0,0,87,0,98,0,98,0,0,0,98,0,98,0,0,98,0,0,0,0,117,0,117,117,0,117,0,117,117,0,117,0,117,131,147,175,110,0,110,110,0,110,0,110,110,0,110,0,110,123,131,147,87,0,87,87,0,87,0,87,87,0,87,0,87,98,110,117,98,0,98,110,117,0,131,0,117,0,98,87,117,0,0,0],lead:[466,0,554,0,698,0,554,466,0,0,554,698,880,0,698,554,440,0,523,0,659,0,523,440,0,0,523,659,831,0,659,523,349,0,415,0,523,0,415,349,0,0,415,523,698,0,523,415,392,0,466,0,587,0,466,392,0,0,466,587,466,0,0,0,932,0,880,698,554,0,466,554,698,880,932,880,698,554,466,0,880,0,831,659,523,0,440,523,659,831,880,831,659,523,440,0,698,0,659,523,415,0,349,415,523,659,698,659,523,415,349,0,784,0,698,587,466,554,698,880,932,880,698,554,466,0,0,0],arp:[233,277,349,277,233,277,349,466,349,277,233,277,349,466,349,277,220,262,330,262,220,262,330,440,330,262,220,262,330,440,330,262,175,208,262,208,175,208,262,349,262,208,175,208,262,349,262,208,196,233,294,233,196,233,294,392,294,233,196,233,294,392,294,233,466,349,277,233,277,349,466,554,466,349,277,233,349,466,554,698,440,330,262,220,262,330,440,523,440,330,262,220,330,440,523,659,349,262,208,175,208,262,349,415,349,262,208,175,262,349,415,523,392,294,233,196,233,294,392,466,392,294,233,196,233,0,0,0],chords:[[117,139,175],[110,131,165],[87,110,131],[98,117,147],[117,139,175],[110,131,165],[87,110,131],[117,139,175]],drums:[1,0,3,0,2,0,0,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,0,0,1,0,3,0,2,0,3,4,1,0,3,0,2,0,0,0,1,0,3,0,2,0,3,0,1,0,3,0,2,3,3,0,1,3,1,3,2,2,4,4,1,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,1,0,3,4,1,0,3,0,2,0,3,0,1,0,3,0,1,3,1,3,2,0,3,0,1,3,1,3,2,0,3,0,1,3,1,3,2,3,1,3,1,1,2,2,4,4,4,4]}
|
||
|
|
const track19: MusicTrack = {name:'8-Bit Blockwar',bpm:190,synthStyle:'bouncy',bass:[165,0,165,0,165,0,330,0,165,0,165,0,247,0,165,0,196,0,196,0,196,0,392,0,196,0,196,0,294,0,196,0,220,0,220,0,220,0,440,0,220,0,220,0,330,0,220,0,147,0,147,0,147,0,294,0,147,0,147,0,220,0,0,0,165,165,0,165,0,165,330,165,196,196,0,196,0,196,392,196,220,220,0,220,0,220,440,220,147,147,0,147,0,147,294,147,165,0,196,0,220,0,247,0,262,0,294,0,330,0,349,0,165,0,247,0,330,0,247,0,165,0,247,0,165,0,0,0],lead:[659,0,784,0,988,0,784,659,784,988,1319,988,784,0,659,0,784,0,988,0,1175,0,988,784,988,1175,1568,1175,988,0,784,0,880,0,1047,0,1319,0,1047,880,1047,1319,1760,1319,1047,0,880,0,587,0,698,0,880,0,698,587,698,880,1175,880,698,0,0,0,1319,1175,988,784,659,784,988,1175,1319,0,1175,988,784,659,784,988,1568,1319,1175,988,784,988,1175,1319,1568,0,1319,1175,988,784,988,1175,1760,1568,1319,1175,988,1175,1319,1568,1760,0,1568,1319,1175,988,784,0,1175,988,784,659,784,988,1175,1319,1568,1319,1175,988,659,0,0,0],arp:[330,392,494,659,494,392,330,392,494,659,494,392,330,494,659,330,392,494,587,784,587,494,392,494,587,784,587,494,392,587,784,392,440,523,659,880,659,523,440,523,659,880,659,523,440,659,880,440,294,349,440,587,440,349,294,349,440,587,440,349,294,440,587,0,659,494,330,494,659,988,659,494,330,494,659,988,1319,988,659,494,784,587,392,587,784,1175,784,587,392,587,784,1175,1568,1175,784,587,880,659,440,659,880,1319,880,659,440,659,880,1319,1760,1319,880,659,587,440,294,440,587,880,587,440,294,440,587,880,659,0,0,0],chords:[[165,208,247],[196,247,294],[220,262,330],[147,175,220],[165,208,247],[196,247,294],[220,262,330],[165,208,247]],drums:[1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,3,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,3,1,0,3,3,2,3,4,0,1,0,3,3,2,0,3,3,1,0,3,3,2,0,3,3,1,0,3,3,2,0,3,3,1,0,3,3,2,3,4,3,1,3,1,3,2,3,1,3,1,3,1,3,2,3,1,3,1,3,1,3,2,3,1,3,1,1,2,2,1,2,4,0]}
|
||
|
|
const track20: MusicTrack = {name:'Pixel Proof',bpm:185,synthStyle:'bouncy',bass:[220,0,220,0,220,0,440,0,220,0,220,0,330,0,220,0,196,0,196,0,196,0,392,0,196,0,196,0,294,0,196,0,175,0,175,0,175,0,349,0,175,0,175,0,262,0,175,0,165,0,165,0,165,0,330,0,165,0,165,0,247,0,0,0,220,220,0,220,0,220,440,220,196,196,0,196,0,196,392,196,175,175,0,175,0,175,349,175,165,165,0,165,0,165,330,165,220,0,196,0,175,0,165,0,175,0,196,0,220,0,247,0,220,0,330,0,440,0,330,0,220,0,330,0,220,0,0,0],lead:[880,0,1047,0,1319,0,1047,880,1047,1319,1760,1319,1047,0,880,0,784,0,932,0,1175,0,932,784,932,1175,1568,1175,932,0,784,0,698,0,880,0,1047,0,880,698,880,1047,1397,1047,880,0,698,0,659,0,784,0,988,0,784,659,784,988,1319,988,784,0,0,0,1760,1568,1319,1047,880,1047,1319,1568,1760,0,1568,1319,1047,880,1047,1319,1568,1397,1175,932,784,932,1175,1397,1568,0,1397,1175,932,784,932,1175,1397,1319,1047,880,698,880,1047,1319,1397,0,1319,1047,880,698,880,0,1319,1175,988,784,659,784,988,1175,1319,1175,988,784,880,0,0,0],arp:[440,523,659,880,659,523,440,523,659,880,659,523,440,659,880,440,392,494,587,784,587,494,392,494,587,784,587,494,392,587,784,392,349,440,523,698,523,440,349,440,523,698,523,440,349,523,698,349,330,415,494,659,494,415,330,415,494,659,494,415,330,494,659,0,880,659,440,523,659,880,1319,880,659,523,659,880,1319,1760,1319,880,784,587,392,494,587,784,1175,784,587,494,587,784,1175,1568,1175,784,698,523,349,440,523,698,1047,698,523,440,523,698,1047,1397,1047,698,659,494,330,415,494,659,988,659,494,415,494,659,880,0,0,0],chords:[[220,277,330],[196,247,294],[175,220,262],[165,208,247],[220,277,330],[196,247,294],[175,220,262],[220,277,330]],drums:[1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,3,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,0,1,0,3,0,2,0,3,3,1,3,3,0,2,3,4,0,1,0,3,3,2,0,3,3,1,0,3,3,2,0,3,3,1,0,3,3,2,0,3,3,1,3,3,3,2,3,4,3,1,3,1,3,2,0,3,3,1,3,1,3,2,0,3,3,1,3,1,3,2,3,1,3,1,1,2,2,2,2,4,0]}
|
||
|
|
|
||
|
|
const ALL_TRACKS = [track1, track2, track3, track4, track5, track6, track7, track8, track9, track10, track11, track12, track13, track14, track15, track16, track17, track18, track19, track20]
|
||
|
|
let activeTrack: MusicTrack = track1
|
||
|
|
let barIndex = 0
|
||
|
|
|
||
|
|
// === MUSIC INTENSITY ===
|
||
|
|
|
||
|
|
let currentIntensity = 0.5
|
||
|
|
|
||
|
|
export function setMusicIntensity(level: number) {
|
||
|
|
currentIntensity = Math.max(0, Math.min(1, level))
|
||
|
|
const musicGain = getMusicGain()
|
||
|
|
if (!musicGain) return
|
||
|
|
const baseVol = 0.06
|
||
|
|
const maxVol = 0.18
|
||
|
|
const targetVol = baseVol + (maxVol - baseVol) * currentIntensity
|
||
|
|
const c = getCtx()
|
||
|
|
musicGain.gain.cancelScheduledValues(c.currentTime)
|
||
|
|
musicGain.gain.setTargetAtTime(targetVol, c.currentTime, 0.3)
|
||
|
|
}
|
||
|
|
|
||
|
|
// === PLAYBACK ===
|
||
|
|
|
||
|
|
function playMusicBar() {
|
||
|
|
const musicGain = getMusicGain()
|
||
|
|
if (!isMusicPlaying() || !musicGain) return
|
||
|
|
const c = getCtx()
|
||
|
|
getMusicDelay() // ensure delay is created
|
||
|
|
|
||
|
|
const dynamicBpm = activeTrack.bpm + currentIntensity * 8
|
||
|
|
const beat = 60 / dynamicBpm
|
||
|
|
const now = c.currentTime + 0.05
|
||
|
|
const bar = barIndex % BARS
|
||
|
|
const off = bar * STEPS
|
||
|
|
const step = beat / 2
|
||
|
|
|
||
|
|
const isChorus = bar >= 4
|
||
|
|
const leadThreshold = isChorus ? 0.15 : 0.4
|
||
|
|
const arpThreshold = isChorus ? 0.25 : 0.55
|
||
|
|
|
||
|
|
const switchEvery = currentIntensity > 0.7 ? 8 : currentIntensity > 0.4 ? 16 : 24
|
||
|
|
if (barIndex > 0 && barIndex % switchEvery === 0) {
|
||
|
|
const prevTrack = activeTrack
|
||
|
|
const others = ALL_TRACKS.filter(t => t !== activeTrack)
|
||
|
|
const chill = others.filter(t => t.bpm < 155)
|
||
|
|
const mid = others.filter(t => t.bpm >= 155 && t.bpm < 168)
|
||
|
|
const intense = others.filter(t => t.bpm >= 168)
|
||
|
|
if (currentIntensity > 0.7 && intense.length > 0) {
|
||
|
|
activeTrack = intense[Math.floor(Math.random() * intense.length)]
|
||
|
|
} else if (currentIntensity < 0.3 && chill.length > 0) {
|
||
|
|
activeTrack = chill[Math.floor(Math.random() * chill.length)]
|
||
|
|
} else if (mid.length > 0 && Math.random() < 0.5) {
|
||
|
|
activeTrack = mid[Math.floor(Math.random() * mid.length)]
|
||
|
|
} else {
|
||
|
|
activeTrack = others[Math.floor(Math.random() * others.length)]
|
||
|
|
}
|
||
|
|
if (activeTrack !== prevTrack && musicGain) {
|
||
|
|
const curVol = musicGain.gain.value
|
||
|
|
musicGain.gain.setValueAtTime(curVol, now)
|
||
|
|
musicGain.gain.linearRampToValueAtTime(curVol * 0.25, now + 0.08)
|
||
|
|
musicGain.gain.linearRampToValueAtTime(curVol, now + 0.4)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
const barDur = STEPS * step
|
||
|
|
const padFreqs = activeTrack.chords[bar].map(f => f * 2)
|
||
|
|
STYLE_PAD[activeTrack.synthStyle](padFreqs, barDur, musicGain, now)
|
||
|
|
|
||
|
|
for (let i = 0; i < STEPS; i++) {
|
||
|
|
const t = now + i * step
|
||
|
|
const idx = off + i
|
||
|
|
const nd = step - 0.01
|
||
|
|
|
||
|
|
if (activeTrack.bass[idx] > 0) STYLE_BASS[activeTrack.synthStyle](activeTrack.bass[idx], nd, musicGain, t)
|
||
|
|
|
||
|
|
if (activeTrack.lead[idx] > 0 && currentIntensity > leadThreshold) {
|
||
|
|
STYLE_LEAD[activeTrack.synthStyle](activeTrack.lead[idx], nd * 0.8, musicGain, t)
|
||
|
|
}
|
||
|
|
|
||
|
|
if (activeTrack.arp[idx] > 0 && currentIntensity > arpThreshold) {
|
||
|
|
chorusTone(activeTrack.arp[idx], STYLE_ARP_TYPE[activeTrack.synthStyle], nd * 0.6, musicGain, t, 0.04 + currentIntensity * 0.04)
|
||
|
|
}
|
||
|
|
|
||
|
|
const d = activeTrack.drums[idx]
|
||
|
|
if (d === 1) kick(musicGain, t)
|
||
|
|
if (d === 2 && currentIntensity > 0.2) snare(musicGain, t)
|
||
|
|
if (d === 3) hihat(musicGain, t, false)
|
||
|
|
if (d === 4 && currentIntensity > 0.4) hihat(musicGain, t, true)
|
||
|
|
|
||
|
|
if (isChorus && currentIntensity > 0.6 && d === 0 && i % 4 === 2 && Math.random() < 0.3) {
|
||
|
|
snare(musicGain, t)
|
||
|
|
}
|
||
|
|
|
||
|
|
if (currentIntensity > 0.85 && i === 14 && Math.random() < 0.3) {
|
||
|
|
hihat(musicGain, t, true)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
barIndex++
|
||
|
|
setMusicTimeout(window.setTimeout(playMusicBar, barDur * 1000 - 50))
|
||
|
|
}
|
||
|
|
|
||
|
|
export function startMusic() {
|
||
|
|
getCtx()
|
||
|
|
if (isMusicPlaying()) return
|
||
|
|
activeTrack = ALL_TRACKS[Math.floor(Math.random() * ALL_TRACKS.length)]
|
||
|
|
setMusicPlaying(true)
|
||
|
|
barIndex = 0
|
||
|
|
playMusicBar()
|
||
|
|
}
|
||
|
|
|
||
|
|
export function stopMusic() {
|
||
|
|
setMusicPlaying(false)
|
||
|
|
const timeout = getMusicTimeout()
|
||
|
|
if (timeout) {
|
||
|
|
clearTimeout(timeout)
|
||
|
|
setMusicTimeout(null)
|
||
|
|
}
|
||
|
|
if (delayNode) { delayNode.disconnect(); delayNode = null }
|
||
|
|
if (delayGain) { delayGain.disconnect(); delayGain = null }
|
||
|
|
}
|