A zero-backend, browser-native WebAudio simulation of tabula rasa acoustic agents. Hear consonance, non-Western stretched scales, and interlocking polyrhythmic hockets emerge live in continuous pitch and continuous time—with zero hardcoded 12-TET scales, BPM grids, or pre-trained generative priors.
Click ▶ Start Audio below to initialize four autonomous voices in a shared continuous acoustic medium (f0 ∈ [65.4, 1046.5] Hz, inter-onset intervals Δt ∈ [0.08, 2.00] s). At every note onset popped from the event priority queue, the active agent evaluates M = 48 continuous candidate actions against the physical overtones currently ringing in the room, recent spectral-temporal masking, and its own online Dirichlet-smoothed relational Markov context tree.
Generative music systems typically bake Western twelve-tone equal temperament (12-TET), metrical bar grids, or corpus-trained neural weights directly into token representations. To ask why ensembles crystallize discrete scales, stratified registers, and syncopated grooves in the first place, we enforce a strict Zero-Prior Epistemic Ground Rule: agents emit continuous tuples e = (tonset, ℓ, d, a, i) where ℓ = log2(f0 / fref) ∈ [0, 4] is unquantized log-frequency and Δt ∈ [0.08, 2.0] s is unquantized inter-onset time.
Every note excites K = 8 physical partials at frequencies fk = f0 · kα with amplitudes Ak(t) = a ρk−1 exp(−(t − t0)/(d/√k)) (ρ = 0.75). Sensory beating between any pair of partials (fp, ap) and (fq, aq) follows Sethares' (1993) parameterization of the Plomp–Levelt critical-band curve integrated over 4-point midpoint quadrature:
Pure roughness minimization collapses voices into unison or octave drones where overtones overlap without beating. Inspired by Krause's (1993) Acoustic Niche Hypothesis, agents avoid masking across Glasberg–Moore Equivalent Rectangular Bandwidths ERB(f) = 24.7(4.37 f / 1000 + 1) over the first Kcrowd = 4 partials, coupled with stimulus-specific self-habituation, simultaneous-onset masking controlled by ηsync ∈ [−0.5, +1.0], and a continuous 36-oscillator echoic pulse resonator bank over [0.15, 1.20] s:
When ηsync > 0, simultaneous onsets (σt = 35 ms) are penalized while sub-harmonic pulse subdivisions are rewarded, spontaneously producing West African and medieval-style interlocking hockets. Setting ηsync < 0 inverts the temporal interaction into synchronized homorhythmic chordal stabs while Cspec preserves distinct chord voicings.
Agents tokenize completed melodic movements strictly relationally as zn = (Δℓ̂n, Δr̂n)—quantizing pitch steps at 24 bins/octave (50-cent quarter-tone resolution, neutral between 12-TET, Just Intonation, and stretched scales) and log-IOI ratios log2(Δtn / Δtn−1) into 15 bins. Discretization occurs exclusively inside sequence memory, never before acoustic physics. Each voice maintains self (pself) and ensemble (pens) Witten–Bell Dirichlet backoff trees up to order L = 4, rewarding moderate surprisal Si(e) = −log2 p̂i(z) via Berlyne's inverted-U Wundt curve around S*.
Sweeping (λc, λn, λs) separates five distinct musical phases—Consonant Drone, Interlocking Hocket, Imitative Polyphony, Frozen Stratification, and Uncorrelated Cacophony—meeting at a critical triple point near (λc≈0, λn≈2.50, λs≈2.92).
Stretching overtones to fk = f0 kα (α = 1.08, Javanese metallophone-like spectrum) causes agents to abandon Western 2:1 / 3:2 ratios (non-unison harmonic lock drops to 3.3%; total 15.8%) and lock onto stretched (p/q)α dissonance minima (68.3% dyad lock; 71.5% total across 10 seeds).
Replacing tabular backoff with a randomly initialized 2-layer GRU trained strictly online via episode-local BPTT widens the synchronized hocket/polyphony basin (lockα: 0.25 → 0.40 at high curiosity) and self-organizes smooth pitch-interval manifolds in PC1–PC2 space.
Try H2 Live Above: Select the Harmonic Strings (α=1.00) preset, observe the cyan cross-voice interval histogram locking onto 0, 498, 702, and 1200 cents in the bottom dissonance chart, and then click Morph α → 1.08 Bell (8s). Watch the orange dissonance wells slide outward to stretched pseudo-octaves (1200α = 1296 cents) and hear the ensemble retune its harmonic vocabulary in real time!
Using active boundary bisection across 123 episodes × 90 s (3.08 hours of simulated polyphony), we mapped 41 coordinates (P00–P40) and pinpointed 4 phase-transition boundaries. Click any point on the barycentric simplex below to inspect its 3-seed median emergence telemetry, or click ▶ Load Coordinates into Live Synth to audition that exact parameter regime in the WebAudio laboratory above.
White stars (★) denote the 4 bisected phase-transition crossovers. Marker radius reflects regime posterior concentration.
Table 1 summarizes the four critical regime crossovers located via midpoint bisection on the 90 s horizon, alongside the matched Stage-1 Markov vs. Stage-2 Online GRU comparison (P20 vs. P21).
| Transition / Comparison | Bracketed IDs | Critical (λc, λn, λs, η) | Order Parameter Shift |
|---|---|---|---|
| Cacophony ↔ Consonant Drone | P00 → P06 |
(1.25, 0.00, 0.00, 0.00) | Interval lock jumps 17.1% → 52.3%; Hpitch drops 10.13 → 9.21 bits |
| Consonant Drone ↔ Interlocking Hocket | P01 → P13 |
(8.75, 1.25, 0.00, −0.06) | Pulse excess surges −0.014 → +0.813 while keeping 62.6% lock |
| Drone Core ↔ Curiosity Cacophony | P34 → P39 |
(0.00, 0.00, 2.92, 0.00) | Median melodic step jumps 25c → 400c above critical λs* ≈ 2.92 |
| Cacophony ↔ Imitative Polyphony | P26 → P28 |
(0.00, 0.00, 6.88, 0.00) | Cross-voice 3-interval motif adoption reaches 50.0% (+16.5% over surrogate) |
| Stage-1 Markov vs. Stage-2 Online GRU | P20 vs P21 |
(5.00, 5.00, 5.00, 0.00) | Online GRU lowers Hpitch (9.89 → 9.53) & boosts lock (25.0% → 40.2%) |