Introduction: INVISSIBLE PIANO

About: Hey Guys am an Engineer who love to build creative stuffs. Feel free check out my project here, Or you can check out my YouTube Channel @electrocode. Thank you Link -

Have you ever wanted to play a virtual piano without physically touching any keys? In this project, I built a MIDI controller using an Arduino Leonardo and 10 IR sensors to detect hand gestures and play different musical notes on a virtual piano app. This allows for a touch-free, futuristic way of making music, perfect for musicians and tech enthusiasts alike!

Supplies

How It Works

This MIDI controller uses Infrared (IR) sensors to detect when a finger is above a certain position. Each sensor corresponds to a specific MIDI note. When a finger moves close to a sensor, the Arduino detects it and sends a MIDI signal to the computer, triggering a note in a virtual piano app. When the finger moves away, the note stops.

The Arduino Leonardo is used because it can act as a native USB MIDI device, making it easier to communicate with music software.

Materials Needed

  1. Arduino Leonardo (Required for USB MIDI support)
  2. 10 IR Sensors (To detect finger movement)
  3. USB Cable (To connect Arduino to PC)
  4. Jumper Wires (For connections)
  5. Virtual Piano Software (e.g., GarageBand, Virtual MIDI Piano Keyboard)
  6. Arduino IDE (For coding the Arduino)

Step 1: Circuit Diagram

The IR sensors are connected to different digital pins of the Arduino Leonardo. Each sensor outputs a HIGH or LOW signal based on whether a finger is present, and the Arduino translates this into MIDI note signals.

Step 2: Code

The code reads the IR sensors and sends MIDI note commands when a sensor is triggered. The Leonardo is programmed to communicate with the computer as a MIDI device.

Step 3: How to Set Up and Use

  1. Assemble the circuit as per the diagram.
  2. Upload the Arduino code to your Leonardo.
  3. Connect the Leonardo to your computer via USB.
  4. Open a Virtual Piano App like GarageBand or Virtual MIDI Piano Keyboard.
  5. Start playing by moving your fingers over the IR sensors!



Step 4: Conclusion

This project demonstrates how to build a touch-free MIDI controller using an Arduino Leonardo and IR sensors. It’s a fun, interactive way to play music and explore the possibilities of gesture-based MIDI control!

Let me know in the comments if you have any questions or ideas for improvements!