Control Surface
main
MIDI Control Surface library for Arduino
Toggle main menu visibility
Loading...
Searching...
No Matches
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::NoteLED<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();
}
Channel_1
constexpr Channel Channel_1
Definition
Channel.hpp:118
Control_Surface.h
The main header file that includes all Control-Surface header files.
Control_Surface
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
Definition
Control_Surface_Class.cpp:338
AddressMatrix
Array2D< uint8_t, NumRows, NumCols > AddressMatrix
Definition
Def.hpp:30
Wrap::Wrap
@ Wrap
When the maximum (minimum) setting is reached, wrap around to the minimum (maximum) setting.
Definition
Selector.hpp:17
Bank
A class that groups Bankable MIDI Output Elements and Bankable MIDI Input Elements,...
Definition
Bank.hpp:94
Bankable::NoteButtonMatrix
A class of MIDIOutputElements that read the input from a matrix of momentary push buttons or switches...
Definition
Bankable/NoteButtonMatrix.hpp:31
IncrementDecrementSelector
Selector with two buttons (one to increment, one to decrement).
Definition
IncrementDecrementSelector.hpp:69
USBMIDI_Interface
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
Definition
USBMIDI_Interface.hpp:165
Bankable::NoteLED
NoteCCKPLED< MIDIMessageType::NoteOn, BankSize > NoteLED
Class that listens for MIDI Note events on a single address and turns on an LED when the value is hig...
Definition
NoteCCKPLED.hpp:155
Generated by
1.17.0