Audio Vectorscope is a browser-based stereo audio visualizer built with vanilla HTML, CSS, and JavaScript modules. It captures live microphone input, renders a real-time vectorscope on canvas, and displays VU meters for Left, Right, Mid, and Side channels.
Try it on the web: Demo
- Real-time stereo vectorscope rendering on canvas
- Frequency-reactive trace coloring driven by shared theme tokens
- Temporal smoothing control for a steadier vectorscope trace
- VU meters for L/R/M/S channels
- Input gain control
- Audio input device selection after permission is granted, with selection preserved across refreshes
- Responsive layout with a square vectorscope area
- A modern browser with Web Audio support (Chrome, Firefox, Safari, Edge)
- Node.js and npm for the local development server
-
Clone this repository:
git clone <your-repo-url>
-
Move into the project directory:
cd app.vectorscope -
Install dependencies:
npm install
-
Start the local server:
npm start
-
Open the local URL printed by
http-server(typicallyhttp://localhost:8080).
- Open the app in your browser.
- Click
Start Analyzing. - Allow microphone access when prompted.
- Use
Input GainandSmoothingto shape the visualization. - If multiple devices are available, choose one from the
Audio Inputselector. The selected device stays visible after the stream restarts. - Monitor stereo image and phase using the vectorscope trace and L/R/M/S meters.
- Visual tokens live in
styles.cssas CSS custom properties for background, surfaces, borders, text, links, overlay colors, trace colors, and VU meter colors. - Canvas-based rendering reads the same CSS variables through
js/theme.js, so the DOM and the canvas stay in sync. - New color or typography changes should update the shared tokens first instead of adding new hard-coded values in JS or CSS.
- Additional design notes live in
docs/design-system.md.
app.vectorscope/
|- index.html
|- styles.css
|- js/
| |- main.js
| |- ui.js
| |- audio.js
| |- vectorscope.js
| |- overlay.js
| |- theme.js
| `- utils.js
|- docs/
| `- design-system.md
|- .github/
| `- instructions/
| |- javascript.instructions.md
| |- css.instructions.md
| |- html.instructions.md
| `- markdown.instructions.md
|- README.md
`- LICENSE
- Keep the app framework-free unless there is an explicit decision to change stack.
- Follow StandardJS style: 2 spaces, no semicolons.
- Keep UI code in
js/ui.js, audio setup injs/audio.js, canvas drawing injs/vectorscope.jsandjs/overlay.js, and shared theme access injs/theme.js. - Maintain JSDoc on exported functions and non-obvious logic.
- Keep
README.md,agents.md, and the.github/instructions/files aligned with the actual behavior of the app. - There is currently no automated test suite; verify behavior manually in the browser.
This project is licensed under the MIT License. See LICENSE.