Control Surface
1.1.1
MIDI Control Surface library for Arduino
Bank-Button-Matrix.ino
Bank-Button-Matrix
https://github.com/tttapa/Control-Surface/issues/38
#include <
Control_Surface.h
>
USBMIDI_Interface
midi;
Bank<4>
bank = {6};
// 4 banks, 6 addresse per banks
IncrementDecrementSelector<4>
selector = {bank, {A0, A1},
Wrap::Wrap
};
AddressMatrix<2, 3>
notes = {{
{0, 1, 2},
{3, 4, 5},
}};
Bankable::NoteButtonMatrix<2, 3>
buttons = {
bank,
//
{2, 3},
// row pins (outputs, driven low-Z low !)
{4, 5, 6},
// column pins (inputs, hi-Z)
notes,
//
CHANNEL_1
,
//
};
Bankable::NoteValueLED<4>
leds[] = {
{bank, 7, {notes[0][0],
CHANNEL_1
}},
//
{bank, 8, {notes[0][1],
CHANNEL_1
}},
//
{bank, 9, {notes[0][2],
CHANNEL_1
}},
//
{bank, 10, {notes[1][0],
CHANNEL_1
}},
//
{bank, 11, {notes[1][1],
CHANNEL_1
}},
//
{bank, 12, {notes[1][2],
CHANNEL_1
}},
//
};
void
setup() {
Control_Surface
.
begin
();
}
void
loop() {
Control_Surface
.
loop
();
}
USBMIDI_Interface
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
Definition:
USBMIDI_Interface.hpp:35
Bank
A class that groups Bankable BankableMIDIOutputs and BankableMIDIInputs, and allows the user to chang...
Definition:
Bank.hpp:77
Bankable::NoteValueLED
Definition:
NoteCCRangeLEDs.hpp:214
IncrementDecrementSelector
Selector with two buttons (one to increment, one to decrement).
Definition:
IncrementDecrementSelector.hpp:66
Control_Surface.h
The main header file that includes all Control-Surface header files.
Control_Surface_::loop
void loop()
Update all MIDI elements, send MIDI events and read MIDI input.
Definition:
Control_Surface_Class.cpp:48
Control_Surface
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
Definition:
Control_Surface_Class.cpp:176
AddressMatrix
Array2D< uint8_t, nb_rows, nb_cols > AddressMatrix
Definition:
Def.hpp:26
Bankable::NoteButtonMatrix
A class of MIDIOutputElements that read the input from a matrix of momentary push buttons or switches...
Definition:
Bankable/NoteButtonMatrix.hpp:29
Wrap::Wrap
When the maximum (minimum) setting is reached, wrap around to the minimum (maximum) setting.
CHANNEL_1
constexpr Channel CHANNEL_1
Definition:
Channel.hpp:111
Control_Surface_::begin
void begin()
Initialize the Control_Surface.
Definition:
Control_Surface_Class.cpp:25
Generated by
1.8.16