 const byte STOP = 252;
 const int ledPin = 13;
 
+const byte bpmLed = 22;
+
 const byte channelButtonStart = 0;
 const byte numberOfChannelButtons = 2;
 const byte ledPins[] = {/*10, 11, 12,*/ 14, 15, 16};
-Bounce channelButtons[numberOfChannelButtons];
+Button channelButtons[numberOfChannelButtons];
 boolean channelButtonStates[numberOfChannelButtons];
 boolean channelButtonDown[numberOfChannelButtons];
 
 const byte bankDownPin = 6;
 const byte bankUpPin = 7;
-Bounce bankDownButton = Bounce();
-Bounce bankUpButton = Bounce();
+Button bankDownButton = Button();
+Button bankUpButton = Button();
 boolean bankDownState;
 boolean bankDownDown;
 boolean bankUpState;


  updateButtons();

  updateState();

  updateLeds();


}

void updateState() {
  boolean update = false;
  if (bankDownState != bankDownLastState) {
    bankDownLastState = bankDownState;
    bank--;
    update = true;
  } else if (bankUpState != bankUpLastState) {
    bankUpLastState = bankUpState;
    bank++;
    update = true;
  }


void setupButtons() {
  for (byte i = 0; i < numberOfChannelButtons; i++) {
    //initButton(channelButtonStart + i, &channelButtons[i], &channelButtonStates[i], &channelButtonDown[i]);
    channelButtons[i].init(channelButtonStart + i);
  }
  bankDownButton.init(bankDownPin);
  bankUpButton.init(bankUpPin);
  stopButton.init(stopPin);
  playButton.init(playPin);
}

void initButton(byte pin, Bounce *button, boolean *state, boolean *down) {
