Air Theremin turns your webcam into a wave-to-play instrument in the browser
A browser-based theremin lets you produce sound by moving in front of a camera rather than touching a physical instrument. Using a laptop or phone webcam, it tracks both hands: spreading them apart raises the volume, lifting them raises the pitch, leaning back softens the tone, and bringing your palms together cuts the sound. Moving out of the camera’s view silences it entirely, mimicking how a real theremin responds to the position of your hands in space.
The project offers two fallback input modes for when hand tracking isn’t ideal. On a phone, the gyroscope can drive it instead — tilting left and right controls volume while tilting forward and back controls pitch, all mapped to the range that stays within the frame. With no camera or motion sensor at all, the mouse takes over. Pressing start triggers a brief calibration step so the tool adapts to how the device is being held.
As a technical curiosity, it’s a neat demonstration of running real-time gesture and motion sensing entirely client-side in the browser, layering effects like reverb, vibrato, and note-snapping on top. It also quietly illustrates how much expressive interaction modern web APIs can extract from commodity webcam and motion-sensor access — the same capabilities that make such toys possible are the ones privacy-minded users tend to watch closely.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.