Ok, so I tried what you suggested on the programming side of things, and I seem to be running into a problem. To start, here's my code (it's a shortened version with 2 banks and 1 button, but same principles apply)
#include <Bounce.h>
Bounce button1 = Bounce (0,10);
Bounce bank1 = Bounce (1,10);
Bounce bank2 = Bounce (2,10);
void setup() {
pinMode(0, INPUT_PULLUP);
pinMode(1, INPUT_PULLUP);
pinMode(2, INPUT_PULLUP);
}
void loop() {
const int channel = 1;
int bank = 1;
bank1.update();
bank2.update();
button1.update();
if (bank1.fallingEdge()) {
bank = 2;
}
if (bank2.fallingEdge()) {
bank = 3;
}
if (button1.fallingEdge()) {
usbMIDI.sendNoteOn(24 + bank * 22, 127, channel);
}
if (button1.risingEdge()) {
usbMIDI.sendNoteOff(24 + bank * 22, 127, channel);
}
}
So my problem is that no matter what bank button I press, the same MIDI note always comes out. It seems to be that when I press the button, the int "bank" doesn't seem to be changing, or I've programmed it wrong. Have I done something wrong, or do I need to approach it from a different programmming technique?