Skip to content

bb82dabn/theremouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

theremouse

Browser-based theremin controlled by your mouse.

Hold left click and move your mouse to make music. The X-axis controls pitch (C2 to C7, logarithmic), the Y-axis controls volume (top is loud, bottom is quiet). Choose between free continuous pitch or snap to chromatic, major, minor, or pentatonic scales in any root key. Pick a waveform, dial in reverb, vibrato, and portamento, then hold right click while already holding left for momentary modulation effects. Theremouse remembers those settings between visits. The entire app is a single HTML file with zero dependencies, served by a 38-line Node.js static server.

Table of Contents

Install

Requires Node.js (any modern version).

git clone https://github.com/bb82dabn/theremouse.git
cd theremouse
node server.js

There is no npm install step -- the project has zero dependencies.

Usage

node server.js

Open http://localhost:3069 in a modern browser and hold left click to play.

Works on mobile and tablet via touch input.

VST3 Plugin

A native VST3 plugin lives in plugin/ and is built with JUCE + CMake for Windows and Linux. See plugin/README.md for build instructions. The plugin mirrors the web instrument: pointer X = pitch, pointer Y = volume, left hold = gate, right hold while left held = modulation, with full DAW parameter automation for waveform, scale, key, reverb, vibrato, portamento, and output gain.

Controls

Control Effect
Left mouse hold Opens the sound gate
Right mouse hold while left is held Adds momentary vibrato/tremolo/reverb modulation
Mouse X Pitch (C2 65 Hz -- C7 2093 Hz, logarithmic)
Mouse Y Volume (top = loud, bottom = quiet)
Waveform Sine, Triangle, Sawtooth, Square
Scale Free, Chromatic, Major, Minor, Pentatonic
Key Root note for scale snapping
Reverb 0--100% (procedurally generated impulse response)
Vibrato 0--100% (LFO modulation)
Portamento 0--100% (pitch glide smoothness)
Settings persistence Restores waveform, scale, key, and FX sliders after refresh
Keyboard shortcuts 1-4 for waveforms, F/C/M/N/P for scales

Features

  • Logarithmic pitch mapping across the full browser width for natural musical feel
  • 5 scale modes in any key: free (continuous), chromatic, major, minor, pentatonic with real-time note/octave display
  • 4 oscillator waveforms: sine, triangle, sawtooth, square
  • Reverb, vibrato, and portamento effects with adjustable intensity
  • Left-click performance gate so sound only plays while you are actively holding the mouse or touching the screen
  • Right-click modulation gesture for momentary vibrato, tremolo, and reverb intensity while left click is held
  • Settings persistence for waveform, scale, key, and effect sliders across browser refreshes
  • Particle visualization: frequency-colored trail particles, glowing cursor, pitch guide lines for scale modes
  • Real-time waveform display: oscilloscope visualization at the bottom of the screen
  • Live Hz and note readout in the header
  • Touch support for mobile and tablet
  • Cyberpunk/neon UI with custom cursor, Orbitron font, and dark theme
  • Zero dependencies: single HTML file, no build step, no npm packages

Tech Stack

Layer Technology
Server Node.js (http built-in module, 38 lines)
Client Vanilla HTML/CSS/JavaScript (single file, 1598 lines)
Audio Web Audio API (oscillators, convolver reverb, LFO)
Visuals Canvas 2D with pre-allocated Float32Array particle pools
Fonts Google Fonts (Orbitron, Rajdhani)

Contributing

This is a personal project. Not accepting contributions at this time.

License

MIT © Brian Bouchard

About

Browser theremin and native VST3 instrument controlled by mouse position.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors