Pages: [1]   Go Down
Author Topic: HELP ME!!! I need some advice for a Piezo-MIDI Arduino project  (Read 5253 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all,
I am a newbie to arduino stuff, so bear with me.
Basically, i want to create something like the Zendrum (http://www.Zendrum.com), and I have already a bunch of necessary items, listed below. I only care right now about the technical/electronical stuff. I want to be able to hit a piezo sensor, and have a drum sound play.
- Piezo electric sensors (16 or so)
- 4 Arduino duemilanove boards
- 1 Arduino MEGA 2560   <-- Probably the one I will use
- a ton of resistors, all different ohms
- Spekinzie Labs' Drum kit - kit (http://www.spikenzielabs.com/Catalog/index.php?main_page=product_info&cPath=17&products_id=55)
- The USB cord to connect the arduino to my laptop
- FL Studio 10, with a bunch of drum sounds and stuff
- MIDI Yoke Software (Serial/MIDI Converter)   <-- not sure how to use it

I've been following instructions on various websites and videos, but I can't seem to figure it out. What I think I understand so far is this:
1. Piezo Sensor is hit
2. Mess of Analog Data is sent to Arduino through the Drum Kit - Kit
Arduino changes all that analog data into a midi command, with velocity, channel, note...etc
3. That all travels through the USB (NOT MIDI CABLE) to my computer, where MIDI Yoke analyses it and transforms it into something that FL Studios can rea
4. FL Studios read the data sent from MIDI Yoke and plays a drum sound through the speaker.

I could really use some step-by-step instructions on how to set this all up, and the correct code to use for the arduino. I can provide more details about my parts and computer or anything else if necessary.
Logged

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1287
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What code have you already written?

The steps you describe are bascially correct, except that you need to deal with more than one piezo and you need to make sure that all the piezo's are serviced (so no using delay() anywhere).

Each Piezo has a small circuit associated with it (1 MOhm resistor and a 5.1V zener) to make sure you don't blow up the AVR port. Lots of examples of these if you Google. I assume that your drum kit thing is just a few of these, and I woudld bet they have sample code for processing a piezo on their web site.

Once you have the magnitude of a the hit from analogRead() you need to convert that into a velocity. The drum that is hit determines the type of instrument that you want for that input. The two together will get you your MIDI message parameters, which you output through a serial port.

On the MIDI side you need to make sure that you initialise the right parameters and according to MIDI rules (typically I shut down all the sound, select GM map 0, etc). Remember that you are writing to MIDI channel 10 (or 9 when it is in the MIDI message, as the ports are actually zero based) which is the default percussion channel.

Enough to get you started? As per above, Google is your friend here. This has been done many times before.
« Last Edit: June 28, 2013, 12:51:05 am by marco_c » Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Offline Offline
Sr. Member
****
Karma: 8
Posts: 250
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I have built a MIDI Xylophone with piezo Elements, which was discussed here in the Arduino Forum, maybe you can find something usefull there: http://forum.arduino.cc/index.php?topic=98177.0

I also have a little website for it, where you can find the parts, the schematics and even the code for it (all of which you are free to use!):
http://popo.webatu.com/
(Would love to know what you think about it...  smiley-wink   )

Have you written already any code?
Could you post it so we can help you from there?

Good luck with your project!
Logged

Pages: [1]   Go Up
Jump to: