| 
   
    MIDI Control Surface library for Arduino 
   | 
 
 
 
 
MIDI_controller-97
https://github.com/tttapa/MIDI_controller/issues/97#issuecomment-564247602
Many bankable potentiometers and buttons. Bank selector displays bank setting using LEDs. 
 If any of the buttons is pressed, the LED on pin 22 is turned on.
- Boards:
 - Mega
 
 
 
#include <AH/STL/algorithm> 
 
 
 
  bank,
  {21, 20},         
  {46, 48, 50, 52}, 
};
 
};
 
  {bank, 13, 0x14},
  {bank, 12, 0x15},
  {bank, 11, 0x16},
  {bank, 10, 0x17},
  {bank, 9, 0x18},
  {bank, 8, 0x19},
  {bank, 7, 0x1A},
  {bank, 6, 0x1B},
  {bank, 5, 0x1C},
  {bank, 4, 0x1D},
  {bank, 3, 0x1E},
  {bank, 2, 0x1F},
  {bank, 14, 0x20},
  {bank, 15, 0x21},
  {bank, 16, 0x22},
  {bank, 17, 0x23},
};
 
constexpr 
pin_t ledPin = 22;
 
 
 
void setup() {
}
 
 
void loop() {
 
  
    return button.getButtonState() == Button::Pressed;
  };
  
  bool pressed = std::any_of(std::begin(muteButtons), std::end(muteButtons),
                             checkButtonPressed);
  
}
   
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
 
A class that groups Bankable BankableMIDIOutputs and BankableMIDIInputs, and allows the user to chang...
 
constexpr uint8_t Effects_3
 
constexpr uint8_t Sound_Controller_3
 
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
 
constexpr Channel CHANNEL_3
 
constexpr Channel CHANNEL_6
 
constexpr Channel CHANNEL_11
 
constexpr uint8_t Sound_Controller_5
 
constexpr uint8_t Effect_Control_2
 
Selector with two buttons (one to increment, one to decrement). This version displays the setting usi...
 
void digitalWrite(pin_t pin, PinStatus_t val)
An ExtIO version of the Arduino function.
 
constexpr uint8_t Sound_Controller_4
 
constexpr uint8_t Effects_4
 
constexpr Channel CHANNEL_8
 
constexpr Channel CHANNEL_12
 
The main header file that includes all Control-Surface header files.
 
A class of MIDIOutputElements that read the analog input from a potentiometer or fader,...
 
void loop()
Update all MIDI elements, send MIDI events and read MIDI input.
 
constexpr Channel CHANNEL_7
 
constexpr uint8_t Channel_Volume
 
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
 
constexpr Channel CHANNEL_5
 
@ CHANGE_CHANNEL
Change the offset of the channel number of the element.
 
constexpr Channel CHANNEL_4
 
constexpr uint8_t Effects_2
 
constexpr Channel CHANNEL_10
 
constexpr Channel CHANNEL_9
 
constexpr uint8_t Sound_Controller_6
 
Names and values for all MIDI Control Change Controller Numbers.
 
constexpr Channel CHANNEL_2
 
void pinMode(pin_t pin, PinMode_t mode)
An ExtIO version of the Arduino function.
 
constexpr uint8_t Effect_Control_1
 
constexpr Channel CHANNEL_1
 
void begin()
Initialize the Control_Surface.
 
constexpr uint8_t Effects_1