Stillness
An ambient piece you play by keeping still, heard through a rainy window that follows your own sky.
- what
- audio installation, 2026
- my part
- idea, sound and direction; built with Claude as the engineer
- built with
- typescript · web audio · audioworklet · webgl2 · glsl · strudel
notes on the making
Most interactive music rewards doing more. I wanted the opposite: a piece where the thing you do is stop. Move, and the glass clears and the sound stirs into bright, tumbling notes. Keep still, and over about a minute it settles into a slow, evolving haze that can play for hours, something to work or rest to. The mood I was after was the PS2 start-up screen: deep, glassy tones hanging in a huge dark room. Not a sound to copy, a feeling to aim for.
Two rules shaped everything. Every sound is synthesised live in the visitor's browser, with nothing recorded. And nothing about how it works should be obvious. I set the direction, judged every change by ear and eye, and Claude wrote the code.
01one number
The whole piece hangs off a single value, energy, from 0 (perfectly still) to 1 (stirred right up). Stirring adds to it, faster movement adds more, and a separate value, gust, tracks how hard you're moving right now. Energy sets how stretched the sound is, how bright the synths are, how many notes play and the blend of dry against stretched.
The first version drained energy exponentially, losing a fixed share every second. That sounds natural on paper, but it puts the biggest change right after you stop, and the settle felt like a door slamming. Now nothing happens for 6 seconds, then energy glides down an S-curve over about 75 seconds: slow start, steady middle, soft landing.
One bug taught me something about browsers. Stir, switch tabs, and the piece stayed stuck in its stirred state. The settle clock ran on requestAnimationFrame, which browsers pause in hidden tabs to save battery. The audio thread is never paused, or the music would stop, so it now sends a tick about 20 times a second, and those ticks drive the settle, the arpeggio and the hits whenever the tab is hidden.
02the stretch
The settled sound comes from a stretch I wanted to own rather than borrow: a paulstretch-style effect running in an AudioWorklet, with a hand-written FFT and no libraries. It takes one window of audio, keeps how loud each frequency is, throws away the timing by randomising the phases, and blends the slices back together. That's the trick that turns a chord into haze.
for (let k = 1; k < hop; k++) {
const ph = Math.random() * 2 * Math.PI;
re[k] = mag[k] * Math.cos(ph);
im[k] = mag[k] * Math.sin(ph);
}
Random-phase slices don't line up, so they're blended with a constant-power sine window; a Hann window made the level pulse. The FFT work is spread one step per 128-sample block, because phones fail on their worst block, not their average. Before any of the piece existed we ran a go/no-go test on an iPhone 11, the reference phone, reading Chrome's playbackStats.underrunEvents as the honest dropout count.
The stretch went through one real redesign. My first version kept a 20 second recording and let each layer fall further and further behind live. At a big stretch, that backlog took minutes to play out, so every control acted on sound minutes old, and synths I'd stopped came back long after. It felt like it had a mind of its own. Now each layer may drift at most a few seconds behind live, a random limit between 3 and 6, then jumps back to now, each at its own moment, so the haze keeps renewing. Hold freezes one slice's spectrum and keeps re-randomising it. A big stretch can no longer wander through the distant past. I chose that trade, and the 6 second limit: the controls answer within seconds now.
Wind is plain Web Audio noise through a moving band-pass filter, running beside the stretch rather than through it. Stretched noise just turns to mush.
03harmony that never sours
harmony.ts decides key, chords and voice leading and makes no sound itself. Chords change every 8 to 20 seconds, each voice moving to the nearest note of the next chord.
My first brief was "wander freely", and it did, through modes that sounded atonal stretched out. After listening, I narrowed it: only dorian or lydian, starting in C dorian. A key change is now one of two moves. Step one place round the circle of fifths, keeping the mode, so exactly one note changes. Or keep the same seven notes and move home between dorian and lydian, so nothing changes but the mood. Either way the switch waits for a chord that belongs to both keys, a pivot, so you slide through a shared door.
The rest came from hearing what was wrong. Chords originally slid in pitch to their next note over a few seconds, and halfway through a slide a note sits between two real ones. Stretched, that became a long sour smear, so moving voices now crossfade old note to new and stay in tune throughout. Voices choose octaves so no two sit a semitone apart, melodies and hits skip any key note a semitone from the chord, and the half-diminished chord is never used. Seventh chords stayed.
04a hidden landscape
Where you are on the screen shapes the sound, but I didn't want anyone to be able to work it out. At first each setting read a slanted axis across the field, and I asked for it to be hidden further. Now every setting (wind volume and tone, chord filter, arpeggio density, drone level) reads its own invisible terrain: a faint tendency plus random ripples, new each visit, creeping over a few minutes, so a spot you've learned won't stay the same. The chord filter never opens past 4 kHz.
Time loosens the same way. While you stir, the arpeggio has a pulse whose tempo swells slowly, notes landing a little early or late. As it settles the pulse dissolves into free time, each note after its own pause.
05the window
The piece started as a dark star field. Then I asked for a place: a cel-shaded rainy street seen through a fogged sash window at night, actually built rather than suggested with blurry lights. Moving wipes the fog; stillness lets it creep back at the same pace the sound settles.
The street is ray-marched in a shader, every shape a signed distance function rather than a model file. That's far too heavy to run every frame on a phone, but the camera never moves, so the expensive part (what each pixel sees, its shadows, where reflections land) is built once into float buffers, a strip at a time in the background. Lighting, rain, ripples, the passing car, outlines and the fog are drawn live each frame on top.
It follows the visitor's own sky, using only their clock and time zone: no location prompt and no network calls, ever. A built-in table turns the zone name into rough coordinates, suncalc gives the sun and moon, and mood sets for dusk, dawn and true night blend by sun height. Shadows rebuild when the sun or moon moves a degree. Every lamp and window has its own switch-on moment from a hash, about half the windows go dark around bedtime, and a small LED clock on the sill shows the time the sky is following, so people can connect the two.
The street also listens, quietly. A chord change flips a few windows, a key change flickers a lamp or darkens a shop, the glow in the wet air follows the drone, and some hits set a drop running down the glass.
06getting to first light
On my Windows PC the street was slow to appear. Chrome translates shaders to Direct3D, which can take seconds for big ones, and the page waited for all three before drawing anything, while also downloading Strudel, the audio library, which was five times the size of everything else.
Now the build starts as soon as its shader compiles, a soft half-size picture appears behind the fog first, and the full one swaps in when ready. Strudel loads with a dynamic import() once the street is showing, which took the first download from about 660 KB to about 110 KB. The one thing that can't wait is the audio context: phones stay silent unless it's opened inside the tap itself, before any await.
07left on the floor
Some things I asked for didn't survive hearing them. Wind-triggered chimes drowned everything. Phrygian ground. Pitch slides soured. A quick rough first picture was dropped once the build hid behind fogged glass, then came back as the soft first picture when Windows loading proved slow. The star field stayed, as the fallback for devices without WebGL2 float buffers.
The code is public under AGPL, like Strudel, and the piece is live at stillness.jnsy.studio.