23 return (base <=
tgt) && (
tgt - base < length);
53template <u
int8_t BankSize>
56 const uint8_t B = bank.getTracksPerBank();
57 const int8_t F = bank.getSelectionOffset();
61 return m >= b + F * B &&
67template <u
int8_t BankSize>
72 const uint8_t B = bank.getTracksPerBank();
73 const int8_t F = bank.getSelectionOffset();
77 return m >= b + F * B &&
83template <u
int8_t BankSize>
85 const uint8_t B = bank.getTracksPerBank();
86 const int8_t F = bank.getSelectionOffset();
94template <u
int8_t BankSize>
96 const uint8_t B = bank.getTracksPerBank();
97 const int8_t F = bank.getSelectionOffset();
115template <u
int8_t BankSize>
120 switch (config.
type) {
139 default:
return false;
156template <u
int8_t BankSize>
161 switch (config.
type) {
166 config.bank, length);
177 default:
return false;
192template <u
int8_t BankSize>
195 switch (config.
type) {
221template <u
int8_t BankSize>
@ ChangeAddress
Change the offset of the address (i.e.
@ ChangeCable
Change the offset of the cable number of the element.
@ ChangeChannel
Change the offset of the channel number of the element.
#define BEGIN_CS_NAMESPACE
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
constexpr bool isValid() const
Check if the MIDI address is valid.
constexpr uint8_t getRawChannel() const
Get the channel as an integer [0, 15].
constexpr uint8_t getAddress() const
Get the address [0, 127].
constexpr uint8_t getRawCableNumber() const
Get the cable number as an integer [0, 15].
constexpr Channel getChannel() const
Get the channel [Channel_1, Channel_16].
constexpr Cable getCableNumber() const
Get the cable number [Cable_1, Cable_16].
bool inRange(uint8_t tgt, uint8_t base, uint8_t length)
Check whether a given address is within a range of given length starting from the given base address.
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.