Base class for all other classes that listen for incoming MIDI Note or Control Change messages and saves their values. More...
#include <MIDI_Inputs/NoteCCRange.hpp>
Public Member Functions | |
NoteCCRange (MIDICNChannelAddress address, const Callback &callback) | |
uint8_t | getValue (uint8_t index) const final override |
void | begin () override |
Initialize. More... | |
void | reset () override |
Reset all values to zero. More... | |
virtual uint8_t | getValue (uint8_t index) const=0 |
Get the velocity or controller value for the given index in the range. More... | |
uint8_t | getValue () const |
Get the velocity or controller value of the first or only note or controller. More... | |
uint8_t | length () const |
Get the length of the range of note/CC addresses. More... | |
uint8_t | getValue () const |
Get the velocity or controller value of the first or only note or controller. More... | |
Static Public Member Functions | |
constexpr static uint8_t | length () |
Get the length of the range. More... | |
Public Attributes | |
Callback | callback |
Callback that is called when a value in the active bank changes. More... | |
Private Member Functions | |
bool | updateImpl (const ChannelMessageMatcher &midimsg, const MIDICNChannelAddress &target) override |
virtual uint8_t | getSelection () const |
Get the active bank selection. More... | |
virtual setting_t | getBankIndex (MIDICNChannelAddress target) const |
Get the bank index from a MIDI address. More... | |
virtual uint8_t | getRangeIndex (MIDICNChannelAddress target) const |
Get the index of the given MIDI address in the range. More... | |
Static Private Member Functions | |
static uint8_t | getValueFromMIDIMessage (const ChannelMessageMatcher &midimsg) |
Extract the "value" from a MIDI Note or Control Change message. More... | |
Private Attributes | |
Array< Array< uint8_t, RangeLen >, NumBanks > | values = {{}} |
A 2D array for saving all values of the range, for all banks. More... | |
uint8_t | rangeLength |
Base class for all other classes that listen for incoming MIDI Note or Control Change messages and saves their values.
Can listen to a range of addresses or a single address.
Definition at line 73 of file NoteCCRange.hpp.
|
inline |
Definition at line 75 of file NoteCCRange.hpp.
|
inlinefinaloverridevirtual |
|
inlineoverride |
Initialize.
Definition at line 85 of file NoteCCRange.hpp.
|
inlineoverride |
Reset all values to zero.
Definition at line 87 of file NoteCCRange.hpp.
|
inlineoverrideprivate |
Definition at line 95 of file NoteCCRange.hpp.
|
inlinestaticprivate |
Extract the "value" from a MIDI Note or Control Change message.
For Note On and Control Change, this is simply the second data byte, for Note Off, it's zero.
Definition at line 120 of file NoteCCRange.hpp.
|
inlineprivatevirtual |
Get the active bank selection.
Reimplemented in GenericNoteCCRange< MIDIInput_t, RangeLen, NumBanks, Callback >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCLED< RangeLen > >, and GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCFastLEDCallback< ColorMapper > >.
Definition at line 125 of file NoteCCRange.hpp.
|
inlineprivatevirtual |
Get the bank index from a MIDI address.
Reimplemented in GenericNoteCCRange< MIDIInput_t, RangeLen, NumBanks, Callback >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCLED< RangeLen > >, and GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCFastLEDCallback< ColorMapper > >.
Definition at line 128 of file NoteCCRange.hpp.
|
inlineprivatevirtual |
Get the index of the given MIDI address in the range.
Reimplemented in GenericNoteCCRange< MIDIInput_t, RangeLen, NumBanks, Callback >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCLED< RangeLen > >, and GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCFastLEDCallback< ColorMapper > >.
Definition at line 135 of file NoteCCRange.hpp.
|
inlinestaticconstexpr |
Get the length of the range.
Definition at line 148 of file NoteCCRange.hpp.
virtual uint8_t getValue |
Get the velocity or controller value for the given index in the range.
|
inline |
Get the velocity or controller value of the first or only note or controller.
Definition at line 24 of file NoteCCRange.hpp.
|
inlineinherited |
Get the length of the range of note/CC addresses.
Definition at line 19 of file NoteCCRange.hpp.
|
inlineinherited |
Get the velocity or controller value of the first or only note or controller.
Definition at line 24 of file NoteCCRange.hpp.
A 2D array for saving all values of the range, for all banks.
Definition at line 142 of file NoteCCRange.hpp.
Callback callback |
Callback that is called when a value in the active bank changes.
Definition at line 146 of file NoteCCRange.hpp.
|
privateinherited |
Definition at line 27 of file NoteCCRange.hpp.