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

by talofer99 in Circuits > Raspberry Pi

3395 Views, 29 Favorites, 0 Comments

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

Kesem meets the drums

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.

Supplies

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

Get the Piezo Sensor Ready

20180831_222902.jpg
Turn x-box Rock Band drum set into a midi playing electronic drum set.

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.

Write Some Code

The x-box drum kit project – update II

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
https://github.com/evankale/ArduinoMidiDrums

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.

Get It to Work on a Raspberry Pi

Finally got the drum kit project to work on a raspberry pi – update III

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

http://sandsoftwaresound.net/qsynth-fluidsynth-ras...

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.


Downloads

Make It Stand Alone

Analog input on raspberry pi using mcp3008 running on circuit python
20190320_211418.jpg
IMG_0267.JPG
IMG_0270.JPG
IMG_0296.JPG
IMG_0300.JPG
IMG_0299.JPG
IMG_0298.JPG
IMG_0303.JPG
IMG_0304.JPG
IMG_0306.JPG
20190322_175540.jpg
IMG_0305.JPG
IMG_0301.JPG
IMG_0307.JPG
IMG_0302.JPG
IMG_0308.JPG
IMG_0309.JPG
Untitled Sketch_bb.png

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.


Downloads