A Guitar Hero–style rhythm game you play with your webcam. No controller, no plastic guitar, no libraries: one self-contained HTML file, motion detection by comparing successive webcam frames, and every sound synthesized live with the Web Audio API.
Built live with Claude for the Claude Community Build Day, Tel Aviv (17 Sept 2026), as a twist on the "conduct an orchestra with your hands" demo from the Build Day kit.
▶ Play it: https://natsh.github.io/air-guitar-hero/ (needs a webcam and Chrome; allow the camera when asked)
6-second clip from a real run (mp4). The webcam corner shows the lane columns lighting up as the hands move.
- The mirrored webcam view is split into 4 vertical columns, one per lane. When a note reaches the hit line, strike the air in that column.
- Motion is detected on a tiny 64×48 grayscale canvas by diffing each frame against the previous one. A lane fires on a sharp rise in motion energy (an onset), not on sustained motion, so waving continuously doesn't spam hits.
- The lead guitar only sounds when you hit a note. Miss it and you get a muted fizzle. Bass, drums and the chorus power-chord pad always play, so the song never dies.
- The song is an original 90s-grunge riff (126 BPM, E minor). The note chart is generated in code from a single melody array; Easy / Medium / Hard change note density and tempo.
- Score, combo, multiplier up to x4, star rating at the end.
| Strike detected in a lane | Two-lane hit |
|---|---|
![]() |
![]() |
| Calibration screen | Results |
|---|---|
![]() |
![]() |
| Input | Action |
|---|---|
| Strike the air in a lane column | Play that lane |
D F J K (or 1–4) |
Keyboard fallback for lanes 1–4 |
A |
Toggle autoplay (stage safety net) |
Space |
Pause / resume |
Esc |
Back to the start screen |
Use the sensitivity slider on the start screen to match the lighting in the room. It's remembered between runs.
Chrome only allows the webcam on https:// or http://localhost, so don't open the file directly. Serve it:
python3 -m http.server 8765then open http://localhost:8765/ .
The whole game came out of one prompt. It's in PROMPT.md, shaped like the working-demo prompts in the Build Day kit: gameplay, an original song, Web Audio synthesis, stage-worthy visuals, safety nets, and a quality bar (single file, no libraries, 60 fps, no console errors).
MIT





0 comments
log in to comment.