A simple Windows desktop app built with Electron that listens to your microphone and draws a live glowing equalizer on a dark canvas using the Web Audio API (getUserMedia, AudioContext, AnalyserNode, getByteFrequencyData). There is no React and no backend—only HTML, CSS, and JavaScript.
- Windows 10/11 (x64)
- Node.js LTS (includes
npm), e.g. v18 or newer
| File | Role |
|---|---|
package.json |
Dependencies, npm scripts, electron-builder |
main.js |
Electron main process (window, security) |
preload.js |
Preload (contextIsolation bridge; optional) |
index.html |
UI shell |
style.css |
Layout and theme |
renderer.js |
Mic + Web Audio + canvas drawing |
icon.png |
App / installer icon (replace with your own) |
From the project folder:
npm install
npm start- Click Start Visualizer.
- Allow microphone access when Windows / the browser prompt appears.
- Speak or play audio near the mic; the bars animate in real time.
- Click Stop to release the microphone.
The footer shows Listening to microphone while capture is active.
The npm run build script uses electron-builder with the NSIS target. Output goes to dist/ (installer and unpacked app).
npm install
npm run buildAfter a successful build you should see something like:
dist/Live EQ Visualizer Setup x.x.x.exe(NSIS installer), and/or related artifacts underdist/
Note: The first build may download Electron binaries and tooling; keep an internet connection and allow the process to finish.
icon.png in the project root is a placeholder for branding. Before npm run build, the prebuild script runs scripts/ensure-ico.js, which center-crops the image to a square (if needed) and writes build/icon.ico. NSIS uses that ICO for the app and installer.
Replace icon.png with your own art (any aspect ratio is OK; it will be cropped to a square), then rebuild.
The BrowserWindow is configured with:
contextIsolation: truenodeIntegration: falsesandbox: true- A preload script for safe extension points (
contextBridge)
The renderer uses standard Web APIs only for audio and drawing.
- No animation / flat bars: Check the default recording device in Windows Sound settings and system privacy Microphone access for desktop apps.
- Build errors: Run
npm installagain; ensure Node is 64-bit on a 64-bit Windows; close other processes using the samedistfolder if the installer is locked.
MIT