Hi guys,
Using push buttons and potentiometer, I am trying to send variables from Arduino to Midi to Ableton, so i can assign those variables to the function on Ableton (such as the play function, or volume for potentiometer)
I have attached the code, but that assign a note to the potentiometer, as i turn the potentiometer, it plays that note on the Ableton. How do i send empty variables so i can assign it myself to the desire function on Ableton? I am still new to the MIDI functions.
byte noteON = 144;//note on command
int potPin = A0;
byte push=13;
void setup() {
Serial.begin(9600);
}
void loop() {
int potVal = analogRead(potPin);//read data from potentiometer
// (this is the range of MIDI notes)
byte velocity = map(potVal, 0, 1023, 0, 127);
byte note = 100;
MIDImessage(noteON, note, velocity);//turn note on
delay(300);//hold note for 300ms
MIDImessage(noteON, note, 0);//turn note off (note on with velocity 0)
delay(200);//wait 200ms until triggering next note
}
//send MIDI message
void MIDImessage(byte command, byte data1, byte data2) {
Serial.write(command);
Serial.write(data1);
Serial.write(data2);
Thank you in Advance for Help