| 
   
    MIDI Control Surface library for Arduino 
   | 
 
 
 
 
Go to the documentation of this file.
   21     virtual uint8_t 
getValue(uint8_t index) 
const = 0;
 
   59         for (uint8_t i = 0; i < noteccval.
length(); ++i)
 
   72 template <
class MIDIInput_t, u
int8_t RangeLen, u
int8_t NumBanks, 
class Callback>
 
   79     uint8_t 
getValue(uint8_t index) 
const final override {
 
  107         values[bankIndex][rangeIndex] = value;
 
  138         return target.
getAddress() - this->address.getAddress();
 
  148     constexpr 
static uint8_t 
length() { 
return RangeLen; }
 
  153 template <
class MIDIInput_t, uint8_t RangeLen,
 
  156     : 
public NoteCCRange<MIDIInput_t, RangeLen, 1, Callback> {
 
  166             target, this->address, RangeLen);
 
  170 template <u
int8_t RangeLen, 
class Callback = NoteCCRangeEmptyCallback>
 
  174 template <u
int8_t RangeLen, 
class Callback = NoteCCRangeEmptyCallback>
 
  178 template <
class Callback = NoteCCRangeEmptyCallback>
 
  181 template <
class Callback = NoteCCRangeEmptyCallback>
 
  192 template <u
int8_t RangeLen>
 
  219 template <u
int8_t RangeLen>
 
  245 template <
class MIDIInput_t, uint8_t RangeLen, uint8_t NumBanks,
 
  248     : 
public NoteCCRange<MIDIInput_t, RangeLen, NumBanks, Callback>,
 
  254         : 
NoteCCRange<MIDIInput_t, RangeLen, NumBanks, Callback>{
 
  264             target, this->address, RangeLen);
 
  283 template <uint8_t RangeLen, uint8_t NumBanks,
 
  288 template <uint8_t RangeLen, uint8_t NumBanks,
 
  293 template <u
int8_t NumBanks, 
class Callback = NoteCCRangeEmptyCallback>
 
  297 template <u
int8_t NumBanks, 
class Callback = NoteCCRangeEmptyCallback>
 
  311 template <u
int8_t RangeLen, u
int8_t NumBanks>
 
  326 template <u
int8_t NumBanks>
 
  335 template <u
int8_t NumBanks>
 
  348 template <u
int8_t RangeLen, u
int8_t NumBanks>
 
  363 template <u
int8_t NumBanks>
 
  
CCValue(MIDICNChannelAddress address)
 
virtual setting_t getBankIndex(MIDICNChannelAddress target) const
Get the bank index from a MIDI address.
 
MIDI Input Element that listens to a single note and saves its velocity value.
 
Array< Array< uint8_t, RangeLen >, NumBanks > values
A 2D array for saving all values of the range, for all banks.
 
constexpr static uint8_t length()
Get the length of the range.
 
A namespace for MIDI elements that can be added to a Bank, to change their address or channel.
 
uint8_t getValue() const
Get the velocity or controller value of the first or only note or controller.
 
virtual void updateAll(const INoteCCValue ¬eccval)
Update all values: called when a bank change causes all values to (possibly) change,...
 
Interface for NoteCCValue objects: provides getters for the velocity or controller values.
 
NoteValue(MIDICNChannelAddress address)
 
virtual uint8_t getSelection() const
Get the active bank selection.
 
A callback for NoteCCRange with an action that can be implemented by the user.
 
CCRange(MIDICNChannelAddress address)
 
uint8_t length() const
Get the length of the range of note/CC addresses.
 
MIDI Input Element that listens to a single controller and saves its value.
 
static bool matchAddressInRange(const MIDICNChannelAddress &toMatch, const MIDICNChannelAddress &base, uint8_t length)
Check if an address falls within a range of addresses, starting with address base,...
 
#define BEGIN_CS_NAMESPACE
 
GenericNoteCCRange(BankConfig< NumBanks > config, MIDICNChannelAddress address, const Callback &callback)
 
Struct for easily matching MIDI messages.
 
setting_t getSelection() const override
Get the active bank selection.
 
uint8_t getBankIndex(MIDICNChannelAddress target) const override
Get the bank index from a MIDI address.
 
uint8_t getRangeIndex(MIDICNChannelAddress target) const override
Get the index of the given MIDI address in the range.
 
Callback callback
Callback that is called when a value in the active bank changes.
 
MIDI Input Element that listens to a range of notes and saves their velocity values.
 
virtual void begin(const INoteCCValue &)
Initialize: called once.
 
void begin(const INoteCCValue &)
 
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
 
An array wrapper for easy copying, comparing, and iterating.
 
bool match(const MIDICNChannelAddress &target) const override
Check if the address of the incoming MIDI message is within the range of addresses of this element.
 
MIDI Input Element that listens to a single controller and saves its value.
 
Base class for all other classes that listen for incoming MIDI Note or Control Change messages and sa...
 
NoteRange(MIDICNChannelAddress address)
 
constexpr uint8_t getAddress() const
Get the address [0, 127].
 
A callback for NoteCCRange that doesn't do anything.
 
SimpleNoteCCValueCallback()=default
 
NoteCCRange(MIDICNChannelAddress address, const Callback &callback)
 
uint8_t getValue(uint8_t index) const final override
 
virtual uint8_t getRangeIndex(MIDICNChannelAddress target) const
Get the index of the given MIDI address in the range.
 
INoteCCValue(uint8_t rangeLength)
 
CCValue(BankConfig< NumBanks > config, MIDICNChannelAddress address)
 
GenericNoteCCRange(MIDICNChannelAddress address, const Callback &callback)
 
void begin() override
Initialize.
 
virtual void update(const INoteCCValue ¬eccval, uint8_t index)=0
Update the given index: called when a new message is received for this index.
 
uint8_t setting_t
The type used for Selectors.
 
MIDI Input Element that listens to a range of controllers and saves their values.
 
MIDI Input Element that listens to a range of notes and saves their velocity values.
 
A struct for selecting the bank of BankableMIDIInputs and the bank type.
 
void onBankSettingChange() override
A function to be executed each time the bank setting changes.
 
void update(const INoteCCValue &, uint8_t)
 
MIDI Input Element that listens to a single note and saves its value.
 
bool updateImpl(const ChannelMessageMatcher &midimsg, const MIDICNChannelAddress &target) override
 
bool match(const MIDICNChannelAddress &target) const override
Check if the address of the incoming MIDI message is within the range of addresses and in one of the ...
 
NoteRange(BankConfig< NumBanks > config, MIDICNChannelAddress address)
 
NoteValue(BankConfig< NumBanks > config, MIDICNChannelAddress address)
 
void reset() override
Reset all values to zero.
 
static uint8_t getValueFromMIDIMessage(const ChannelMessageMatcher &midimsg)
Extract the "value" from a MIDI Note or Control Change message.
 
void updateAll(const INoteCCValue &)
 
MIDI Input Element that listens to a range of controllers and saves their values.
 
CCRange(BankConfig< NumBanks > config, MIDICNChannelAddress address)