#include <Banks/Bank.hpp>
template<
setting_t NumBanks>
class Bank< NumBanks >
A class that groups Bankable MIDI Output Elements and Bankable MIDI Input Elements, and allows the user to change the addresses of these elements.
- Template Parameters
-
NumBanks | The number of banks. |
- Examples
- Bank-Button-Matrix.ino, Bank.ino, Bankable-Smart-Control-Change-Potentiometer.ino, Custom-MIDI-Output-Element-Bankable.ino, Custom-Selector-Callback.ino, Encoder-Selector-Bank.ino, MCU-OLED-SSD1306-x2.ino, MCU-OLED-SSD1306.ino, MIDI-Controller-Finished-Example.ino, MIDI_controller-97.ino, ManyAddressesPCButton.ino, and One-Pot-Both-PB-and-CC.ino.
Definition at line 91 of file Bank.hpp.
◆ Bank()
Bank |
( |
uint8_t |
tracksPerBank = 1 , |
|
|
setting_t |
initialSelection = 0 , |
|
|
int8_t |
selectionOffset = 0 |
|
) |
| |
|
inline |
Construct a new Bank object.
- Parameters
-
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. |
Definition at line 104 of file Bank.hpp.
◆ select()
Select the given bank setting.
All Bankable MIDI Input elements that were added to this bank will be updated.
- Parameters
-
bankSetting | The new setting to select. |
Implements Selectable< NumBanks >.
◆ getNumberOfBanks()
static constexpr uint8_t getNumberOfBanks |
( |
| ) |
|
|
inlinestaticconstexpr |
Get the number of banks.
Definition at line 119 of file Bank.hpp.
◆ add()
Add a Bankable MIDI Input Element to the bank.
- Parameters
-
bankable | The MIDI Input Element to be added. |
◆ remove()
Remove a Bankable MIDI Input Element from the bank.
- Parameters
-
bankable | The MIDI Input Element to be removed. |
◆ validateSetting()
◆ getInitialSelection()
◆ setInitialSelection()
void setInitialSelection |
( |
setting_t |
initialSelection | ) |
|
|
inlineinherited |
◆ getSelection()
Get the current bank setting (zero-based).
Definition at line 44 of file Bank.hpp.
◆ getSelectionOffset()
int8_t getSelectionOffset |
( |
| ) |
const |
|
inlineinherited |
Get the offset of the bank setting.
Definition at line 46 of file Bank.hpp.
◆ getTracksPerBank()
uint8_t getTracksPerBank |
( |
| ) |
const |
|
inlineinherited |
Get the number of tracks per bank.
This is the number of addresses/tracks to skip for each bank setting.
Definition at line 50 of file Bank.hpp.
◆ getOffsetOfSetting()
int8_t getOffsetOfSetting |
( |
setting_t |
s | ) |
const |
|
inlineinherited |
◆ getOffset()
int8_t getOffset |
( |
| ) |
const |
|
inlineinherited |
Get the address offset (number of banks times the index of the selected bank after applying the offset)
Definition at line 58 of file Bank.hpp.
◆ 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.
The list is updated automatically when Bankable MIDI Input Elements are created or destroyed.
Definition at line 139 of file Bank.hpp.
◆ initialSelection
◆ tracksPerBank
◆ bankSetting
◆ selectionOffset
The documentation for this class was generated from the following file: