Piezo and drumkit

Hello

I want to mike up a regular drumkit. Is it a good idea to use piezos and arduino?

I would want to make "soft triggers" to register the strength and decay of the beats.

Thanks for any advice

fubbi

If you want to use the drumkit audio arduino and piezos won't do.

If you need the piezos for triggering MIDI you couls use Todbot's arduino-midi-drum-kit as a starter.

http://todbot.com/arduino/sketches/midi_drum_kit/

http://www.revver.com/video/88687/arduino-midi-drum-kit/

I think it does triggering and velocity (peak sensing) only, no notelength or envolope following. The length and volume of the sounds can be followed by arduino at analog in, use some smoothing from the smoothing example sketch. Piezos give the best separation, microphones would pick up too much of the overall kit.

Then you could make a diy vactrol with a LDR and led and use it to control amplifiers or filters,controllers. (google "diy vactrol for schematics). Drive the LED by an arduino analog out that follows the smoothed volumes of the drumsounds, and use the LDR's in the feedback path of the opamp in the scematic.

Or you could have the analog signal send a MIDI control signal to your soundmodule or synth/sampler program. I do expect a fair bit of latency though.

I'm interested in your results, so please let us know if and how you got this working

Hi, thanks for all the info's

I will use Isadora to trigger video samples directly over serial so no need for midi.

I have the basics down for serial comm. between arduino and isadora, but I hope I will be able to calibrate and smooth the values enough.

That tutorial should still be the right diagram for me though right?
Except the output wich would be USB serial and not midi in my case.

Will post here as soon as I have it together

fubbi

sooo, i got it working based on the diagram in the tutorial:

http://todbot.com/blog/2006/10/29/spooky-arduino-projects-4-and-musical-arduino/

and i got the serial going with isadora.

I am getting bursts of serial data which I would like to smooth and fade out. basically I need every stroke on the drum to send a value and then "ring out"

this arduino script (copy-paste compilation of various scripts):

int value; // reading of input
int value_a = 0; //memory of value
int ledPin = 13;  // flashes on contact
int piezoPin = 0; // reads the piezo

int THRESHOLD = 100;  // set minimum value that indicates a knock

int PieVal = 0;       // variable to store the value coming from the sensor

// end piezo business

void setup()
{
  pinMode(ledPin, OUTPUT);
  Serial.begin(19200); //init of the serial com
}

void loop() {
  digitalWrite(ledPin,LOW);     // indicate we're waiting
  PieVal = analogRead(piezoPin);   // read piezo
  if( PieVal >= THRESHOLD ) {      // is it bigger than our minimum?
    digitalWrite(ledPin, HIGH); // tell the world
    value = PieVal; // analog input 0 to value a in Isadora
    Serial.print("a"); // tag for each value
    Serial.println(value); // this sends Isadora a value like "a356"
  }

}

gets me a burst of data like this (on a single stroke)

a148
a136
a875
a495
a464
a148
a100
a398
a501
a423
a458
a514
a591
a590
a564
a492
a427
a366
a329
a290
a269
a238
a224
a208
a190
a176
a165
a155
a145
a137
a131
a123
a116
a108
a101

if anyone who actually knows how to write scripts could point me in the direction of how to grab the highest value and then let it fade back to zero, it would be a very big help.

I have to get this going pretty fast and I am stuck in my limited programming capabilities

thanks

fubbi

SORRY,, i'M NEW TO PRODUCE A MIDI DRUM KIT WITH ARDUINO.
I WANT TO NOTE THAT WHAT DEVICE MIDI DATA IS SENT TO ???
PC?? MIDI PLAYER?? DEVICES WITH SOUND CARD??

Psst - your caps lock key is on ;D