A single-file, browser-based DJ visualizer designed to live on a USB stick: plug in, run the launcher, and you're live.
It starts a local web server and opens:
http://127.0.0.1:8080/dj-visualizer.html(or8081/8082if busy)
dj-visualizer.html— the full visualizer (canvas + UI + audio analysis)start.bat— Windows launcher (portable Python → system Python → Node)start.command— macOS launcher (Python → Node)python-portable/— bundled Python for Windows (if present)smoke_test.py— quick local server smoke testRELEASE_CHECKLIST.md— pre-gig validation checklistREADME.md
- Plug in the USB stick and open the folder.
- Double-click
start.bat. - Your browser should open the visualizer automatically.
If it doesn't open, manually visit:
http://127.0.0.1:8080/dj-visualizer.html- then try
8081or8082.
start.bat will try in this order:
python-portable\python.exe(bundled)py -3pythonpython3npx http-server
If none are available, install Python 3 or Node.js.
If PowerShell execution is blocked by policy, the script prints a manual fallback command.
If PowerShell is blocked, start.bat now auto-falls back to a CMD launch on 127.0.0.1:8080.
- Plug in the USB stick and open the folder.
- (One-time) make the launcher executable:
chmod +x start.command
- Double-click
start.command.
If it doesn't open, manually visit:
http://127.0.0.1:8080/dj-visualizer.html- then try
8081or8082.
start.command will try:
python3pythonnpx http-server
So you need Python 3 or Node.js installed.
The launcher prefers Chrome. If not found, it falls back to your default browser. On both Windows and macOS, launchers now try Chrome, then Edge, then default browser.
In the UI, you can switch the audio source:
- MIC — uses your microphone input
- SYSTEM — captures system/tab audio via screen sharing (browser capture)
- MIX — combines MIC + SYSTEM
When you start SYSTEM (or MIX) the browser will ask you to share a screen/window/tab.
To actually get audio, you usually must:
- select the right screen/tab/window, and
- enable something like "Share audio" (wording depends on the browser/OS).
If you deny permission, the app shows AUDIO DENIED.
If you share screen/tab but audio is not included, the app shows NO SYSTEM AUDIO.
If shared system audio stops mid-session, the app shows SYSTEM AUDIO ENDED.
Move the mouse to reveal the UI panel.
Hotkeys:
Space— Start / StopA— Audio source (MIC / SYSTEM / MIX)P— Preset (CLUB / OPEN AIR / LOW POWER)M— ModeC— Color modeQ— Quality mode (AUTO / HIGH / MED / LOW)T— Show auto-tune statusS— Strobe toggleF— FullscreenG— Debug overlay (FPS, audio levels)
- CLUB — balanced default for indoor DJ setup.
- OPEN AIR — more stable beat response for spacious/less compressed audio.
- LOW POWER — safer defaults for weaker laptops.
TUNE is fully automatic (no manual sliders in runtime):
- SENSITIVITY adapts by signal energy/transients.
- FLASH RATE adapts by music intensity and performance headroom.
- SAFETY tightens automatically when FPS drops or burst risk grows.
The visualizer now uses lightweight music-theory features on top of beat detection:
- Meter/downbeat tracking (
1..4) from beat accent history. - Phrase tracking (8-bar cycle) for stronger phrase-boundary accents.
- Key estimate (12-chroma + major/minor templates) with confidence.
- Harmonic tension estimate used to shape flash intensity and hue motion.
Practical effect:
- stronger flash/strobe on likely downbeats,
- phrase starts hit harder,
- less random feel vs pure instantaneous peak reaction.
This visualizer can produce rapid flashes (strobe/whiteouts).
Use responsibly. If you or anyone present is sensitive to flashing lights (photosensitive epilepsy),
disable strobe (S) and avoid high-intensity settings.
Something is already using those ports. Close the other process, or edit the launcher to use different ports.
Grant permission for microphone / screen-share audio in your browser, then try again.
Your browser/context does not provide required mediaDevices APIs. Use Chrome or Edge.
Start again in SYSTEM or MIX mode and make sure Share audio is enabled in the browser share dialog.
Your screen-share audio track was stopped. Start audio again and re-share with audio enabled.
Some browsers/OS states can temporarily mute or suspend captured audio (tab/background switch, device/power events). Return to the tab/app; the visualizer now tries to resume audio context automatically on foreground.
Try a different browser (Chrome is the most consistent for screen/tab audio capture). When sharing, ensure audio sharing is enabled.
The server is localhost-only and not exposed to the network (safe for USB gigs).
After launching, run:
python3 smoke_test.pyExpected result: OK http://127.0.0.1:8080/dj-visualizer.html (...) (or 8081/8082).
If no local server is running yet, use:
python3 smoke_test.py --autostartThis starts a temporary loopback server, verifies the page, then stops it.
Run the quick regression set:
python3 scripts/selftest.pyIt validates smoke-test behavior (fail/auto/live-server modes), Python syntax, and start.command shell syntax.
For real music-library validation (flash/beat behavior), run:
python3 scripts/track_suite.py /path/to/tracks --json-out output/track-suite.jsonThis reports coverage/weak-flash/downbeat metrics and a PASS/FAIL verdict for general + rave-like material.
See TEST_MATRIX.md for automated and manual test scenarios.
- USB auto-run is commonly blocked by OS security policy. Plan for manual launcher click.
- On Windows, SmartScreen may warn on first run.
- On macOS, Gatekeeper may require right-click -> Open on first launch.
- Screen/system-audio capture always requires an explicit user permission step in the browser.
MIT License — use, modify, and share freely. See LICENSE.