Instructables

Drumming MIDI Glove using Arduino and light sensors

Featured
DSC08451.JPG
DSC08474.JPG
DSC08453.JPG
DSC08462.JPG
DSC08463.JPG
DSC08466.JPG
DSC08473.JPG
DSC08476.JPG
DSC08479.JPG
I will describe a fun and easy way to build your own sound expression MIDI enabled glove without expending lot's of money on MIDI Interfaces or expensive sensors.

Feel free to contact me directly by mail if you like it or have suggestions. 

This project was inspired by other do it yourself projects using Piezo (buzzer) as input sensors but they are too big and need filtering for precise velocity reading.

So this is an out of the box and unconventional knock input sensing method I've been using and now it's yours too.

If you do like electronics, gadgets and music take a time and build yourself one of these. Using it and tuning the software synth brings you lot of fun and pleasure.

Let me start showing the result of this project. It's me testing the glove for the first time using FL Studio and synth software.



The code version 1.0 of the prototype that I'm disclosing does not implement HIT velocity for increased/decreased sound intensity but it's a fairly simple and a neat coding challenge for your after building it.

 The 2.0 prototype that isn't ready yet is discrete, dual-handed, Wireless Enabled, Supports beat Velocity and allow the player to up/down shift Octaves and Tom in real time. Also it's the does not rely on MIDI Virtual Port. 

The Gloves (pair) v2.0 will be public like this as soon as it's ready so no need to ask for details by contacting.

Let me start with the requirements list:

Main requirement:
1x Music Lover Arduino DIY'er looking for a thrilling and fun sound project.

Parts List:
1x Arduino board with at least 4 analog inputs.
4x Small LDR Light Resistor (it costs $ cents and are very precise)
4x 1K Resistor (or any other by changing thresholds and triggers on the CODE)
5x meters of thin and flexible solid core wire. (thin wire from old phone cord cords may do well)
1x Glove. I've chose cotton working gloves with rubber dots; ( $1/pair )
1x Protoboard and a bunch Jumper cables;
1x USB or Serial cable to connect Arduino -> PC.

Tools and Misc materials
Solder Iron and solder Wire
A 10" x 10" piece of EVA Foam for LDR Sensor Casing or similar hard foam is highly suggested.
A small Scissor or Utility Knife for cutting the EVA into Ring Shape. Check photos.
Strong Contact Adhesive Glue (like used to rebuild worn shoes!)
15 minutes Hobby Epoxy Glue (2 compound), used on the Foam Casing to fix the LDR Sensors firmly.



Software List

-- SpiekenzieLabs Serial Midi Converter: download and instructions page here

-- LoopBe1 -- Free Virtual Midi PORT - http://nerds.de/en/loopbe1.html

-- FL Studio or Ableton or any other sound synth software with MIDI automation capabilities: FL Studio Demo
There are plenty of Drummer specific softwares you might find on google. Also GarageBand on MAC should work! 
I really prefer dynamic synth sound provided by FL Studio plugins like Toxic Biohazard

That's it.


Building tips and Wiring Schematics

Some Background: Since LDR Sensors are merely resistors that change the resistance by the relative amount of light that they receive you may consider that are no Poles like cathode and anode. There are no positive and negative lead like Leds which are Diodes.

Example of how to wire one LDR sensor using the arduino. Make sure you make this simple test before building your Glove. Use the following code to test the schematic:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225675113 but don't forget to change the ANALOG IN PORT for the one you are really using. The example used port 0 and photo schematic port 3.

Important: Keep in mind that each sensor will SHARE the 5V line .

So after the glove is ready you will have 5 wires between the Arduino and the glove.

5 volts Voltage line from arduino will connect into 4 LDR lead, one each.
The other 4 remaining wires will be connected to remaining LDR sensors leads.

WIRES and PORTS:

Wire #1 - GREEN on the photos: connects 5v port and 4 LDR leads in a common and shared line.
Wire #2 - White: Connects LDR from Finger 1 to Analog IN Port 0
Wire #3 - White: Connects LDR from Finger 2 to Analog IN Port 1
Wire #4 - White: Connects LDR from Finger 3 to Analog IN Port 2
Wire #5 - White: Connects LDR from Finger 4 to Analog IN Port 3


If you follow the above ports no changes will be necessary on the code I'm providing.

Regarding the software. First install the LoopBe1 Virtual Midi Port Drivers then will be possible to interface between Serial port and Sound Generator application.

The Arduino code is set for Serial port speed 57600 so make sure you choose this Speed when running the Serial Midi Converter Software.

Inside the synth software look for and choose as default input port the LoopBe Midi IN port and make sure LoopBe and Serial to Midi apps are running and transmitting before try to use a Midi Enabled application.

I really don't have time now to draw a full schematic of the protoboard but it's exactly as shown on LDR Test Scheme with 4 resistors instead of one. And the LDR will be far and connected to the Glove.

Hope you enjoy executing and playing with it after ready.

The code should be downloaded here:
Official download location:
http://snipt.org/wngki

Note: feel free to enable the Debug flag and check the serial comm if does not work as expected.


Best wishes


danmellow3 months ago

this is pretty cool

this is so rad!
rupsta1 year ago
i am a musician who taps beats with my right hand on a guitar's body to create beats along with chords. i have always wanted to go to the next level and use real drum sounds. (its best seen with the eyes, so i have attached a link to my music at the end)

my idea is to stick 3 midi pads to the guitars body to trigger: kick, snare, hihat.
what kind of equipment should i use for that, or does there exist something on the market already? a glove would not be appropriate as i need my hand free to pluck the strings too.

any feedback would be really appreciated. thanks, Rupert

youtube.com/rupertshean
MidiGlove8 (author)  rupsta1 year ago
Hi There!
Do you know a PIEZO BUZZER?

It's a flat electronic that emits high frequency "Beeps".
http://www.ictradenet.com/models_pic/CEB-20D64.jpg

Inside it there is a small crystal that Resonates when voltage is applied.

The good news is that this same component works on the other way. If you hit it like a drum pad it will generate current and you are able to sense it via Analog Port read using arduino.

So the same app with little changes in the code you are able to generate midi signals using the Piezo covered with a foam layer.

There some projects out that from people that made full drum kits using cheap electronics.

Project sample: http://www.eeweb.com/blog/circuit_projects/electronic-drum-kit-based-on-arduino

Put your hands on and start your project. In no time you will realize that you learned a lot and will experience the joy and power of creating your own stuff. This kind of feeling surely reflects in life.

Appreciate your time.
MidiGlove8 (author) 1 year ago
Hi There!
Do you know a PIEZO BUZZER?

It's a flat electronic that emits high frequency "Beeps".
http://www.ictradenet.com/models_pic/CEB-20D64.jpg

Inside it there is a small crystal that Resonates when voltage is applied.

The good news is that this same component works on the other way. If you hit it like a drum pad it will generate current and you are able to sense it via Analog Port read using arduino.

So the same app with little changes in the code you are able to generate midi signals using the Piezo covered with a foam layer.

There some projects out that from people that made full drum kits using cheap electronics.

Project sample: http://www.eeweb.com/blog/circuit_projects/electronic-drum-kit-based-on-arduino

Put your hands on and start your project. In no time you will realize that you learned a lot and will experience the joy and power of creating your own stuff. This kind of feeling surely reflects in life.

Appreciare your time.
dBange1 year ago
The code is right? In the end the Arduino tell me that "Serial.write(BYTE, MESSAGE);" byte is wrong, somebody help me please :P
dakshv221 year ago
Where does the pin number 13 of the arduino connect to?The code uses pin number 13 for something...please reply asap
Dyte2 years ago
Genious.
And if you make a glove for each hand, there are so many combinations possible; thumb to each finger of the same hand, but also combining fingers of both hands.
A whole drumset right at the tip of your fingers. Quite impressive.
nagarwal13 years ago
Him could you please post a link to the ldr's you are using. I was going to purchase the one on sparkfun.com when I realized it wouldn't work for anything transient since its response time is too slow.

Thanks
Nikhil
MidiGlove8 (author)  nagarwal13 years ago
The part used is sold as small 2mm round LDR. I've tried to find it @sparkfun without sucess. Check your local electronics shop! Appreciate your contact!
pcunha13 years ago
is possible do it with bluetooth?
I've seen another project on here with a midi tap interface using arduino and between yours and that, I think you guys have finally got me to were im going to have to buy one and make something whether it be drum tappers gloves or a plain drum machine/DJ type tap box or maybe even a trap kit, any recommendations on which type of sensor would work best to allow triggering and velocity parameters?
Why tap your fingers with your thumb to make sound?

It would be simpler to tap your fingers on some kind of flat surface to make sound.
Make another glove for the other hand and program different sounds to different fingers and you got yourself a drum set. And you can play it like a piano...sort of..
MidiGlove8 (author) 3 years ago
Original message from Howry Zhiv:

hey there,
i was wondering. is it possible to have more then 4 pads?
what about 8 or more?
thats looks amazing btw. instead of buying for over 70$ on korg pad drum ya can do it yourself.
thank you

Answer:
Sure you can.

You should use an Arduino Mega which delivers you 16 Analog IN ports.

http://arduino.cc/en/Main/ArduinoBoardMega

Probably there are more boards with 8 to 10 Analog Inputs that can be used. Just try checking the available models and specification.

The code for more Notes and Pads will be the same, just expand the Variables array sizes and change the main loop (for) to read from port 0 to 7 instead of 0 to 3.

Bruno Ratnieks
heres an idea I got from looking at your design here and remembering a good ol diy 300- in 1 kit project... where the density of lead/ graphite (in this case it was electrical conductivity) determined a pitch. is there a way with a little tweeking that you could make your glove respond to how dark or light an image is and produce different tones based on that...
If so you would end up with a "virtual" keyboard that you could make out of just about anything.
Heruka bschran3 years ago
I think your idea is very good, and it should be possible to do it if you supply an LED light source on each finger. The LDR and LED should be shielded from direct light contact, but if you bring the finger close to a surface, the amount of LED light reflected back will vary depending on the blackness of the region - and if it falls on the LDR, it should be able to pick up the differences as you move your hand over black and white areas.

This technique is actually used in making line-following robots.
marcintosh3 years ago
Enjoyed the video and the drawing. This looks to be a great project.
Can't wait to get started. Haven't done anything like this in a long time.
Thanks for your effort and for sharing.
M.
webbymaster3 years ago
Nice piece of art.. Wanna see the wireless version of it!!!
Do you plan to make a product and sell it?

Make a portable and wireless charming glove and you have a product!

Congratulation for the project and execution buddy.
ElvenChild3 years ago
Sweet