Hey,
i am trying to build a midi controller with my arduino to control software. i use
http://spikenzielabs.com/SpikenzieLabs/Serial_MIDI.html to convert the serial messages to midi.
The problem is i don't know what the format is of the midi messages so that the converter can read it.
This is my code. when i press button 51 it should light up the led and send a midi message.
// set pin numbers:
int buttonPin = 51; // the number of the pushbutton pin
int ledPin = 53; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
Serial.begin(115200);
}
void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(ledPin, HIGH);
Serial.print("????????"); <----------------------------- what do i need to insert here?
//MIDImessage()
// prints hello with ending line break
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
sorry if it is a stupid question. i'm just totally unfamilliar with midi and i just want my arduino to send a single message to the converter so i can let my software react to the push of a button.
Thanks