Virtual piano with a webcam: how it works

A webcam piano draws keys on the screen and uses the camera to see when a hand or foot moves onto one. Here is how that works, what it needs, and a free one made for kids.

  • Runs in the browser
  • Ages 5-8
  • Video stays on your device
  • Free

Try the webcam piano →

Opens straight into Hoppo Piano · webcam on a laptop or TV, tap on a phone or tablet · no signup

The short answer: a virtual piano with a webcam shows piano keys on the screen and runs a body-tracking model on each camera frame to find where the player's hands (or feet) are. When a hand moves into a key, the key plays. Hoppo Piano is a free one for kids ages 5-8 that runs in the browser with an ordinary webcam.

The three parts of a camera piano

  1. Seeing the body. A pose model looks at each camera frame and marks points on the body: wrists, fingers, ankles, toes. In Hoppo Piano it runs on your device, in the browser.
  2. Deciding what counts as a press. This is the hard part. A real key is pushed; an on-screen key can only be touched. Hoppo Piano plays a hand key when a hand moves into it fast enough, and a floor key when a foot comes down onto it and settles. Resting on a key is silent, so a kid can stand still and think.
  3. Making the sound. The browser plays a note straight away: recorded piano, marimba, bells, flute, violin pluck or boing, or a built-in synth.

Hands, fingers or feet?

Some webcam pianos follow each fingertip and need the hand close to the camera. That suits an adult at a desk, but small hands at a distance are hard to see finger by finger. Hoppo Piano follows the whole palm (wrist and knuckles averaged) for the air piano and the feet for the floor piano, so a kid can stand back and play with big movements. It measures speed and distance against the kid's own body size, so near and far kids play the same.

What you need

  • A laptop, Chromebook, desktop or smart TV setup with a webcam. Built-in laptop cameras are fine.
  • A current browser. The first round downloads the tracking model; after that it is cached.
  • Light on the player, from the front.
  • Room to stand back from the screen.
  • School Chromebook? The camera is sometimes blocked by the school's settings: see camera games on school Chromebooks.

Common problems

  • Keys play by themselves: someone else is moving in the picture, or a hand is drifting through the row. Hoppo Piano ignores very slow drifts; stand so only the player is in view.
  • A key won't play again: move the hand out of the key and back in, or lift the foot and step again.
  • Notes are late: close other heavy tabs. A slow computer runs the model fewer times a second.
  • No camera at all: tap the keys. Hoppo Piano works by touch on phones and tablets.

A piano made for kids, not for practice

A webcam piano won't teach the finger technique of a real keyboard; there is no key to push down. What it does well for a 5 to 8 year old is the music part: hearing that keys go up and down in pitch, finding a tune one key at a time, copying a short melody by ear, and doing it standing up. For playing on a real keyboard later, see how to teach kids piano at home.

Camera privacy

The camera picture is processed on your device, in the browser, to find hands and feet. It is never uploaded or recorded, and there are no accounts or child profiles to make. See webcam game privacy and the privacy policy for the anonymous usage numbers Hoppo does collect.

Try the webcam piano →

More piano pages

All of them start from piano games for kids.

Try a camera piano

No piano, no download, no signup. Free to play.

Frequently Asked Questions

Can you play piano with a webcam?

Yes. A webcam piano shows keys on the screen and uses body tracking to see when a hand or foot moves onto one. Hoppo Piano does this for free in the browser.

Does a webcam piano need special software?

Not Hoppo Piano. It runs in a current web browser; the tracking model downloads on the first round and is cached after that.

Does it track fingers?

Hoppo Piano follows the whole palm for the air piano and the feet for the floor piano, so kids can stand back and play with big movements.

Is my camera video sent anywhere?

No. In Hoppo Piano the camera picture is processed on your device and never uploaded or recorded.

Who is Hoppo Piano for?

Kids ages 5-8. It has five easy public-domain songs, a free-play mode and a copy-the-tune game.