#include <Banks/BankableAddresses.hpp>
A base class for all MIDIOutputElements that can have one of many addresses.
The bank setting determines the address that's being used.
getSelection
and getRawBankSetting
always return a number in the half-open interval \( \left[0, \mathrm{bank.getNumberOfBanks()}\right) \cap
\mathbb{N} \). Definition at line 148 of file BankableAddresses.hpp.
Public Member Functions | |
template<uint8_t NumBanks> | |
ManyAddresses_Base (const Bank< NumBanks > &bank) | |
Constructor. More... | |
setting_t | getRawBankSetting () const |
Get the actual bank setting (no matter whether the element is locked or not). More... | |
setting_t | getSelection () const |
Get the bank setting. More... | |
void | lock () |
Lock the bank setting. More... | |
void | unlock () |
Unlock the bank setting. More... | |
Protected Attributes | |
const OutputBank & | bank |
Private Attributes | |
setting_t | lockedSetting = UNLOCKED |
Static Private Attributes | |
static constexpr setting_t | UNLOCKED = NO_SETTING |
|
inline |
Constructor.
bank | The bank to add this element to. |
NumBanks | The number of bank settings bank has. |
Definition at line 159 of file BankableAddresses.hpp.
|
inlineinherited |
Get the actual bank setting (no matter whether the element is locked or not).
Definition at line 30 of file BankableAddresses.hpp.
|
inlineinherited |
Get the bank setting.
If the element is locked, the bank setting from the moment it was locked is returned.
Definition at line 38 of file BankableAddresses.hpp.
|
inlineinherited |
Lock the bank setting.
As long as it's locked, getSelection
will return the current setting, independent from the actual bank setting.
Definition at line 48 of file BankableAddresses.hpp.
|
inlineinherited |
Unlock the bank setting.
After unlocking, getSelection will return the actual bank setting again.
Definition at line 59 of file BankableAddresses.hpp.
|
protectedinherited |
Definition at line 62 of file BankableAddresses.hpp.
|
staticconstexprprivateinherited |
Definition at line 65 of file BankableAddresses.hpp.
Definition at line 66 of file BankableAddresses.hpp.