Arduino MIDI Drum .001

I am an inveterate tabletop drummer, so when I firstĀ  heard about the Zendrum my gearlust fizzed, only to be decarbonated by the price of what is really just a bunch of piezo triggers mounted on a nice piece of wood.

So, now that I’ve got the Arduino bug (my first circuit used a potentiometer to control the brightness of an LED [chuff, preen]), all things seem possible and I think to myself, “self… we can do one of these.”

Having obtained a fistful of piezo discs and a MUX board, I’m now faced with the task of sampling the peak values of those discs faster than I can thwap them and converting their data to MIDI events.

Now, I’m obviously not the first person to come up with this idea (here, let me Google that for you), so I can vicariously consider the problems of peak detection, sample rate and so on, before I ever touch jumper wire to breadboard.

For now, I’m going to see if I can get away without external peak detection or sample/hold circuitry. I’m going to write a simple state loop with no delays and see whether it serves the purpose without ornamentation. Something like this:

The actual MIDI processing is dirt simple (actual I/O will be handled by another board), so it shouldn’t eat up a lot of time. And if either acquisition or output winds up being slower than I think, I can offload either or both processes to auxiliary microcontrollers.

If all this works reasonably well, then I can look at adding a ‘programming’ state (probably switched to by interrupt) which would allow me to assign MIDI key values, modify thresholds, etc.

I wonder just how much of this stuff you can cram into 32K anyway?