Inspiration
We wanted to create something like HackerTyper where you can fake being a hacker. Instead, we created Harmony Hacker, such that you can fake being a professional piano player with confidence.
What it does
The piano keyboard in our project plays the notes of the MIDI song you select through its speaker, but the twist is that no matter which key you press; the pressed key will only trigger the correct note from the song. A touchscreen HDMI LCD that includes a switch function which changes from "hacker" mode to "normal piano" mode; a "song list" with a list of triggers that we input in; a reset function that replays the song; a "quit" function to stop the code; and a "slowness" bar to change to song speed. An ultrasonic sensor has been integrated with the song-playing system which changes the song volume depending on the distance of the player's body to the keyboard.
How we built it
Our project consisted of:
- MIDI keyboard
- Raspberry Pi 4
- 7" touchscreen HDMI LCD by SunFounder
- Breadboard
- Jumper wires
- Resistors
- Ultrasonic sensor
- 5V 3A Power Supply
Initially, we block the local input from the keyboard by changing the local MIDI signal to off. Next, we detect the midi signals through the raspberry pi. By reading a MIDI song, we interject the user input and play the actual song (if hacker mode is turned on) by passing our output on the MIDI input of the piano. The ultrasonic sensor is used to change the volume of the piano: the closer you are, the louder it becomes.
Challenges we ran into
Some major challenges we ran into were:
- deciding on a project idea
- gathering all the hardware components that we wanted
- handling stray notes and combined key presses using "chunking"
- make the ultrasonic sensor measurements accurate
Accomplishments that we're proud of
- learned how to interface with a MIDI keyboard with Python over USB
- a minimum viable project built well under the deadline
- distance-based volume addon.
What we learned
The technologies our team learned were tkinder and the mido Python library (for MIDI parsing). Furthermore, we learned to interface with the ultrasonic sensor through the raspberry pi and receive its input signals in the code.
What's next for Harmony Hacker
We would like to add an addressable RGB LED light strip to show the user which note on the keyboard will be played next. It would also be great if we added a frequency sensor to change the colour of some RGB LED lights in a strip and their speed.
Built With
- mido
- python
- raspberry-pi
- tkinter

Log in or sign up for Devpost to join the conversation.