98 return {
true, value, index};
109template <u
int8_t BankSize>
126 return {
false, 0, 0};
129 return {
true, value, bankIndex};
149template <u
int8_t BankSize>
164 return {
false, 0, 0};
168 return {
true, value, bankIndex};
188template <u
int8_t BankSize>
205 return {
false, 0, 0};
208 return {
true, value, bankIndex};
228template <u
int8_t BankSize>
247 return {
false, 0, 0, 0};
248 uint8_t value =
m.getMessageType() ==
m.NoteOff ? 0 :
m.getData2();
BankType
An enumeration of the different bank types.
@ NoteOff
Note Off Channel Voice message (3B).
#define BEGIN_CS_NAMESPACE
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
static bool matchSingle(MIDIAddress toMatch, MIDIAddress base)
Check if two addresses match (are equal).
constexpr uint8_t getAddress() const
Get the address [0, 127].
static bool matchAddressInRange(MIDIAddress toMatch, MIDIAddress base, uint8_t length)
Check if an address falls within a range of MIDI addresses, starting with address base,...
A class for saving a MIDI channel and cable number.
static bool matchSingle(MIDIChannelCable toMatch, MIDIChannelCable base)
Check if two addresses match (are equal).
setting_t getSelection() const
Get the current bank setting (zero-based).
uint8_t getBankIndex(uint8_t tgt, uint8_t base, const Bank< BankSize > &bank)
bool matchBankable(uint8_t tgt, uint8_t base, const Bank< BankSize > &bank)
Check if the given address is part of the bank relative to the base address.
bool matchBankableInRange(uint8_t tgt, uint8_t base, const Bank< BankSize > &bank, uint8_t rangeLen)
uint8_t getRangeIndex(uint8_t tgt, uint8_t base, const Bank< BankSize > &bank)
An array wrapper for easy copying, comparing, and iterating.
Matcher for MIDI messages with 1 data byte, such as Channel Pressure and Program Change.
setting_t getSelection() const
Get the current bank setting.
static constexpr setting_t getBankSize()
BankableOneByteMIDIMatcher(BankConfig< BankSize, BankType::ChangeChannel > config, MIDIChannelCable address)
BaseBankConfig< BankSize > config
const Bank< BankSize > & getBank() const
BankType getBankType() const
Result operator()(ChannelMessage m)
Bank< BankSize > & getBank()
Matcher for MIDI Pitch Bend messages.
setting_t getSelection() const
Get the current bank setting.
static constexpr setting_t getBankSize()
BaseBankConfig< BankSize > config
const Bank< BankSize > & getBank() const
BankType getBankType() const
BankablePitchBendMIDIMatcher(BankConfig< BankSize, BankType::ChangeChannel > config, MIDIChannelCable address)
Result operator()(ChannelMessage m)
Bank< BankSize > & getBank()
Matcher for MIDI messages with 2 data bytes, such as Note On/Off, Control Change, Key Pressure.
setting_t getSelection() const
Get the current bank setting.
static constexpr setting_t getBankSize()
BankableTwoByteMIDIMatcher(BankConfig< BankSize > config, MIDIAddress address)
BaseBankConfig< BankSize > config
const Bank< BankSize > & getBank() const
BankType getBankType() const
Result operator()(ChannelMessage m)
Bank< BankSize > & getBank()
Matcher for MIDI messages with 2 data bytes, such as Note On/Off, Control Change, Key Pressure.
setting_t getSelection() const
Get the current bank setting.
static constexpr setting_t getBankSize()
BankableTwoByteRangeMIDIMatcher(BankConfig< BankSize > config, MIDIAddress address, uint8_t length)
Constructor.
BaseBankConfig< BankSize > config
const Bank< BankSize > & getBank() const
Result operator()(ChannelMessage m)
Bank< BankSize > & getBank()
Matcher for MIDI messages with 1 data byte, such as Channel Pressure and Program Change.
Result operator()(ChannelMessage m)
OneByteMIDIMatcher(MIDIChannelCable address)
Matcher for MIDI Pitch Bend messages. Matches a single address.
PitchBendMIDIMatcher(MIDIChannelCable address)
Result operator()(ChannelMessage m)
Matcher for MIDI messages with 2 data bytes, such as Note On/Off, Control Change, Key Pressure (but n...
Result operator()(ChannelMessage m)
TwoByteMIDIMatcher(MIDIAddress address)
Matcher for MIDI messages with 2 data bytes, such as Note On/Off, Control Change, Key Pressure (but n...
TwoByteRangeMIDIMatcher(MIDIAddress address, uint8_t length)
Result operator()(ChannelMessage m)