Not only musicians, but children also like to play on pianos. A real piano takes up too much space and is an expensive acquisition, but electronic pianos are affordable and their small size offers a great opportunity for music aficionados to practice at their leisure. Creating a piano with a Raspberry Pi or RBPi, the versatile single board computer, enables the designer to learn to program a computer as well as distinguish nuances in music.
That inspired the 14-year old Zachary Igielman to design PiPiano, and the Piano HAT is based on Zachary’s PiPiano. Where PiPiano is an add-on for the RBPI, the Piano HAT is a full-fledged Hardware Attached on Top board specifically designed for the RBPi.
Hardware Attached on Top or HAT boards sit on the RBPi models B+, conforming to a specific set of rules. HAT boards include a system to allow the RBPi to identify it. Based on the identification, the RBPi automatically configures its GPIO pins and drivers to suit the HAT board.
You can use the Piano HAT with RBPi models 2, B+ and A+. The kit comes in a fully assembled state and has a trove of software examples so that you can start playing music with it immediately as soon as you plug it in. The Piano HAT is completely touch-sensitive and you can use it to play music and generate software synthesizers using Python, control hardware synthesizers or simply be creative.
The Piano HAT kit comes with 16 touch-sensitive buttons, a full octave of 13 piano touch keys, buttons to shift the octave up or down, an instrument cycle button and 16 LEDs. You can let the program play and light up the LEDs auto-magically, or control them with Python.
You can use Python to program the 16 touch-sensitive buttons individually on the Piano HAT. Hook up the buttons to any of your projects and use them as you like. Two dedicated buttons are available to allow you to shift the music scale up or down an octave, offering a chance of expanding your playing horizons.
Using a little Python glue, it is possible to send a patch change event from your RBPi to a synthesizer such as the Yoshimi – the Instrument cycle button allows this. With the 16 LEDs available, you can light up the keys, making the Piano HAT a learn-to-play keyboard. With Python, you can use the LEDs as a visual metronome or allow your child to walk through his or her favorite tune.
The Piano HAT and RBPi combination, with some Python programming thrown in, allows creation of Piano-controlled contraptions. This includes a variety of synthesizers, both hardware and software types. MIDI examples included in the kit let you play music with synthesizers such as the Yoshini, Sunvox and others. The kit also includes a PyGame example that can generate a few octaves of great piano and includes drums as well.
Python on your RBPi allows your Piano HAT to output regular MIDI commands, with which you can use your MIDI adapter over USB to take control of your hardware synthesizer gear.