Midi Glove
-
Upload
mariane-carvalho -
Category
Documents
-
view
217 -
download
0
Transcript of Midi Glove
-
7/30/2019 Midi Glove
1/11
FUNDAO OSWALDO ARANHA
CENTRO UNIVERSITRIO DE VOLTA REDONDACURSO DE GRADUAO EM SISTEMAS DE INFORMAO
ALAN COUTO LOPES
MARIANE GOMES DE CARVALHO
VINCIUS JOS DE SOUZA LOPES SACRAMENTO
MIDI Glove
-
7/30/2019 Midi Glove
2/11
1. O PROJETO
Foi construda u
Estes sensores captam
os estmulos so conver
Arduino que os molda e
software conversor de
software com os sons d
O prottipo inici
Ratnieks e publicado no
A estrutura na p
nas portas analgicas:
a luva com sensores LDR colados em
estmulos a partir da luminosidade bloq
tidos em notas pelo programa desenvol
tons e oitavas musicais, os estmulos
M
IDI e depois tem as portas MIDI ide
s instrumentos musicais.
l foi desenvolvido pelo Analista de S
Instructables.Com.
otoboard foi a seguinte para cada sen
quatro dedos.
ueada ou no,
ido na IDE do
assam por um
ntificadas pelo
istemas Bruno
or LDR ligado
-
7/30/2019 Midi Glove
3/11
DE PARA
voidMIDI_TX(byte MESSAGE, unsigned
char PITCH, unsigned char VELOCITY)
{
//status = MESSAGE + midichannel;
//status = MESSAGE + pin;
digitalWrite(13,HIGH);
Serial.print(MESSAGE, BYTE);
Serial.print(PITCH);
Serial.print(VELOCITY);
delay(30);
digitalWrite(13,LOW);
}
voidMIDI_TX(byte MESSAGE, unsigned
char PITCH, unsigned char VELOCITY)
{
//status = MESSAGE + midichannel;
//status = MESSAGE + pin;
digitalWrite(13,HIGH);
Serial.write(BYTE(MESSAGE));Serial.print(PITCH);
Serial.print(VELOCITY);
delay(30);
digitalWrite(13,LOW);
}
Para permitir a troca de notas em cada dedo:
DE PARA
unsigned char PadNote[4]={45,55,60,67}; Valores variantes de 0 at 127.
2. LISTA DE MATERIAIS
1 Arduino board UNO com 4 ou mais portas analgicas;
4 Sensores LDR de 5mm;
4 Resistores de 1K;
5 Metros de fio com ncleo slido e de cobre;
1 Luva;
1 Protoboard;
Cabos Jumper;
1 Cabo USB;
1 Folha de EVA;
-
7/30/2019 Midi Glove
4/11
4. DIVULGAO DO PROTTIPO
O vdeo com a divulgao do prottipo desenvolvido pode ser acessado
em: http://www.youtube.com/watch?v=KQYWfJ-4GSE&feature=youtu.be.
-
7/30/2019 Midi Glove
5/11
REFERNCIAS BIBLIOGRFICAS
Ratinieks, B. SNF Glove Version 1.0. Disponvel em:
http://snipt.org/wngki#expand. Acessado em: Novembro, 2012.
Ratinieks, B. SNF Drumming MIDI Glove using Arduino and light sensors.
Disponvel em: http://www.instructables.com/id/SNF-Drumming-MIDI-Glove-using-Arduino-and-light-se/. Acessado em: Novembro, 2012.
SpiekenzieLabs Serial Midi Converter. Disponvel em:
http://www.spikenzielabs.com/SpikenzieLabs/Serial_MIDI.html. Acessado
em: Novembro, 2012.
-
7/30/2019 Midi Glove
6/11
ANEXO I
Cronograma
-
7/30/2019 Midi Glove
7/11
ANEXO II
Software Original
// DESCRIPTION:// SNF Drumming Glove Code by Bruno Lacerda Ratnieks - [email protected]// Sniffer Networks Ltda.
// Arduino analog inputs are used to sense LDR hits then send to serial port////// Required - Software:// 1. Serial MIDI converter// 2. FL Studio, Garage Band, Ableton Live etc .//// Code by Bruno Ratnieks// [email protected]// February 2011 for SNF MIDI GLOVE PROJECT v1.0
unsigned char PadNote[4] = {45,55,60,67}; // MIDI notes from 0 to 127 (Mid C = 60)// Imagine a piano roll. 45 55 are keys located on the middle for example.// Tweak it to what sounds better to you.
int CutOff = 40; // This is the minimal amount of analog reading before triggering the note!
int MaxPlayTime[6] = {6500,6500,6500,6500}; // Cycles before a 2nd hit is allowed// Best value after lots of trial and error.
#define midichannel 0; // MIDI channel from 0 to 15 (+1 in "real world")
-
7/30/2019 Midi Glove
8/11
//*******************************************************************************************************************// Internal Use Variables//// You should tweak here if it's not optimal yet.// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^// Those values work perfectly when using the small LDR and 1K Resistor. So used it!////*******************************************************************************************************************
boolean activePad[6] = {0,0,0,0}; // Array of flags of pad currently playingint PinPlayTime[6] = {0,0,0,0}; // Counter since pad started to play
int ActivePadMinTime = 100;int PinPauseTimeDelay = 200;int PinPauseTime[4] = {0,0,0,0};
int PinAvailable[4] = {1,1,1,1};
unsigned char status;
int pin = 0;int hitavg = 0;int maxread = 0;int debug = false;
int noteOffset = 0;
//*******************************************************************************************************************// Setup//*******************************************************************************************************************
-
7/30/2019 Midi Glove
9/11
void setup()
{Serial.begin(57600); // connect to the serial port 57600
}
//*******************************************************************************************************************// Main Program//*******************************************************************************************************************
void loop(){
for(int pin=0; pin
-
7/30/2019 Midi Glove
10/11
if(debug) Serial.println("NoteON");}
}}
if(activePad[pin] == true) {if(debug)Serial.println("activePad[pin] == true");PinPlayTime[pin] += 1;
if(analogRead(pin) > CutOff && PinPlayTime[pin] > ActivePadMinTime){
if(debug) Serial.println("analogRead(pin) > PadCut == TRUE");activePad[pin] = false;PinAvailable[pin] = 2;if(debug)
Serial.println("NoteOFF, available is now false. active is false;");
MIDI_TX((0x80 | pin), PadNote[pin]+noteOffset, 50);PinPlayTime[pin] = 0;
}}
if(PinAvailable[pin] == 2 && PinPauseTime[pin] > PinPauseTimeDelay) {if(debug)Serial.println("PinAvailable[pin] == false && PinPauseTime[pin] > 10");PinAvailable[pin] = true;} else if(PinAvailable[pin] == 2) {if(debug)Serial.println("PinPauseTime[pin] += 1;");
-
7/30/2019 Midi Glove
11/11
PinPauseTime[pin] += 1;
}
if(debug)delay(1000);}
}
//*******************************************************************************************************************// Transmit MIDI Message//*******************************************************************************************************************void MIDI_TX(byte MESSAGE, unsigned char PITCH, unsigned char VELOCITY){
//status = MESSAGE + midichannel;//status = MESSAGE + pin;digitalWrite(13,HIGH);
Serial.print(MESSAGE, BYTE);Serial.print(PITCH);Serial.print(VELOCITY);delay(30);digitalWrite(13,LOW);
}