Module 5: Resonance Overlap, Cantori & Phase-Space Diffusion

262,144-Particle GPU Turnstile Flux Histogram & 512-Voice Granular Action-Diffusion Lab — midi-sink (libsumi + Suzu)
ΔW ∝ (K − K_c)^3.01  |  ⟨ΔI²(t)⟩ ∼ D·t^α  |  f_m = f₀·exp(γ·I_m)

Part 1: Shader Lab — 262,144-Particle Turnstile Flux (ΔW = ∮_lobe p dq) & Density Diffusion Click canvas to set initial action line I = I₀ for all 262,144 GPU particles

A 512 × 512 floating-point WebGL2 texture stores 262,144 particles initialized along a single action line I = I₀ between the two golden-ratio KAM / Cantorus barriers (ω = φ⁻¹ and 1 − φ⁻¹). As the shader steps the symplectic map forward, an additive point-splatting histogram shader visualizes trajectories trapped for thousands of iterations behind an Aubry–Mather cantorus before leaking through the MacKay–Meiss–Percival turnstile lobe of area ΔW ∝ (K − K_c)^3.01!

Iterations: 0 Turnstile Lobe Area ΔW: 0.00000 (KAM Barrier Intact) Cantorus Leakage: 0.0% Diffusion ⟨ΔI²⟩ ∼ D·t^α: α = 0.00
What to observe on the Canvas:
• At K = 1.05 (Turnstile Leak), all 262,144 particles start at I₀ = π inside the central chamber bounded by the two dashed gold Aubry–Mather Cantori (p = 2.40 and p = 3.88).
• Watch them slam into the cantorus barrier, pause for hundreds of steps, and then squirt out exclusively through the glowing MacKay–Meiss–Percival Turnstile Lobes!
• Right inset: live 1D marginal action profile P(I, t) and log–log variance ⟨ΔI²(t)⟩ ∼ D·t^α.

Part 2: Sound Lab — 512-Voice Granular Action Diffusion (f_m = f₀ exp(γ I_m), pan_m = cos θ_m) 512 simultaneous trajectories mapped to pitch & stereo panorama at 48 kHz

An ensemble of 512 diffusing trajectories starts on a single action line I_m(0) = 0 (with uniform angles θ_m(0) ∈ [0, 2π)). Each particle's action I_m(t) drives oscillator frequency f_m = f₀ exp(γ I_m) and its angle θ_m(t) drives stereo pan cos(θ_m). At K = 0, all 512 voices sound a pure unison sine tone. As K crosses K_c ≈ 0.9716, hear the unison tone fracture — pausing at cantori barriers as clustered microtonal chords before leaking through turnstiles into a wide, shimmering stochastic cloud!

512-Voice Phase Space (θ_m, I_m) & Cantorus Dams Pitch Spread: ±0.0 cents
512-Voice Frequency Histogram P(f_m) & Cantorus Plateaus State: Pure 512-Voice Unison
Audio: Stopped Acoustic State: Pure Unison Line (I_m = I₀) Variance ⟨ΔI²(t)⟩: 0.0000 Voices Past Cantorus: 0 / 512
How to hear Cantorus Stickiness & Turnstiles:
1. Start audio at K = 0.00 (Pure Unison): all 512 voices sing a single 220 Hz sine wave.
2. Click K = 1.04 (Cantorus Pause & Leak) and click Reset 512 Unison: first, the unison fractures into a tight microtonal cluster trapped between the golden cantori (|I_m| < 0.74); after several seconds, voices find the turnstile lobe and leak out into higher and lower octaves!