Module 3: Darboux's Theorem, Moser's Trick & Generating Functions

Interactive WebGL2 Moser Homotopy Flow & 48 kHz Canonical Timbre Warping Lab — midi-sink (libsumi + Suzu)
d/dt (ψ_t* ω_t) = 0  |  i_{X_t}ω_t = −α  |  ∮ p dq = ∮ P dQ = 2πI

Part 1: Shader Lab — Moser's Homotopy Flow (d/dt ψ_t* ω_t = 0) & Darboux Coordinates Click canvas to move density anomaly centre (q₀, p₀)

Given a spatially varying closed 2-form ω₁ = f(q, p) dq ∧ dp with f(q, p) > 0, the WebGL2 shader integrates Moser's time-dependent vector field X_t(q, p) = (1 + t(f − 1))⁻¹ (−α_p, α_q) from t = 0 to t = 1, morphing a warped coordinate grid into uniform canonical Darboux squares where ψ₁* ω₁ = dq ∧ dp = ω₀. Switch to Kessho Riemannian Birefringence at t = 1 to see that while symplectic curvature vanishes identically, the Riemannian strain C = Dψ₁ᵀ Dψ₁ retains vivid interference fringes!

Homotopy t = 0.00 (Warped ω₁) Pullback max|ψ_t*ω₁/ω₀ − 1|: 0.650 Riemannian Stretch max(σ − σ⁻¹): 0.000 min f(q,p): 0.35 > 0 (Non-Degenerate)
Key Geometric Insight:
• At t = 1, ψ₁* ω₁ = ω₀: the colour wash flattens completely because every deformed cell now encloses the exact same ω₁-symplectic area.
• Now switch Display Mode to Kessho Riemannian Birefringence at t = 1: the Riemannian metric C = Dψ₁ᵀ Dψ₁ lights up with Michel-Lévy interference colours! Symplectic geometry has no local curvature; Riemannian geometry does.

Part 2: Sound Lab — Canonical Timbre Warping via Generating Functions (S(q, Q) & F₂(q, P)) Stereo Quadrature Output (L = q(t), R = p(t)) + Optional Reference Pitch Fork

Apply a canonical transformation (Q, P) ↦ (q, p) generated by F₂(q, P) or S(q, Q) to a harmonic oscillator's phase space. Because symplectic action ∮ p dq = ∮ P dQ = 2πI is preserved identically, the fundamental pitch stays locked at 0.00 cents while the nonlinear coordinate deformation acts as a dynamic wavefolder! Switch to the Uncalibrated Cell::step_sheared Red Controls (voxo/src/suzu.h line 187) to hear how non-canonical in-loop shearing detunes the pitch by up to +555 cents.

Phase Space: Warped (q, p) vs. Canonical (Q, P) ∮ p dq / 2πI₀ = 1.0000
Quadrature Waveforms: q(t) [Cyan] & p(t) [Gold] det(∂(q,p)/∂(Q,P)) = 1.0000
Harmonic Overtone Spectrum (dB) — Fundamental f₀ vs. Wavefolded Harmonics 2f₀ … 12f₀ Harmonic Richness (THD): 0.0%
Audio: Stopped Pitch Detuning: +0.0 cents (Locked!) Enclosed Action ∮ p dq: 100.0% of 2πI₀ suzu::shear_period_ratio Table: N/A (Canonical)
Experiment:
1. Turn on Ref Unison Fork (f₀) and sweep g from 0 → 0.95 under any [CANONICAL] mode: the timbre folds into a bright brassy/Buchla wave, yet beats against the reference fork stay at zero!
2. Switch to [RED] step_sheared Triangle Fold with calibration OFF: the enclosed phase-space loop shrinks and the pitch shoots sharp by +555 cents (a tritone!). Turn Table Compensation ON to hear suzu::shear_period_ratio bring it back into unison.