Anneal Ambiance

Procedural ambient soundscapes synthesized via physical simulations of thermodynamic relaxation.

STATUS Production Alpha
CATEGORY Acoustic Physics
YEAR 2026
STACK React / Web Audio / WebGL

Abstract — Modern generative music structures often rely on static probability distributions or simple, repeating low-frequency oscillators. While computationally lightweight, these methods struggle to emulate the micro-fluctuations and macro-resolutions found in physical systems. Anneal Ambiance presents an alternative approach: a procedural ambient synthesizer that couples simulated annealing cooling schedules with chaotic Newtonian mechanics. By simulating the relaxation equations of a thermal lattice and a double pendulum, this architecture maps physical entropy directly into consonant acoustic ground states, creating an endless, non-repeating auditory environment tailored for cognitive focus and neural stress relief.

§ Laboratory — Live Thermodynamics & Chaos Simulation

Initialize the simulation to start the real-time audio and physics solvers. Manually cool the temperature to witness the acoustic crystallization, or trigger the automated exponential cooling schedule.

TEMP (T):OFFLINE
ENERGY (E):OFFLINE
CHORD:OFFLINE
0.50

High T allows highly chaotic, dissonant chords. As T decays, options crystallize into pure intervals.

1.0x
0.998
§ I

Thermodynamic Relaxation & Stochastic Chords

Simulated Annealing in Music Synthesis

In physical metallurgy, the process of annealing involves heating a metal above its recrystallization threshold and then cooling it slowly. As the temperature declines, thermal energy ceases to trigger chaotic dislocations, forcing the atoms to escape unstable configurations and migrate into highly organized, low-energy crystalline lattices. This macro-relaxation minimizes internal stresses, maximizing material strength and stability.

Anneal Ambiance translates this thermodynamic search algorithm into the acoustic domain. Rather than selecting notes using static arrays, the soundscape's pitch framework is treated as a thermal state space. The system operates an active stochastic search, evaluating candidate chords ($S$) by measuring their mathematical "energy" ($E$), which is defined directly by interval dissonance:

P(\text{accept}) = \begin{cases} 1 & \text{if } \Delta E < 0 \\ \exp\left(-\frac{\Delta E}{T}\right) & \text{if } \Delta E \geq 0 \end{cases} The Metropolis-Hastings transition probability, where ΔE represents the change in chord dissonance and T represents the current system temperature.

During periods of high System Temperature ($T$), the synthesizer is highly energetic. It frequently accepts dissonant, tense, and widely spaced microtonal chord clusters. The oscillator pitches drift dynamically through rapid, unstable, and shimmering glides.

As the cooling schedule begins and the temperature $T$ decays toward zero, the probability of accepting transitions that increase energy drops. The algorithm is forced to reject dissonance, causing the soundscape to physically "crystallize." The voices gradually glide into stable, highly consonant, and deeply resonant octaves and perfect fifths. This direct mapping translates physical relaxation into sensory relief, resolving cognitive tension along a thermodynamic schedule.

TEMP (T) = 1.0 0.5 0.0 TIME (t) ───> Tense Microtonal Clusters (Unstable) Dissonant Tetrads (Transition) Pure Harmonic Ground State
Figure 1: Stochastic Cooling Curve. As the system temperature declines along an exponential schedule, the probability transition bounds tighten, trapping note movements inside low-energy consonances.
§ II

Chaotic Modulations & Double Pendulum Dynamics

Newtonian Modulators in the Synthesizer

Traditional sound synthesis relies on Low-Frequency Oscillators (LFOs) producing static, repeating geometric waveforms. While efficient, these repetitive waves lack the organic irregularities of natural phenomena.

To introduce a natural, responsive cadence, Anneal Ambiance incorporates a real-time numerical simulation of a chaotic double pendulum. Subject to the laws of Newtonian mechanics, a double pendulum displays extreme sensitivity to initial states, generating infinite, non-repeating motion. The system's accelerations ($\alpha_{1,2}$) are calculated relative to joint mass ($m_{1,2}$) and length ($l_{1,2}$) vectors, integrated dynamically using symplectic Euler-Cromer timesteps:

\omega_{1,2}(t+dt) = \omega_{1,2}(t) + \alpha_{1,2}(t) \cdot dt \theta_{1,2}(t+dt) = \theta_{1,2}(t) + \omega_{1,2}(t+dt) \cdot dt Symplectic integration steps. The chaotic velocities are mapped as dynamic LFO modulators.

These mechanical vectors are mapped directly onto the Web Audio graph:

  • Resonant Filter Cutoff ($f_c$): Driven by the kinetic energy and angular velocity of the lower bob ($\omega_2$). Fast, chaotic swings sweep the filter open (up to 2.8 kHz), mirroring thermal agitation, while slow, relaxed drifts return the sound to dark, warm pads.
  • Spatial Stereo Panning: Tied directly to the lower bob's horizontal displacement ($x_2$), causing the pad voices to drift from left to right as the pendulum swings.
  • Feedback Delay Sweeps: Mapped to the joint angular accelerations, creating organic, time-stretched acoustic echoes.
PIVOT MASS (m₁) MASS (m₂) Angle (θ₁) Modulation Drone Amplitude LFO Velocity (ω₂) Modulation Filter Cutoff (400Hz - 2.8kHz) Position (X₂) Modulation Binaural Stereo Panning
Figure 2: Chaos Modulation Topology. Mechanical coordinates computed in the pendulum solver map directly onto standard Web Audio components, bypassing traditional LFO routines.
§ III

Microtonal Tuning & Psychoacoustics

Just Intonation vs Equal Temperament

Standard musical composition is bound to 12-Tone Equal Temperament (12-EDO). Developed to allow uniform key changes, equal temperament divides an octave into 12 logarithmic intervals using ratios of $\sqrt[12]{2}$. While mathematically uniform, this tuning slightly alters every interval from its ideal ratio. These micro-deviations generate periodic phase interference, or "acoustic beating." The auditory cortex must expend neural processing overhead to resolve these clashing waveforms, contributing to subconscious fatigue.

In contrast, Anneal Ambiance utilizes Just Intonation and high-density 53-EDO lattices. Just Intonation tunes notes to pure, whole-number frequency ratios ($p/q$) corresponding directly to the natural physics of the harmonic series:

f_i = f_0 \cdot \frac{p}{q} \quad \text{where } p, q \in \mathbb{Z}^+ Whole-number ratio tuning representing perfectly aligned wave periodicities.

By aligning the peaks and troughs of the overlapping sine waves, phase clashes are completely eliminated. The resulting waveforms are "zero-beating," presenting clean, highly consonant acoustic shapes. Medical research indicates that pure harmonic intervals significantly reduce neurological strain, slowing breathing rates and promoting relaxation.

INTERVAL JUST RATIO JUST CENTS 12-EDO RATIO 12-EDO CENTS DEVIATION / ACOUSTIC BEATING LISTEN / COMPARE
Unison (1/1) 1.0000 0.00 1.0000 0.00 None (Perfect Alignment)
Major Third 1.2500 (5/4) 386.31 1.2599 400.00 +13.69 Cents (Noticeable Clash)
Perfect Fifth 1.5000 (3/2) 701.96 1.4983 700.00 -1.96 Cents (Subtle Beat)
Harmonic Seventh 1.7500 (7/4) 968.83 1.7818 1000.00 -31.17 Cents (Heavy Dissonance)
Octave (2/1) 2.0000 1200.00 2.0000 1200.00 None (Perfect Alignment)
§ IV

Systems Architecture & Audio Graph

The Generative Audio Pipeline

To run these simulations and synthesize high-fidelity multi-voice audio smoothly in the browser, Anneal Ambiance is built with a highly optimized, modular architecture.

Drone Osc (▲ 55Hz) 3x Sine Leads Metropolis-Hastings Resonant Lowpass Feedback Delay Shimmer Reverb MAIN OUT Velocity (ω₂) Cutoff Sweep Decay Feedback Swept by Acceleration
Figure 3: Web Audio API Pipeline. The synthesized signals are processed through resonant filter stages, delay taps, and deep spatial modifiers driven dynamically by Newtonian integration threads.

Architectural Subsystems

  • State Thread Separation: The physics simulation is fully decoupled from the rendering cycle. Integrating symplectic Euler-Cromer equations takes place in an optimized animation loop, updating audio node parameters at audio rate via AudioParam.setValueAtTime to prevent audio glitching.
  • WebGL Visualizer Sync: A 3D wave-front visualizer runs inside a custom Three.js container. It samples frequency bins from an AnalyserNode, mapping sound propagation as ripples inside a simulated physical chamber, ensuring perfect visual synchronization.
  • IndexedDB State Cache: System variables (damping coefficients, custom scale ratios, decay parameters, and active cooling timetables) are cached locally using IndexedDB, enabling instant restoration of tailored profiles across browsing sessions.
§ V

Clinical Directions & Biofeedback Loops

Closed-Loop Neuro-Acoustics

The future of Anneal Ambiance centers on the development of closed-loop therapeutic systems. By integrating consumer electroencephalography (EEG) headsets, we can capture real-time neural tension metrics (such as alpha-to-beta wave ratios).

These biofeedback variables will map directly back to the System Temperature ($T$). As cognitive workload or focus drift increases (higher beta-wave activity), the system temperature dynamically ticks upward, introducing microtonal friction to stimulate attention. Once focus stabilizes and stress declines, the cooling schedule resumes, lowering the temperature and returning the sound to peaceful, highly aligned consonant ground states. This closed-loop neuro-acoustic approach will provide highly personalized acoustic therapy for ADHD and focus management.