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.

From The MagPi store

Subscribe

Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.