Introduction: Turn X-box Rock Band Drums Into a Midi Stand Alone Electronic Drums.

About: Maker at heart, coder at trade. love to build things that do practical stuff.

I was lucky to get a used x-box drum set, it’s in a bit of a rough shape, and no paddle, but nothing that cannot be fixed.I turn it into a standalone electric drum set. Reading the analog value from the piezo sensor and turn that into MIDI commands.

The current hardware consist of RPI-Zero, mcp3008 which is connected to the original piezo sensors on the set drums.


MCP3008 + IC socket
x-box drum kit, or 5 piezo mounted on some surface.
rpi zero
usb sound card for rpi
simple amplified speakers
some wires and pcb.
6 10M ohm resistors and some male headers for the piez connector board

Step 1: Get the Piezo Sensor Ready

I first took it a part and found all the piezo sensors, wiring, and created a board with a 1M resistor between the 2 wires of each piezo.

The Cymbal had an interesting extra circuitry in them. I took it a part leaving only the sensor. I do want one day to figure out what is the output of that circuitry,

This part of the testing and work was done on arduino uno.

Step 2: Write Some Code

I fixed the x-box up a bit, mending all the broken parts. Removed the falling apart pads.

And finally got some code that works well enough for my kid – not perfect yet.

The original code I wanted to use and the one that helped me work out mine is this

but when working on it I found out he stops the midi note right after sending it. which is ok if you play a game on the computer, which is what that code is meant for, but not so great when you actually want to play the midi note.

You can download the code in the attached file - note there are 4.

I also added a real cool feature that allows you to choose the note for each keypad, it even saves the settings in the EEPROM.

and the 3 software I mention in the video are loopbe1, hairless midi serial bridge and VMPK

The Next big step is to move it to work on a raspberry pi.

Step 3: Get It to Work on a Raspberry Pi

After almost giving up on the project, I asked again on few places and was directed to an article that put me on the right path which is fluidsynth.

I spend several good hours to get it working and finally did.
The main issue was to get midi working on the Rpi.
For that I installed fluidsynth using this great tutorial

I setup the Arduino to send serial commands, and then listen to them with python serial on the raspberry and send that to midi via the fluidsynth.

I even managed to download a proper sf2 file for drums.

As you can see Kesem loves it.

The arduino was using the same code and for the rpi I write the attached code, I was unable to attached the sf2 files - but they can be easily found using google.


Step 4: Make It Stand Alone

The biggest step in getting it to work as a stand alone was to remove the arduino and try to make it work a bit faster. there were noticeable gaps between the "hit" and the sound played on the midi.
So in order to get rid of the arduino I needed an analog alternative and here is where the mcp3008 came to the rescue. you can see in the images that I created a break out board for it, and in the video you can find all the details on the steps.

The mcp3008 uses spi to communicate and I connected the 2 and ran few test, adafruit has a great library for the mcp3008 for python. again instructions in the video.
I used a rpi zero due to its size and I added an external usb sound card, fr the sound output. I used a simple speaker with build in amplifier for playing the sound.

The current code is attached as well and it runs on the rpi it self and its set as a service, so it gets to run when loaded.

A real cool feature that I Added was to connect the small reset button that was on the box, and use that to shutdown the system, since I'm running with no screen.

The current code is not perfect yet, and I keep on trying to improve it and am getting better, so if you have ideas of getting it work even better when it comes to the midi - I would love to hear.

Raspberry Pi Contest 2020

Participated in the
Raspberry Pi Contest 2020