Tough Pi-ano Can Take A Punch

There will be no delicate solos for [24 Hour Engineer’s] Tough Pi-ano. It was built to soak punishment from aggressive youngsters in musical therapy, specifically those on the autism spectrum and those with Down’s syndrome. The Tough Pi-ano will be bolted to a wall with heavy-duty shelf brackets so it can’t fall on anyone. The keyboard is covered in plastic and it doesn’t have any exposed metal so there will be no splinters.

[24 Hour Engineer] made a short video demonstration and if you listen closely, he has a pun in all but one sentence. We love that kind of easter egg in YouTube videos. Check it out after the break.

Inside the 48-key instrument are four Raspberry Pi Zeros where each Pi controls one octave. The redundancy ensures that a hardware failure only drops out a single octave and the kids can keep playing until replacement parts arrive. Each Pi has identical programming and a thumbwheel switch tells it which octave it will be emulating.

Programming was done with Python and Pygame and all the inputs are run to a homemade “hat” where the wires are soldered. Pygame’s sole responsibility is to monitor the GPIO and then play the appropriate note when a button is pressed, slapped, punched or sat upon.

Similar in name, the Touch Piano has no moving parts or perhaps you would rather use your Raspberry Pi in an upright piano.

14 thoughts on “Tough Pi-ano Can Take A Punch

  1. “The redundancy ensures that a hardware failure only drops out a single octave” lol. what you meant to say is, he couldn’t figure out how to get 48 inputs into a single pi. kids these days, man.

    1. Depending on the expected use environment (like a museum for example), it actually makes sense to engineer it this way. Getting 48 literal debounced button press inputs into a microcontroller is not hard at all and there are several very common and robust ways of doing so.

        1. 5 74HC165 to read each input individually or 1 74HC595 and 6 inputs on RPi for matrix scanning. With some Schottky diodes in series with keys to make sure every key will be read properly. These are two standard approaches I know of. One can use resistors to read the keys with one analog input, but that’s overkill in this situation. Truly redundant system would use a small microcontroller for keyboard scanning and generating events over serial interface, and four RPi’s in parallel for sound generating. Or just ditch the RPis and use small 16-32bit micro to do both scanning and soft synth on it…

          1. Make sure that the USB keyboard encoder can actually press multiple keys at once (if that is important to your application). Many USB keyboard emulators simply cannot do this or can only handle up to about 4 or 5 or so pressed at once.

          2. With the nature of music, and chords, it’s to be expected several notes would be played at once, if a teacher or someone musically trained tries to play it. That’d clause horrible-sounding clashes pretty quickly using a matrix encoding with no diodes.

            Probably simplest just to use an Arduino-type micro with lots of pins. Either use 3 or 4 of them, one key per pin, or have the keys only split into a 2×24 matrix. You’d need diodes for that though.

            Since Arduino / Atmel micros (or PICs for that matter) are so cheap, makes sense to me to use 1 per key and a shared serial bus for key events. Could even look into the ones that have capacitive key sensing to make the keys even simpler, cheaper, and more reliable, just being flat metal contacts. Depending how much more you pay for the cap sense built-in.

  2. Just wire those buttons to an old Yamaha or Casio keyboard. Good sounds, midi, and less than a dozen wires to interconnect. The buttons should be on a gray or not white background. Those tweeters on the desk are not good sound either, nor child proof. This simple synth is in stereo? As usual in YouTube videos the instrument sound in the video was essentially inaudible. It should be as loud as the voice over.

Leave a Reply to Dave DavidsonCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.