A browser-based Theremin controlled with hand tracking. The app uses your webcam to map hand movement to pitch and volume, then plays sound, just like a Theremin.
- Turn on Camera and Audio in the control panel.
- Use your left hand for volume.
- Use your right hand for pitch.
- Drag the vertical divider to adjust the hand zones.
- Open More to change smoothing, sensitivity, waveform, and pitch range.
Install dependencies:
pnpm installStart the dev server:
pnpm devThen open the local URL shown in the terminal and allow camera access.
Build and deploy to Cloudflare Workers:
pnpm run build
npx wrangler deploypnpm dev # Start the development server
pnpm build # Type-check and build the app
pnpm test # Run tests
pnpm check # Type-check and run tests
pnpm preview # Preview the production build
pnpm fetch:model # Download the MediaPipe hand modelThe app expects the MediaPipe hand model at:
public/models/hand_landmarker.taskIf the model is missing, run:
pnpm run fetch:modelCamera access usually requires localhost or HTTPS.