Harmony Hacker
Github link: https://github.com/ahmedkhalf/makeuoft2023-piano-hack
Harmony Hacker is a project which was made in 24 hours during the 2023 MakeUOFT (Canada largest Hardware Hackthon.
The project was inpried by the HackerTyper where users can fake being a hacker. Instead, Harmony Hacker was designed, such that users can fake being a professional piano player with confidence.
The piano keyboard in the project plays the notes of the MIDI song the users select through its speaker, but the twist is that no matter which key the user 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.
The 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, the local input was blocked from the keyboard by changing the local MIDI signal to off. Next, the midi signals were detected through the raspberry pi. By reading a MIDI song, the user input and play the actual song (if hacker mode is turned on) are interjected by passing the output on the MIDI input of the piano. The ultrasonic sensor is used to change the volume of the piano: the closer the users are, the louder it becomes.