Music for Everyone

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 Works

The Problem & Our Solution

❌ The Problem

Over 1.3 billion people live with motor disabilities. Traditional instruments require grip, pressure, and precise coordination — making music completely inaccessible to many.

✅ Our Solution

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.

How It Works

1

Print the Sheet

Print the piano keyboard template on A4 paper. Place it flat on your desk.

2

Open the Camera

Run the program. Your webcam opens and overlays key regions on the live feed.

3

Hover Your Finger

The program detects your fingertip using HSV skin color masking in real time.

4

Note Plays

The key highlights on screen and the corresponding note frequency plays instantly.

Features

🎵 Free Play

Hover over any key and it plays instantly. Natural and intuitive.

⏱ Dwell Mode

Hold finger for 1 second to play. Designed for users with hand tremors.

🤚 One-Hand Mode

Full octave mapped to one side. For single-limb users.

⏺ Record

Press R to record your melody in real time.

▶ Playback

Press P to replay what you played with original timing.

💾 Export

Press S to save your melody as melody.txt notation.

📊 BPM Display

Live beats-per-minute shown as you play.

🔧 Zone Resize

Press +/- to grow or shrink key detection zones.

Setup

# 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

Team

👩‍💻
Tanya
Lead — main.c & Integration
👩‍💻
Sharmi
Camera & Skin Detection
👨‍💻
Monish
Key Mapping & Audio
👩‍💻
Shreejani
Recording & Playback
👨‍💻
Sanjay
Website & GitHub Pages