#include <Banks/Bank.hpp>
A class that groups Bankable MIDI Output Elements and Bankable MIDI Input Elements, and allows the user to change the addresses of these elements.
| NumBanks | The number of banks. |
Public Member Functions | |
| Bank (uint8_t tracksPerBank=1, setting_t initialSelection=0, int8_t selectionOffset=0) | |
| Construct a new Bank object. | |
| void | select (setting_t bankSetting) override |
| Select the given bank setting. | |
| void | add (BankSettingChangeCallback *bankable) |
| Add a Bankable MIDI Input Element to the bank. | |
| void | remove (BankSettingChangeCallback *bankable) |
| Remove a Bankable MIDI Input Element from the bank. | |
| setting_t | getInitialSelection () const |
| void | setInitialSelection (setting_t initialSelection) |
| setting_t | getSelection () const |
| Get the current bank setting (zero-based). | |
| int8_t | getSelectionOffset () const |
| Get the offset of the bank setting. | |
| uint8_t | getTracksPerBank () const |
| Get the number of tracks per bank. | |
| int8_t | getOffsetOfSetting (setting_t s) const |
| The same as getOffset, but for a given setting. | |
| int8_t | getOffset () const |
| Get the address offset (number of banks times the index of the selected bank after applying the offset). | |
Static Public Member Functions | |
| static constexpr uint8_t | getNumberOfBanks () |
| Get the number of banks. | |
| static setting_t | validateSetting (setting_t setting) |
Private Attributes | |
| DoublyLinkedList< BankSettingChangeCallback > | inputBankables |
| A linked list of all Bankable MIDI Input Elements that have been added to this bank, and that should be updated when the bank setting changes. | |
| setting_t | initialSelection |
| uint8_t | tracksPerBank |
| setting_t | bankSetting |
| int8_t | selectionOffset |
|
inline |
Construct a new Bank object.
| tracksPerBank | The number of addresses/tracks to skip for each bank setting. Must be strictly positive. |
| initialSelection | The initial bank setting. |
| selectionOffset | The offset added to the bank setting before computing the actual address offset. |
Select the given bank setting.
All Bankable MIDI Input elements that were added to this bank will be updated.
| bankSetting | The new setting to select. |
Implements Selectable< NumBanks >.
|
inlinestaticconstexpr |
| void add | ( | BankSettingChangeCallback * | bankable | ) |
| void remove | ( | BankSettingChangeCallback * | bankable | ) |
Definition at line 19 of file Selectable.hpp.
|
inlineinherited |
Definition at line 33 of file Selectable.hpp.
|
inlineinherited |
Definition at line 35 of file Selectable.hpp.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
private |
|
privateinherited |
Definition at line 40 of file Selectable.hpp.