A contactless piano that anyone can play — no touch, no force, no expensive hardware. Just a webcam and a printed sheet.
View on GitHub How It WorksOver 1.3 billion people live with motor disabilities. Traditional instruments require grip, pressure, and precise coordination — making music completely inaccessible to many.
MotionKeys uses a webcam to detect finger position above a printed piano sheet. Hover over a key — it plays. No contact needed. Built in pure C using OpenCV.
Print the piano keyboard template on A4 paper. Place it flat on your desk.
Run the program. Your webcam opens and overlays key regions on the live feed.
The program detects your fingertip using HSV skin color masking in real time.
The key highlights on screen and the corresponding note frequency plays instantly.
Hover over any key and it plays instantly. Natural and intuitive.
Hold finger for 1 second to play. Designed for users with hand tremors.
Full octave mapped to one side. For single-limb users.
Press R to record your melody in real time.
Press P to replay what you played with original timing.
Press S to save your melody as melody.txt notation.
Live beats-per-minute shown as you play.
Press +/- to grow or shrink key detection zones.
# Install OpenCV
sudo apt-get install libopencv-dev gcc
# Clone the repo
git clone https://github.com/TanyaPaulA/motionkeys.git
cd motionkeys
# Compile
make
# Run
./motionkeys