 
 byte bank = 0;
 
-const byte bpmLed = 22;
-
+boolean initMode = false;
 
 void OnNoteOn(byte channel, byte note, byte velocity)
 {

  delay(200);
}

void updateButtons() {
  for (byte i = 0; i < numberOfChannelButtons; i++) {
    updateButtonState(channelButtonStart + i, &channelButtons[i], &channelButtonStates[i], &channelButtonDown[i]);
  }
  updateButtonState(bankDownPin, &bankDownButton, &bankDownState, &bankDownDown);
  updateButtonState(bankUpPin, &bankUpButton, &bankUpState, &bankUpDown);
  updateButtonState(stopPin, &stopButton, &stopState, &stopDown);
  updateButtonState(playPin, &playButton, &playState, &playDown);
}

void updateButtonState(byte pin, Bounce *button, boolean *state, boolean *down) {
  if ((*button).update()) {
    if ((*button).read() == LOW) {
      *down = true;
      Serial.print("Button ");
      Serial.print(pin);
      Serial.println(" down");
    } else if (*down) {
      Serial.print("Button ");
      Serial.print(pin);
      Serial.println(" up");
      *state = 1 - *state;
      *down = false;
    }
  }
}


#include "Button.h"
#include "base64/Base64.h"

#include <Adafruit_GFX.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_SSD1306.h>



byte counter;
const byte CLOCK = 248;
