// Mountain Storm Climber - A Tone.js Composition
// Captures the relentless ascent through treacherous weather conditions
// Global setup
Tone.Transport.bpm.value = 90; // Steady but challenging pace
const now = Tone.now();
// Create storm atmosphere - Wind and thunder textures
const windNoise = new Tone.NoiseSynth({
noise: { type: "brown" },
envelope: { attack: 10, decay: 15, sustain: 1, release: 5 }
}).chain(
new Tone.Filter(200, "highpass"),
new Tone.FrequencyShifter(-1.5),
new Tone.Reverb(10).set({ wet: 0.6 }),
Tone.Destination
);
const thunder = new Tone.MembraneSynth({
pitchDecay: 0.05,
envelope: { attack: 0.01, decay: 1.5, sustain: 0, release: 0.1 }
}).chain(
new Tone.Distortion(0.8),
new Tone.Filter(40, "lowpass"),
Tone.Destination
);
// Create climbing rhythm section - Driving pulse through adversity
const kick = new Tone.MembraneSynth().toDestination();
const snare = new Tone.Synth({
oscillator: { type: "noise" },
envelope: { attack: 0.001, decay: 0.2, sustain: 0 }
}).chain(new Tone.Gain(0.4), Tone.Destination);
const hihat = new Tone.MetalSynth().chain(
new Tone.Filter(8000, "highpass"),
new Tone.Gain(0.1),
Tone.Destination
);
// Create harmonic texture - Majestic but ominous mountain presence
const mountainPad = new Tone.PolySynth(Tone.Synth, {
oscillator: { type: "sawtooth" },
envelope: { attack: 2, decay: 1, sustain: 0.7, release: 4 }
}).chain(
new Tone.Chorus(1, 2.5, 0.5),
new Tone.Freeverb(0.7, 3000).set({ wet: 0.5 }),
new Tone.Panner(0.3),
Tone.Destination
);
// Create climbing melody - Heroic struggle against elements
const climberMelody = new Tone.MonoSynth({
oscillator: { type: "pulse", width: 0.3 },
envelope: { attack: 0.05, decay: 0.3, sustain: 0.4, release: 0.2 },
portamento: 0.05
}).chain(
new Tone.Vibrato(5, 0.3),
new Tone.Distortion(0.2),
new Tone.Panner(-0.8),
Tone.Destination
);
// Schedule storm atmosphere
Tone.Transport.scheduleRepeat(time => {
windNoise.triggerAttack(time);
}, 15, now); // Wind sustains throughout
Tone.Transport.schedule(time => {
thunder.triggerAttackRelease("C1", "1m", time);
}, now + 5); // Distant thunder
Tone.Transport.schedule(time => {
thunder.triggerAttackRelease("A0", "1m", time);
}, now + 18); // Closer thunder
// Schedule climbing rhythm - Driving pulse through adversity
Tone.Transport.scheduleRepeat(time => {
kick.triggerAttackRelease("C2", "8n", time);
}, "4n", now + 1); // Steady footsteps
Tone.Transport.scheduleRepeat(time => {
snare.triggerAttackRelease("A2", "16n", time);
}, "2n", now + 1.5); // Slipping rocks
Tone.Transport.scheduleRepeat(time => {
hihat.triggerAttackRelease("16n", time);
}, "8n", [now + 8, now + 24]); // Wind gusts
// Schedule mountain presence - Slow harmonic shifts
const mountainChords = new Tone.Part((time, chord) => {
mountainPad.triggerAttackRelease(chord, "2m", time);
}, [
[now + 4, ["E3", "G3", "B3", "D4"]], // Em9 - Foreboding
[now + 12, ["E3", "A3", "C#4", "E4"]], // A/C# - Momentary lift
[now + 20, ["D3", "F#3", "A3", "C4"]], // Dm7 - Renewed tension
[now + 28, ["E3", "G3", "B3", "D4"]] // Em9 - Unresolved
]);
// Schedule climber's melody - Heroic struggle motif
const ascentMelody = new Tone.Sequence(
(time, note) => {
climberMelody.triggerAttackRelease(note, "8n", time);
},
["E4", "G4", "A4", "B4", "C5", "B4", "G4", "E4"], // E minor ascent/descent
"2n",
now + 6
).loop = false;
// Add intensity variations
ascentMelody.events[3].velocity = 0.8; // Peak intensity
ascentMelody.events[7].velocity = 0.4; // Descent exhaustion
// Start scheduled parts
mountainChords.start();
ascentMelody.start();