Go Down

Topic: MIDI Glove :D (Read 2129 times) previous topic - next topic


Jan 09, 2009, 10:09 am Last Edit: Jan 09, 2009, 10:28 am by brianlight Reason: 1

Hello This is a MIDI controller I made using 5 piezo transducers attached to a glove the piezo buzzers are wired to be used as knock sensors to trigger midi notes via the arduino using the ttymidi library for Linux http://www.varal.org/ttymidi/  ttymidi allows transfer of MIDI controller data over serial or USB to a PC running Linux.  This project could be adapted to use standard Midi with other hardware.. or Computer OS other than Linux Details on how to do that can be found on http://todbot.com/blog/2006/10/29/spooky-arduino-projects-4-and-musical-arduino/
this project post inspired me to make this Midi glove in the first place :D  piezo transducers for the glove are setup the same way except there are 5 used on the glove

Here is my Arduino Sketch
Code: [Select]
#include <ardumidi.h>

int ledPin = 13;
int knockSensor = 0;
int knockSensor2 = 1;
int knockSensor3 = 2;
int knockSensor4 = 3;
int knockSensor5 = 4;

byte val = 0;
byte val2 = 0;
byte val3 = 0;
byte val4 = 0;
byte val5 = 0;

int statePin = LOW;
int THRESHOLD = 20;
void setup() {
pinMode(ledPin, OUTPUT);

void loop() {

 val = analogRead(knockSensor);    
 val2 = analogRead(knockSensor2);
 val3 = analogRead(knockSensor3);
 val4 = analogRead(knockSensor4);
 val5 = analogRead(knockSensor5);
 if (val >= THRESHOLD) {
   statePin = !statePin;
   digitalWrite(ledPin, statePin);
   midi_note_on(0, 36, val);
   midi_note_off(0, 36, val);
 if (val2 >= THRESHOLD) {
   statePin = !statePin;
   digitalWrite(ledPin, statePin);
   midi_note_on(0, 38, val2);
 midi_note_off(0, 38, val2);
 if (val3 >= THRESHOLD) {
   statePin = !statePin;
   digitalWrite(ledPin, statePin);
   midi_note_on(0, 40, val3);
 midi_note_off(0, 40, val3);
 if (val4 >= THRESHOLD) {
   statePin = !statePin;
   digitalWrite(ledPin, statePin);
   midi_note_on(0, 43, val4);
 midi_note_off(0, 43, val4);
 if (val5 >= THRESHOLD) {
   statePin = !statePin;
   digitalWrite(ledPin, statePin);
   midi_note_on(0, 45, val5);
 midi_note_off(0, 45, val5);

could also be used as a 5 drum electronic drum kit if you would like to attach the peizo transducers to drum practice pads make sure that you attach them under the pads not directly on top these are delicate...  One other thing that I've noticed as that the piezo transducers are sensitive enough that you can blow air across them to trigger a threshold so virtual wind Instruments could also be made using these..

Go Up