Raspberry Pi Self-Playing Piano
By Russell Barnes. Posted
Self-playing piano controlled by a Raspberry Pi
Lloyd Bayley is the proud owner of a Yamaha Disklavier pianola (a self-playing piano, or “player-piano” as it’s often known).
When Lloyd’s Disklavier broke down, he decided to improve it with a Raspberry Pi.
Pianolas don’t just make the sound of piano notes, they move the keys to self-play the piano. They’re quite spectacular to watch, and classic pianolas worked using a roll of paper with holes cut into it (the holes determine which keys the piano plays).
More modern version, like the Yamaha Disklavier, use a floppy disk drive. The disks contain songs in MIDI format. Insert the disk and select the track, then the piano starts playing.
Pianola Pi: building a self-playing piano
When the floppy drive on Lloyds’ Disklavier broke, he decided on a radical solution.
Instead of fitting a new floppy drive, he attached a Raspberry Pi with a Touchscreen Display. The Raspberry Pi sends midi data direct to the Yamaha Disklavier and it plays any song you choose.
“I thought, ‘this is going to get more and more common as time goes on’,” says Lloyd in his video. “With the discs failing for the older technology.”
Rather than shell out for an expensive replacement, Lloyd decided to see if a Raspberry Pi could be used instead. “I thought to myself ‘all I need to do is be able to get the things in there’,” says Lloyd. “I wonder if the Raspberry Pi can play MIDI?”
It turns out some MIDI to USB extensions are all that’s required, and Lloyd screwed a Touchscreen display and Raspberry Pi together to create a touch controller for his pianola.
“All we need to do is put a little piece of software on here called XP MIDI,” says Lloyd, “and you then fill the directories with your MIDI files of choice and it's very easy to navigate.”
Lloyd spends a lot of time going over the build, and his wonderful looking Yamaha Disklavier so the video starts some way in (where the Raspberry Pi starts to play the piano).
Skip back to the start if you want to view the build process.
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
Make your RAM go further – Raspberry Pi OS memory optimisation tips
In issue 164 of Raspberry Pi Official Magazine we have been playing around with the new Raspberry Pi 5 1GB RAM. While the RAM shortage caused by the demands of AI infrastructure is annoying beyond belief, this has been a great chance for us to really get to grips with RAM. Generating images in Stable […]
Read more →
Mighty Projects – 1GB Computer in Raspberry Pi Official Magazine 164
It’s normal for computers to get faster and more pwerful, but the new-ish Raspberry Pi 5 1GB is a step in the other direction: it has all the processing power and the same GPIO pins of its more costly siblings, but with only 1GB of RAM it’s at a price that’s friendlier on the wallet […]
Read more →
Win one of five 256GB Raspberry Pi Flash Drives
If you’ve been around long enough, you know that every Raspberry Pi accessory is top quality, and the latest Flash Drive is no different. Fancy a big one? We have five up for grabs, and you can enter below… Win 1 of 5 256GB Raspberry Pi Flash Drives
Read more →