Hi guys,
my name is David and i am from Germany.
I build a Midi Controller with 9 potentiometers and 3 slide potentiometers. I used the hairless midiserial software to check if my device send some midi data.
All is well to this point but when i start a music programm like FL Studio or Ableton Live my DIY Controller is not recognized and i cant use my controller...
I use an ATmega2560
This is my Code:
int controlChange = 176; // MIDI kanal 1
int potiPin[] = {A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11};
int controllerNummer[] = {20,21,22,23,24,25,26,27,28,29,30,31};
int controllerWert[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int controllerWertAlt[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int potiWert[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int i = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
for (i = 0; i < 5; i++) {
potiWert = analogRead(potiPin);
controllerWert = map(potiWert,0,1023,0,127);
if (controllerWert != controllerWertAlt) {
Serial.write(controlChange);
Serial.write(controllerNummer);
Serial.write(controllerWert);
}
controllerWertAlt = controllerWert;
}
}
Do you have any ideas why my computer does not recohnize my conrtoller ?