Ambient Instruments
A visualizer and playable synth driven by live weather, seismic, and space-weather data. QWERTY and MIDI playable, one register away.
OR PLUG IN A MIDI KEYBOARD
The signal chain
WEATHER · SEISMIC · SPACE WEATHER · TIME OF DAYLive weather, seismic, and space-weather feeds polled through /api/ambient — the same data drives the background field site-wide.
A drone bed scored by the data; a Rhodes voice on QWERTY/MIDI. Scene handoff crossfades when the background changes.
QWERTY maps A–K with Z/X octaves; MIDI devices attach automatically. The keyboard hint renders whenever sound is on.
A live procedural visualizer and playable synth on real data. The field renders continuously, scored by weather, seismic activity, and space-weather feeds. The same payload drives every background on the site — pro, drift, classic, canvas, terminal. Switch background and the audio scene crossfades with it.
Every source lives on-device. The synth is Web Audio; the input is QWERTY and MIDI; no third-party player, no license check.
// lib/input/qwerty-piano.ts — Ableton's awsedftgyhujk row
const KEY_TO_SEMITONE: Record<string, number> = {
a: 0, // C
w: 1, // C#
s: 2, // D
e: 3, // D#
d: 4, // E
f: 5, // F
t: 6, // F#
g: 7, // G
};// GET /api/ambient — one poll, five sources
{
"weather": { temperature, wind, dir, ... },
"seismic": { count, mostRecentMagnitude, mostRecentMs },
"space": { kpIndex, plasmaTemp },
"solarEvents": { flares, cmes },
"precipitation": { forecast, nowcast }
}Weather comes from Open-Meteo — temperature, wind, precipitation for the site's location. Seismic events come from USGS FDSN-WS within 600 km of Los Angeles over the last six hours. Space weather comes from NOAA SWPC — Kp index and plasma temperature. Solar events come from NASA DONKI. Precipitation forecasts come from Open-Meteo.
Each source has its own cache window: weather ten minutes, seismic sixty seconds, space five minutes. The union lands at /api/ambient and the background reads it. When a new quake or a Kp spike arrives, the field responds within one poll.
QWERTY maps A–K to the diatonic scale from C4, with W E T Y U for the sharps and Z / X shifting octaves. Static background swaps the layout to drums: Z kick, X snare, C V hi-hats, B clap, N M toms. MIDI keyboards attach automatically the moment they connect.
The keys in the hero above are click-playable — tapping a key dispatches the same NoteEvent the QWERTY adapter emits, so click and keystroke reach the synth the same way.