Acoustic Resonance Lab: Standing Waves in a Tube (2D)

This 2D companion replaces the 3D scene's decorative room visualization with the real underlying mechanic: a one-dimensional tube of adjustable length and end conditions, driven at a chosen frequency, whose response is computed as a sum of the first eight normal modes, each a damped harmonic oscillator with its own Lorentzian resonance curve. Sweeping the frequency slider — or snapping straight to a harmonic — shows the standing-wave envelope sharpen from a beating jumble into a single clean mode shape exactly at resonance, while the live readout reports the speed of sound, wavelength, nearest harmonic and detuning in real time.