An instrument you play without touching it
This free online theremin turns your webcam into the two antennas of a theremin. Your right hand sets the pitch, your left hand sets the volume, and the sound is made live in your browser. There is nothing to install and nothing to sign up for. If you have no camera, you can play the same instrument with the mouse or a finger.
What is a theremin?
The theremin was invented in the early 1920s by the Russian physicist Léon Theremin (Lev Termen), and it is one of the first electronic instruments. It is the only common instrument that you play without touching it. A real theremin has two antennas: a vertical rod for the pitch and a loop for the volume. The player's body changes the electrical field around each antenna, and the instrument turns that tiny change into a note that glides smoothly, with nothing to press and nothing to hold on to. Because there are no keys or frets, the player must hear the note in their head and find it in the air. That is why a theremin is hard to play in tune, and why a skilled thereminist, such as Clara Rockmore, is so remarkable to hear. The eerie, singing sound became a favourite for film music from the 1940s onwards.
How does the camera version work?
A real theremin measures electrical capacitance. A webcam cannot, so this page does something else that feels similar: it looks at your hands. A hand tracking model (MediaPipe Hand Landmarker) finds 21 points on each hand in every camera frame. The page takes the middle of the palm of each hand and uses that as the position of the hand. The image is mirrored, so it behaves like a mirror: when you move your right hand to the right, the dot on the screen moves to the right.
- Pitch: the horizontal position of your right hand, mapped to a range of two to four octaves.
- Volume: the height of your left hand. Up is louder, down is quieter. You can reverse this on the Camera & hands tab.
- Fist: a closed left hand is silent, which is handy for stopping a note cleanly.
- One hand: if the camera sees only one hand, that hand controls both: left and right for pitch, up and down for volume.
The sound itself is made with Web Audio: an oscillator with a chosen waveform, a filter, optional vibrato, echo and reverb. There are no recordings. The pitch follows your hand with a short glide, so it moves smoothly like the real instrument.
Tips for good tracking
- Use even light from the front, and a plain background. A bright window behind you is a problem for any camera.
- Sit or stand about one arm and a half from the camera, so both hands fit in the picture with room to move.
- Keep your hands open and facing the camera. A fist or a hand turned edge-on is harder to see, and the model may lose it for a moment.
- Do not let your hands cross. The page decides which hand does what from their left and right position.
- If the pitch jitters, raise the Smoothing slider on the Camera & hands tab, or turn on the scale magnet.
- Headphones help: your speakers can add sound to the room, and a theremin is meant to be quiet and listened to.
Playing in tune
On a real theremin, finding the right note takes years of practice. This page gives you a few helpers. On the Pitch tab you choose a range (two to four octaves, and the lowest note), a scale and a key, and then you set the scale magnet. At 0% the pitch glides freely and every position is a valid note, as on the real instrument. At higher settings the pitch lingers on the notes of the scale, and at 100% it steps from note to note. The vertical lines on the stage show the notes of the scale, and the C lines are brighter. A narrow range, such as two octaves, is also easier to control than four.
| Scale | Notes (semitones above the key note) | Sound |
| Chromatic | every note | free gliding, no help |
| Major | 0 2 4 5 7 9 11 | bright, familiar |
| Natural minor | 0 2 3 5 7 8 10 | sad, serious |
| Major pentatonic | 0 2 4 7 9 | open, folk-like, hard to play wrong |
| Minor pentatonic | 0 3 5 7 10 | bluesy, hard to play wrong |
| Blues | 0 3 5 6 7 10 | minor pentatonic with a passing note |
| Harmonic minor | 0 2 3 5 7 8 11 | dramatic, a little exotic |
| Dorian | 0 2 3 5 7 9 10 | minor with a lifted sixth |
| Whole tone | 0 2 4 6 8 10 | dreamy, no clear key |
The six sounds
- Classic: a nearly pure tone with a little warmth, light vibrato and a short echo.
- Vocal: a bright wave shaped by three resonances like the vowel “ah”, for an operatic voice.
- Cello: a dark sawtooth with a low octave added and a slow, wide vibrato.
- Space whistle: a pure whistle with a long echo and a big reverb.
- Sci-fi: a buzzing square wave with a little overdrive and a long, fading echo.
- Pure sine: only the fundamental, with no effects. It is the best choice for checking your pitch.
Each sound sets a starting point for vibrato, echo and reverb. You can change them afterwards on the Sound tab. Vibrato adds a small regular wobble in pitch, as thereminists create by shaking a finger; Glide sets how quickly the note follows your hand; Tone makes the sound darker or brighter.
Mouse and touch
You do not need a camera. Press and drag on the stage: left to right sets the pitch and up and down sets the volume, with the top being the loudest. With two fingers, the finger that is furthest to the right sets the pitch and the other finger sets the volume. When you let go, the sound fades out. This also works on phones and tablets, and it is a good way to learn the layout before you try it with your hands.
Recording
Press Record (or R), play, and press it again to stop. A download link appears with your performance as an audio file (WebM or Ogg, or M4A in Safari). Only the sound is recorded. The camera image is never recorded or saved. A recording stops by itself after ten minutes.
Keyboard shortcuts
| Key | What it does |
| F | Full screen on or off. Esc also leaves full screen. |
| M | Mute or unmute. |
| R | Start or stop recording. |
| 1 to 6 | Choose Classic, Vocal, Cello, Space whistle, Sci-fi or Pure sine. |
Privacy: what happens to the camera image?
The video from your camera is processed on your device. It is not uploaded, not recorded and not stored. To do the tracking, the page downloads the MediaPipe library from the jsDelivr network (with unpkg as a fallback) and the hand model from Google's storage host, so those hosts see an ordinary file request from your browser. Your settings (sound, range, scale and so on) are saved in this browser only, under the key jb-theremin. Your browser asks for permission before it turns the camera on, and you can switch it off again with the Stop camera button.
Phones and tablets
The front camera of a phone or tablet works. Put the device on a stand or lean it against something, a little way away, in landscape. A phone is smaller, so keep your hands close together in the picture. If the camera does not work, mouse and touch mode always does.
Honest limits
This is a simulation of the way a theremin is played, not a real theremin. A webcam sees you about thirty times a second, and the tracking takes a little time, so there is a small delay between your hand and the sound, and it is not as precise as the electrical field of a real instrument. The pitch is not perfectly steady: small tracking noise is smoothed out, and that smoothing adds a slight lag. The sound is a synthesis and not a model of the circuits of a real theremin. Tracking works best with clear light and an uncluttered background, and it can lose a hand that is hidden or turned. For serious practice, a real theremin is a better teacher, and this page is a quick, free way to try the idea.
More music tools
Try the hand tracking instrument for a webcam synth with chords and drums, the virtual violin, the virtual piano or the trackpad music page. All of them are in the music tools overview.