tttapa / Control-Surface

Arduino library for creating MIDI controllers and other MIDI devices.
GNU General Public License v3.0
1.27k stars 140 forks source link

How to use 1 shift button to change bank: #1034

Open DRCRecoveryData opened 7 months ago

DRCRecoveryData commented 7 months ago

Hi, My code is:

#include <Control_Surface.h>

USBMIDI_Interface midi;

// The note numbers corresponding to the buttons in the matrix
const AddressMatrix<4, 4> addresses {{
  {36, 37, 38, 39},
  {40, 41, 42, 43},
  {44, 45, 46, 47},
  {48, 49, 50, 51},
}};

NoteButtonMatrix<4, 4> buttonmatrix {
  {2, 3, 4, 5}, // row pins
  {6, 7, 8, 9}, // column pins
  addresses,    // address matrix
  Channel_1,    // channel and cable number
};

void setup() {
  Control_Surface.begin();
}

void loop() {
  Control_Surface.loop();
}

How can I add a button to function as a 'shift bank' button? When this shift button is pressed, each of the 16 buttons will change to map to a 15 bank note instead?