Piano HAT review – a musical HAT
By Russell Barnes. Posted
Les Pounder looks at a HAT-based piano keyboard which uses capacitive touch keys for input
Cyberdeck projects – survive in style with Raspberry Pi!
In 2014, a 14-year‑old called Zachary Igielman launched a successful crowdfunding campaign for his Pi Piano. Originally created using a MCP23017 GPIO expander and a series of momentary switches, the Pi Piano used a piezo buzzer to simulate the tone of a note.
The details
Price: £15 / $24
Maker: Pimoroni
Website: Pimoroni
This review can be found in The MagPi 37
One of Zachary’s advisors was Phil Howard from Pimoroni, who worked with Zachary to create this new and improved version.
Crowdfunded project
The latest incarnation is now known as Piano HAT and uses a capacitive touch-based interface to simulate a portion of a traditional piano keyboard. The board measures 64mm by 56mm and fits neatly on top of the models A+, B+, and Pi 2. Being a HAT board, it also attaches to all 40 of the GPIO pins. As well as the keyboard, we have the ability to raise and lower the octaves and change instruments via three extra inputs on the board.
Hardware is just one part of this project, and the software which supports Piano HAT is all based on Python, which enables existing projects created in this language to easily integrate Piano HAT. Phil Howard has written a series of examples which use the Pygame library to demonstrate how to use Piano HAT as a typical piano via a series of audio samples, which can be swapped for any types of sounds should you wish to build your own input. Piano HAT also comes with a tutorial which demonstrates using the built-in LEDs to teach playing a simple tune, in this case ‘Twinkle, twinkle, little star’. So, using this library, we can code our own tutorial for others to learn with.
Powerful MIDI synthesiser
Software is not just limited to simple samples. In fact, Phil has supplied a number of methods to connect the Piano HAT library to a MIDI service running on your Pi. This then turns the Piano HAT into a powerful synthesiser input for software such as Yoshimi and SunVox, although a Raspberry Pi 2 is required for these applications.
The Piano HAT looks like a rather simple board, but thanks to a clear Python library, well-built hardware, and a powerful MIDI control option, we have a board for musical adventures.
Last word
4/5
Such a simple board, but with limitless applications thanks to Python and MIDI. This is a great platform for musical experimentation and it can easily be used with Minecraft and other projects.
Russell runs Raspberry Pi Press, which includes The MagPi, Hello World, HackSpace magazine, and book projects. He’s a massive sci-fi bore.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Pimoroni Presto review – a classy high-tech touchscreen
Is this the new pinnacle of graphic coding, or just a fancy screen in a metal case?
Read more →
HAL 9000
I can let you do this, Jan
Read more →
Cyberdeck Projects in Raspberry Pi Official Magazine 168
Cyberdecks: because DIY computers are loads of fun, and making them look like survival tools for a post-apocalyptic wasteland is extremely cool. We’ll take a look at some of the most impressive builds out there, explore what goes in to making one, and finally we’ll show you how to build your own. Pixels on a […]
Read more →
