   Serial.print((*button).isPressed());
   Serial.print(" Just released : ");
   Serial.println((*button).isJustReleased());
-  #endif
+#endif
 }
 
 void updateButtons() {
-  for (byte i = 0; i < numberOfChannelButtons; i++) {
-    if (channelButtons[i].update()) {
-      debugButton(&channelButtons[i]);
-    }
-  }
-  if (bankDownButton.update()) {
-    debugButton(&bankDownButton);
-  }
-  if (bankUpButton.update()) {
-    debugButton(&bankUpButton);
-  }
-  if (stopButton.update()) {
-    debugButton(&stopButton);
-  }
-  if (playButton.update()) {
-    debugButton(&playButton);
+  for (byte i = 0; i < numberOfAllButtons; i++) {
+    if ((*allButtons[i]).update()) {
+      debugButton(allButtons[i]);
+    }
   }
 }
 

}

void updateLeds() {
  if(initMode) {
    return;
  }
  for (byte i = 0; i < numberOfChannelButtons; i++) {
    if (channelButtons[i].isJustReleased()) {
      digitalWrite(ledPins[i], HIGH);
    } else {
      digitalWrite(ledPins[i], LOW);
    }
  }
}


const byte midiChannel = 1;

void OnNoteOn(byte channel, byte note, byte velocity) {
  digitalWrite(ledPin, HIGH);
}

void OnNoteOff(byte channel, byte note, byte velocity) {
  digitalWrite(ledPin, LOW);
}

