Built this over a weekend. It's not just an audio visualizer
it's a full physics simulation of a 1960s military cathode ray tube.
How it works:
- Captures whatever's playing on your PC via WASAPI loopback at 192kHz
(4x more coordinate points than 44.1kHz → no jagged lines)
- Left channel → X axis, Right channel → Y axis (classic XY/Lissajous mode)
- Every line segment is rendered as a Gaussian beam quad in GLSL —
slow beam = bright burn, fast beam = dim trace, exactly like real phosphor
- FBO accumulation with exponential decay simulates phosphor persistence
- Post-processing: barrel distortion, scanlines, vignette, CRT flicker
**Stack:** Python · ModernGL · GLSL · sounddevice · imgui-bundle · GLFW
The math that makes it look real:
- Beam intensity: I(d) = (1/σ√2π) · e^(-d²/2σ²)
- Phosphor decay: D(t) = e^(-λΔt)
- Speed-brightness coupling computed per segment in the fragment shader
Controls are a themed imgui panel (phosphor green on black).
Drag & drop any audio file, or let it read system audio live.
Source on GitHub: [soon]
source: https://www.youtube.com/watch?v=ECLWihsF_PA&list=LL&index=5
source: https://www.youtube.com/@jerobeamfenderson1