Weather, as sound
The next 24 hours over Mougins, played: wind as noise from where it blows, rain as drops, the clouds as a chord. Made in the browser from the forecast Ciel draws.
Listening for the forecast…
Weather data by Open-Meteo.com (CC BY 4.0).
// Wind: a low rumble (brown noise) through a band that rises with the
// speed, panned to where it blows from, looking south.
const windNoise = noise(context, "brown");
const windBand = context.createBiquadFilter();
windBand.type = "bandpass";
windNoise.connect(windBand).connect(windGain).connect(windPan).connect(wind.gain);
// Each new hour's mix is glided to, never jumped to, so moving the hour
// morphs one sky's sound into the next.
set(next) {
glide(windGain.gain, next.wind.level);
glide(windBand.frequency, next.wind.frequency);
glide(windPan.pan, next.wind.pan);
voices.forEach((voice, index) => {
glide(voice.oscillator.frequency, next.pad.voices[index], CHORD_GLIDE);
glide(voice.gain.gain, next.pad.gains[index]);
});
}
// A drop of rain: a short, bright plink, somewhere across the stereo field.
const drop = () => {
const oscillator = context.createOscillator();
oscillator.frequency.value = 1800 + Math.random() * 2400;
gain.gain.linearRampToValueAtTime(0.03 + Math.random() * 0.04, time + 0.003);
gain.gain.exponentialRampToValueAtTime(0.0001, time + 0.04 + Math.random() * 0.05);
oscillator.connect(gain).connect(pan).connect(rain.gain);
oscillator.start(time);
oscillator.stop(time + 0.12);
};Listening to a forecast
The forecast is Ciel's, the same 25 hours from Open-Meteo, and each part of it has a sound. Wind is noise, a low rumble through a band that rises with its speed, swelling in gusts that vary more the windier it is, and panned to where it blows from, as if you were looking south from Mougins: an easterly comes from the left. Rain is a high hiss and drops, short plinks at random, more of them the harder it rains; snow is a muffled hush.
The clouds are a chord of six soft voices, two per register. The chord follows the sky, from an open C major 9 when it's clear down to a low, close E minor when it's overcast, all on C major's notes so one can glide into the next, and each register is as loud as its deck is thick: cirrus sounds high, fog low. By day the sun adds a high tone, louder the higher it is and the clearer the sky; on clear nights the stars ring as chimes.
No samples
Everything is made in the browser with Web Audio: buffers of white and brown noise, filters, oscillators and gains, nothing downloaded. Moving the hour doesn't cut from one sound to the next: every value glides, the chord over a second and a half, so dragging through the day morphs one sky into another. A compressor keeps a stormy hour in check.
Browsers only let a page make sound after a click, so the audio is built on the first press of Play. The bars are each layer's spectrum, read from an analyser twenty times a second while it plays on screen; with reduced motion they hold still at each layer's level. The sentence under them says what's playing, for anyone who can't hear it.