Pages: [1]   Go Down
Author Topic: MIDI Glove :D  (Read 1449 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Video


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 smiley-grin  piezo transducers for the glove are setup the same way except there are 5 used on the glove

Here is my Arduino Sketch
Code:
#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);
 beginSerial(115200);
}

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);
    delay(100);
  }
  
  if (val2 >= THRESHOLD) {
    statePin = !statePin;
    digitalWrite(ledPin, statePin);
    midi_note_on(0, 38, val2);
  midi_note_off(0, 38, val2);
  delay(100);
  }
  
  if (val3 >= THRESHOLD) {
    statePin = !statePin;
    digitalWrite(ledPin, statePin);
    midi_note_on(0, 40, val3);
  midi_note_off(0, 40, val3);
  delay(100);
}
  
  
  if (val4 >= THRESHOLD) {
    statePin = !statePin;
    digitalWrite(ledPin, statePin);
    midi_note_on(0, 43, val4);
  midi_note_off(0, 43, val4);
  delay(100);
}
  
  if (val5 >= THRESHOLD) {
    statePin = !statePin;
    digitalWrite(ledPin, statePin);
    midi_note_on(0, 45, val5);
  midi_note_off(0, 45, val5);
  delay(100);
}
  
}

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..
« Last Edit: January 09, 2009, 04:28:52 am by brianlight » Logged

I PITY DA FOOL WHO DON'T HACK ARDUINO!!!!
[IMG]http://www.threadbombin

Pages: [1]   Go Up
Jump to: