26 uint8_t value = m.
data1;
98 return {
true, value, index};
109template <u
int8_t BankSize>
126 return {
false, 0, 0};
127 uint8_t value = m.
data1;
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};
251 return {
true, value, bankIndex, rangeIndex};
BankType
An enumeration of the different bank types.
uint8_t setting_t
The type used for Selectors.
@ NoteOff
Note Off Channel Voice message (3B).
#define BEGIN_CS_NAMESPACE
A class that groups Bankable MIDI Output Elements and Bankable MIDI Input Elements,...
A struct for selecting the bank of BankableMIDIInputs and the bank type.
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)
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()
MIDIChannelCable getChannelCable() const
Get the MIDI channel and cable number.
MIDIAddress getAddress() const
Get the MIDI address of this message, using data1 as the address.
MIDIMessageType getMessageType() const
Get the MIDI message type.
static constexpr auto NoteOff
uint8_t data2
First MIDI data byte.
uint8_t getData1() const
Get the first data byte.
uint8_t data1
First MIDI data byte.
uint8_t getData2() const
Get the second data byte.
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)