A browser-based theremin instrument built with Gleam compiled to JavaScript.
Move your mouse to play. No install, no server — open index.html.
| Input | Effect |
|---|---|
| Hold click + move left/right | Pitch (200 Hz – 1200 Hz) |
| Hold click + move up/down | Volume |
1 |
Sine wave |
2 |
Square wave |
3 |
Sawtooth wave |
4 |
Triangle wave |
The oscilloscope in the center shows the live waveform.
git clone <repo-url>
cd gleam-theremin
python3 -m http.server 8080
# open http://localhost:8080Must be served over HTTP — browsers block ES modules on
file://.
# requires Gleam: https://gleam.run/getting-started/installing/
gleam build --target javascript
gleam test --target javascript- Gleam — compiled to JS, handles all logic
- WebAudio API — OscillatorNode → AnalyserNode → GainNode → output
- Canvas 2D API — cursor glow + oscilloscope visualization
- No frameworks, no bundler, no dependencies beyond Gleam stdlib