#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
- Note-ManyAddresses-Transposer.ino, Transpose-Octave-NC-Button.ino, and Transposer.ino.
Definition at line 11 of file Transposer.hpp.
◆ Transposer()
template<int8_t MinTransposition, int8_t MaxTransposition>
◆ setTransposition()
template<int8_t MinTransposition, int8_t MaxTransposition>
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()
template<int8_t MinTransposition, int8_t MaxTransposition>
int8_t getTransposition |
( |
| ) |
const |
|
inline |
◆ getTranspositionSemitones()
template<int8_t MinTransposition, int8_t MaxTransposition>
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 >.
Definition at line 119 of file Bank.hpp.
◆ 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. |
Definition at line 129 of file Bank.hpp.
◆ remove()
Remove a Bankable MIDI Input Element from the bank.
- Parameters
-
bankable | The MIDI Input Element to be removed. |
Definition at line 135 of file Bank.hpp.
◆ 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.
template<int8_t MinTransposition, int8_t MaxTransposition>
constexpr setting_t N = MaxTransposition - MinTransposition + 1 |
|
staticconstexpr |
◆ NumBanks
template<int8_t MinTransposition, int8_t MaxTransposition>
◆ 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 142 of file Bank.hpp.
◆ initialSelection
◆ tracksPerBank
◆ bankSetting
◆ selectionOffset
The documentation for this class was generated from the following file: