#include <Banks/Transposer.hpp>
Class for transposing the address of NoteButton and other MIDI elements.
Definition at line 11 of file Transposer.hpp.
Public Member Functions | |
| Transposer (int8_t step=1) | |
| void | setTransposition (int8_t tp) |
| Set the transposition. | |
| int8_t | getTransposition () const |
| Get the transposition. | |
| int8_t | getTranspositionSemitones () const |
| Get the transposition as a number of semitones. | |
| 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) |
Static Public Attributes | |
| static constexpr setting_t | N = MaxTransposition - MinTransposition + 1 |
| static constexpr setting_t | NumBanks = N |
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 |
Definition at line 13 of file Transposer.hpp.
|
inline |
Set the transposition.
| tp | The new transposition in the range [ MinTransposition, MaxTransposition ]. |
Definition at line 27 of file Transposer.hpp.
|
inline |
Get the transposition.
Definition at line 30 of file Transposer.hpp.
|
inline |
Get the transposition as a number of semitones.
Definition at line 35 of file Transposer.hpp.
|
overridevirtualinherited |
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 >.
|
inlinestaticconstexprinherited |
|
inherited |
|
inherited |
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 |
|
staticconstexpr |
Definition at line 37 of file Transposer.hpp.
Definition at line 38 of file Transposer.hpp.
|
privateinherited |
|
privateinherited |
Definition at line 40 of file Selectable.hpp.