Micro Music Keyboard With Effects
by wzimeng in Circuits > Electronics
49 Views, 1 Favorites, 0 Comments
Micro Music Keyboard With Effects
This is a one octave arduino microcontroller piano keyboard that plays music and generate visual effects. The project was created to combine an interest in electronics with music and an exploration of coding and AI using the Raspberry Pi.
Supplies
Display:
- raspberry pi 5 (optional, only required for LCD board)
- LCD board (optional)
- computer
Keyboard:
- 2x raspberry pi pico
- self-designed pcb board
- 42x mechanical tactile switches
- 42x key caps
- 2x USB to micro cable
Keys:
- 3D printer
- pla filament
Other necessities:
- soldering materials
Design PCB Board
For this project, I used two 3x7 pcb boards for the full octave using a reference from another project. It is possible to design it as one pcb board but since the pico only has 26 usable pins and this requires 39 pins for direct wiring, it would have to be done through a key matrix.
Solder and Key Cap
With the pcb boards, solder each switch as well as the raspberry pi pico. Use any online tutorial for help with soldering.
After soldering, attach the key caps. The key caps can either be bought or 3D printed.
Code
Use the following guide and download the necessary bundle.
Use the following code for the first pcb board and upload it using a notepage as a code.py file.
Second code:
*** For the second code, switch the order of the keys so that the raspberry pi pico can lay on the outside for both of the boards
Test the pcb boards by plugging in the USB cable to the computer.
All three keys in each column should play the exact same note.
To play, use any online MIDI keyboard. I personally used midi.city but any other free platforms work just as well.
3D Print Keys
Utilized a reference for standard sized keys from another project. The 8 white keys are different for each key. Additionally print 5 identical black keys.
To attach the keys, use strong tape to attach each key to three of the keycaps.
Effects
The keyboard playing can be played with effects and different sounds using a variety of platforms.
For varying keyboard sounds try virtualpiano.eu.