Zero-Dependency 60 FPS Web Audio DSP: Engineering NeonTouch Synth & Night City Cyberdeck
Can you build an expressive 10-finger polyphonic light instrument and cyberpunk DJ console that runs at 60 FPS inside a headless Wayland or Chrome Remote Desktop VM—without WebGL driver crashes, external NPM bundles, or camera/microphone permissions? That design constraint shaped NeonTouch Synth (GitHub: Sockshare/neontouch-synth), which you can also play live right here on the portfolio at neontouch.html.
1. Designing for Zero Wrong Notes & 10 Simultaneous Voices
In static/js/app.js, every touch point, mouse drag, or multi-finger keyboard chord maps screen coordinates to two orthogonal expressive axes: horizontal position selects pitch from a curated dark cyberpunk Minor / Phrygian scale (CYBER_SCALE), while vertical position modulates filter cutoff and harmonic brightness. Pairing that scale lock with 10 distinct darksynth timbres—from BladeLead and Supersaw to Acid303, ReeseBass, and 808Slam—means layering 5 or 10 ephemeral neon comet lines creates cinematic chords instead of dissonant noise.
2. Keeping Canvas Rendering Fast Inside Remote VMs
Full-resolution 4K shadow blurs will saturate software rasterizers over remote desktop. To keep latency negligible, the Night City Cyberdeck canvas pairs a tuned RENDER_SCALE = 0.55 backing buffer with a strict 22ms frame budget—preserving crisp neon plasma trails, 2-way/4-way kaleidoscope mirror lasers, target reticles, and live skyline FFT bars while using ~70% fewer rasterized pixels.
| Subsystem | Implementation | Musical / Visual Role |
|---|---|---|
| Procedural Track Engine | CYBER_BEATS + DARK_PROGRESSION |
Generates codenamed beats across 88–124 BPM (Night City, Outrun, Industrial, Blade Runner) |
| Performance Deck | 16-Step Matrix + Dual Jog Turntables + Crossfader | Live beat programming, deck scratching/blending, and punch-in glitch FX |
| Pure Stdlib Backend | ThreadingHTTPServer (server.py) |
Zero-dependency HTTP server on :8112 with /api/health diagnostics |
3. Automated Verification Without Brittle Audio Flakes
The included test suite (tests/test_omnisense.py) boots an ephemeral local ThreadingHTTPServer on port 0, validates /api/health capability flags, verifies all 10 cyberdeck UI/DSP controls across index.html and static/js/app.js, confirms zero getUserMedia calls exist, and asserts that removed camera/mic routes return HTTP 404.