Hi, I'm running a version of SpikenzieLab's DrumKitAI Sketch on an Arduino Duemilanove w/ATmega 328. The drum kit sketch is meant to be used with multiple piezo sensors that are mounted on separate pads/drums. However, for my project I am mounting all of my piezo sensors on a single piece of thin wood. I need to the sketch to only register one hit at a time so that there wont be any crosstalk between sensors. I was hoping someone could describe/show me how to change the sketch to only read the sensor with the highest vibration for each hit. Here is the code I am using:[font=Verdana]

//*******************************************************************************************************************// Main Program//*******************************************************************************************************************

The Piezos are able to measure the velocity of each hit based on the amount of vibration. The sketch even allows me to create a minimum velocity needed to send a MIDI signal. It seems like the code should be able to be altered to only allow a single MIDI note to be registered at a time (the note from the piezo with the strongest signal/vibration). Or am I missing something?

I should also note that currently, using the filter already built into the code, hitting the piece of wood only sends a signal from the nearest coupled of piezos. I used the Arduino Serial Monitor and recorded the data from various hits. It appears to be constant that the piezo nearest the point of contact for each hit sends the greatest value for the Velocity variable.

I just tried it and only the signals from the first sensor are coming through. I tried changing the PadCutOff to the lowest value for all the other sensors while increasing the PadCutOff for the first one, but I still can't get any of the other pads to register a hit.

Thank you. I just uploaded the new sketch but the readings are going crazy. It appears that after the first piezo is triggered, a loop is occurring and sending a "note off" MIDI message. I've attached a screenshot of my MIDI monitor. I also tried running the sketch with all the user variables set to the default value but the same thing is happening. After the loop starts it appears that none of the Piezos can be triggered.