One state, two senses
Giving every particle an oscillator is direct, but 2,000 tiny voices obscure the larger changes that make the field musically interesting.
Confluon uses a compact musical state instead. Seven metrics describe energy, coherence, activity, density, formations, transitions, and cross-population encounters. Up to eight formation summaries add position, size, and population. Both paths read the same engine frame; the visual path adds only a short display interpolation that never feeds back into motion or sound.
The sustained harmonic field
The continuous bed begins with six oscillators at the frequency ratios 1, 1.25, 1.5, 2, 2.5, and 3. They form a bright overtone lattice: root, major third, fifth, octave, upper third, and upper fifth. Lower voices are stronger; upper voices contribute colour. Tiny independent detune oscillators stop the chord freezing into a static organ tone.
Coherent movement raises the sustained partials and sub. Density opens their low-pass filter. Activity spreads them in stereo while taking a little weight out of the bed. Encounter pressure increases detuning, so populations pressing into one another gently widen the tuning.
Every change is smoothed on the audio clock with
AudioParam.setTargetAtTime. The frame rate can wobble without turning a
control signal into zipper noise.
Formations have places and voices
The most literal bridge between picture and sound is the formation choir. The simulation reports up to eight large connected structures. The audio layer tracks them from frame to frame by species and toroidal distance, then gives each a paired oscillator voice.
- Horizontal position
- Becomes stereo pan, so the voice sits where its formation appears.
- Vertical position
- Colours the voice filter: formations higher in the field sound slightly more open.
- Population
- Selects a register offset, separating cyan, ember, and violet in pitch.
- Size share
- Controls level; larger formations occupy more of the choir.
- Birth
- A newly visible formation rings a soft, spatially placed emergence bell.
- Dissolution
- The tracked voice releases slowly instead of stopping at the detection boundary.
Sparse field tones also borrow the position of a currently visible formation. The ear is repeatedly drawn toward the same places the eye finds organised matter.
What each collective reading does
Each metric affects several parts of the sound rather than acting like one obvious meter.
- Energy
- Slightly bends the root, raises pad resonance, colours the noise, and tunes resonant strikes.
- Coherence
- Focuses the pad, strengthens the sub and formation choir, adds shimmer, shortens delay, and opens the reverb return.
- Activity
- Widens the field, brightens the master, raises noise and feedback, and reduces the space between tones.
- Density
- Adds sub weight, opens pad and noise filters, and gives the sparse-note walk more possible degrees.
- Formations
- Move the harmonic root through a six-step cycle and provide the spatial choir itself.
- Transition
- Crossing a change threshold excites one bounded resonant strike.
- Encounter
- Widens tuning, brightens the field, adds air and delay feedback, and shortens the note interval.
A value should be audible without announcing itself. Slow, overlapping, bounded mappings let collective change alter the music's character.
Events give the field punctuation
Rapid changes in energy or activity raise the transition measure. Crossing a threshold excites a short filtered resonator whose brightness follows current energy.
The performer produces related events. A strong drag, a released settle, a new seed, or a rebuilt field can strike the same musical material. Pointer gestures carry their horizontal position into stereo. The sound therefore distinguishes “the system changed” from “the system changed here.”
Contact also changes the continuous mix. Pressure opens the pad and adds shimmer; movement adds a little filtered air and feedback; position leans the shared field in stereo. Even a quick poke leaves a short audible trace after the finger lifts.
Longer tones arrive on a seeded, metric-driven scheduler. Activity, density, and encounter pressure make the interval shorter, but it never becomes a metronomic grid. Each tone has a soft attack and a long release, leaving room for the field to be heard.
The controls belong to the score
Tone tilts the spectrum and Flow changes the space between notes. Halo adds upper shimmer and room; Memory lengthens delay and its return. Ecology and Life change the swarm that produces the musical readings, while Touch scales both the visible gesture and its sonic pressure. A quiet pitched cue confirms each change without interrupting the field.
One slow breath across the mix
A 0.1 Hz oscillator, one ten-second cycle, moves pad brightness, sub level, and master brightness together. The effect is subtle: a shared slow contour rather than an audible wobble.
This is a compositional pacing device, not a therapeutic claim. It keeps the continuous bed from becoming mechanically fixed.
Space is synthesized too
There are no samples. The looping air bed is seeded, gently correlated noise. The hall impulse is generated in code from twelve early reflections and a diffuse tail that darkens as it decays.
The shared pad also feeds an octave waveshaper. The curve y = 2x² − 1 turns a sine into its octave; a band-pass extracts the upper glow and sends it only into the reverb. Coherence raises this shimmer, letting organised motion appear as light above the main sound without simply making everything louder.
Seeded sound, living timing
The simulation seed also seeds the musical random walk. Resetting the same field and replaying the same inputs resets note choices and spatial decisions to the same sequence. The noise bed and hall have fixed seeds, so their texture does not change on every page load.
Web Audio runs on its own high-resolution clock. Long tones are scheduled there rather than with frame timers, and continuous parameters are smoothed towards new targets. This keeps the music continuous when a render frame is briefly expensive.
An untouched take needs the same engine revision, seed, fixed timestep, and settings. A performed take also needs the timed gesture stream. A URL records the starting score; a render manifest records the browser, platform, cadence, and codec conditions needed to defend a finished export.
Rendering the same master you hear
Video production uses a post-limiter tap as a
MediaStreamAudioDestinationNode. That mastered stream and the WebGPU
canvas stream enter one MediaRecorder, so picture and sound share the
browser clock. The local production tool can then deliver H.264/AAC MP4, VP9/Opus
WebM, landscape, square, portrait, story, or custom formats from the same seed.
What comes from data, and what comes from taste
Formation position becomes pan, size becomes voice level, and encounter pressure enters the detune and spectral mappings. Those links are literal, but the mapping is still composition. The simulation contains no natural major third, hall length, or correct amount of shimmer.
Those choices are taste, tuned by listening. The sound interprets real field state; it does not invent a dramatic arc that the field did not produce.
Sources and further reading
- W3C Web Audio Working Group. Web Audio API 1.1. The audio-routing graph, synthesis nodes, parameter automation, convolution, and worklet model used by the instrument.
- Mordvintsev, A., Niklasson, E. & Randazzo, E. (2022). “Particle Lenia - Giving particles voice.” The reference experiment maps per-particle energy to frequency and speed to volume; Confluon instead maps collective state and formations.
- Confluon source documentation. Architecture and audio graph.