I am trying to make an electronic drum kit using an Arduino Mega board to convert piezo-sensor input to MIDI output into Ableton Live. I'm using an Arduino Mega board since it has sixteen analog inputs, just enough for the different drums and cymbals that I would like to incorporate. I'm running Windows Vista (64 bit), and I use LoopBe1 for a virtual MIDI port (also Serial2MIDI set at a 57600 baud rate, using the LoopBe1 as MIDI in/out). I'm currently using the code from the "DrumKit Kit" device that I found on the web:
I was also looking at:
I have each piezo attached the same way as in both of these example devices (i.e. in parallel with a 1 MOhm resistor and a reverse-biased 5.1 Zener diode), with each piezo going into a separate analog input channel on the Arduino Mega. Indeed, using this configuration, I am able to trigger drum sounds in Ableton Live by hitting the piezo sensors. However, I am experiencing a very annoying problem: whenever I hit a given piezo, it activates multiple MIDI channels in Ableton, including cross over with other piezo-input channels (i.e. hitting one piezo-input channel activates multiple drums, rather than a one-to-one piezo input to MIDI note correspondence!). I can't figure out what the problem is, as the code seems to be correct as far as I can tell. It's really frustrating! I am wondering if this is a hardware issue or a software issue... Do you think it would work if I made the Arduino output an actual MIDI output jack and then connect to a MIDI input (I have an old sound card with MIDI input though I'm not sure if it is Vista compatible) instead of relying on software conversion to do MIDI input from the Arduino? Or perhaps something else? I am wondering if my Arduino Mega board is messed up, though I just got it about a week ago (do you think perhaps the Mega is not the right board for this job? ...I did notice others using the Duemilanove, though it only has six analog inputs, which is why I went with the Mega). Any suggestions are welcome! Thanks in advance!