#include <Banks/Transposer.hpp>
template<int8_t MinTransposition, int8_t MaxTransposition>
class Transposer< MinTransposition, MaxTransposition >
Class for transposing the address of NoteButton and other MIDI elements.
- Examples
- Transpose-Octave-NC-Button.ino, and Transposer.ino.
Definition at line 11 of file Transposer.hpp.
◆ Transposer()
◆ setTransposition()
void setTransposition |
( |
int8_t |
tp | ) |
|
|
inline |
Set the transposition.
- Parameters
-
tp | The new transposition in the range [ MinTransposition , MaxTransposition ]. |
- Note
- The Bank::select() method expects a zero-based argument, which is cumbersome if the minimum transposition is nonzero.
Definition at line 27 of file Transposer.hpp.
◆ getTransposition()
int8_t getTransposition |
( |
| ) |
const |
|
inline |
◆ getTranspositionSemitones()
int8_t getTranspositionSemitones |
( |
| ) |
const |
|
inline |
Get the transposition as a number of semitones.
Definition at line 35 of file Transposer.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 |
( |
| ) |
|
|
inlinestaticconstexprinherited |
◆ 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.
constexpr setting_t N = MaxTransposition - MinTransposition + 1 |
|
staticconstexpr |
◆ NumBanks
◆ 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: