A class of MIDIOutputElements that read the input of two momentary push buttons to increment or decrement a relative setting using relative MIDI Control Change events. More...
#include <MIDI_Outputs/ManyAddresses/CCIncrementDecrementButtons.hpp>
Public Member Functions | |
CCIncrementDecrementButtons (const OutputBankConfig &config, const AH::IncrementDecrementButtons &buttons, const Array< MIDICNChannelAddress, N > &addresses, uint8_t multiplier=1, const Array< MIDICNChannelAddress, N > &resetNotes={}, const RelativeCCSender &relativeSender={}, const DigitalNoteSender &resetSender={}) | |
Construct a new Bankable CCIncrementDecrementButtons object. More... | |
void | begin () override |
Initialize this updatable. More... | |
void | update () override |
Update this updatable. More... | |
void | send (long delta, const MIDICNChannelAddress &address) |
void | reset () |
void | invert () |
AH::IncrementDecrementButtons::State | getButtonsState () const |
void | enable () |
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More... | |
void | disable () |
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More... | |
bool | isEnabled () |
Check if this updatable is enabled. More... | |
Static Public Member Functions | |
static void | enable (Updatable *element) |
static void | enable (Updatable &element) |
static void | enable (U(&array)[N]) |
static void | disable (Updatable< NormalUpdatable > *element) |
static void | disable (Updatable< NormalUpdatable > &element) |
static void | disable (U(&array)[N]) |
static void | beginAll () |
Begin all enabled instances of this class. More... | |
static void | updateAll () |
Update all enabled instances of this class. More... | |
Public Attributes | |
RelativeCCSender | relativeSender |
DigitalNoteSender | resetSender |
Protected Attributes | |
Updatable< NormalUpdatable > * | next |
Updatable< NormalUpdatable > * | previous |
Private Attributes | |
TwoManyAddresses< N > | addresses |
AH::IncrementDecrementButtons | buttons |
const uint8_t | multiplier |
Static Private Attributes | |
static DoublyLinkedList< Updatable< NormalUpdatable > > | updatables |
A class of MIDIOutputElements that read the input of two momentary push buttons to increment or decrement a relative setting using relative MIDI Control Change events.
An optional note number can be provided to reset the setting.
This version can be banked using an arbitrary list of alternative addresses.
N | The number of variants/alternative addresses the element has. |
Definition at line 26 of file ManyAddresses/CCIncrementDecrementButtons.hpp.
|
inline |
Construct a new Bankable CCIncrementDecrementButtons object.
config | The bank configuration to use: the bank to add this element to, and whether to change the address, channel or cable number. |
buttons | The pins with the increment and decrement buttons connected. The internal pull-up resistors will be enabled. |
addresses | The list of MIDI addresses to use for the relative events, containing the controller number [0, 119], channel [CHANNEL_1, CHANNEL_16], and optional cable number [0, 15]. |
multiplier | The multiplier for the relative events. When setting it to 2, it will scroll twice as fast, for example. |
resetNotes | The list of MIDI addresses to use to reset the setting, containing the note number [0, 127], channel [CHANNEL_1, CHANNEL_16], and optional cable number [0, 15]. It will be triggered when the increment and decrement buttons are pressed simultaneously. |
relativeSender | The MIDI sender to use for the relative events. |
resetSender | The MIDI sender to use for reset events. |
Definition at line 57 of file ManyAddresses/CCIncrementDecrementButtons.hpp.
|
inlineoverridevirtualinherited |
Initialize this updatable.
Implements Updatable<>.
Definition at line 36 of file Bankable/Abstract/MIDIIncrementDecrementButtons.hpp.
|
inlineoverridevirtualinherited |
Update this updatable.
Implements Updatable<>.
Definition at line 38 of file Bankable/Abstract/MIDIIncrementDecrementButtons.hpp.
|
inlineinherited |
Definition at line 50 of file Bankable/Abstract/MIDIIncrementDecrementButtons.hpp.
|
inlineinherited |
Definition at line 54 of file Bankable/Abstract/MIDIIncrementDecrementButtons.hpp.
|
inlineinherited |
Definition at line 63 of file Bankable/Abstract/MIDIIncrementDecrementButtons.hpp.
|
inlineinherited |
Definition at line 66 of file Bankable/Abstract/MIDIIncrementDecrementButtons.hpp.
|
inlineinherited |
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 45 of file Updatable.hpp.
|
inlinestaticinherited |
Definition at line 85 of file Updatable.hpp.
|
inlinestaticinherited |
Definition at line 87 of file Updatable.hpp.
|
inlinestaticinherited |
Definition at line 90 of file Updatable.hpp.
|
inlineinherited |
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 55 of file Updatable.hpp.
|
inlinestaticinherited |
Definition at line 95 of file Updatable.hpp.
|
inlinestaticinherited |
Definition at line 97 of file Updatable.hpp.
|
inlinestaticinherited |
Definition at line 100 of file Updatable.hpp.
|
inlineinherited |
Check if this updatable is enabled.
Definition at line 69 of file Updatable.hpp.
|
inlinestaticinherited |
Begin all enabled instances of this class.
Definition at line 73 of file Updatable.hpp.
|
inlinestaticinherited |
Update all enabled instances of this class.
Definition at line 80 of file Updatable.hpp.
|
privateinherited |
Definition at line 71 of file Bankable/Abstract/MIDIIncrementDecrementButtons.hpp.
|
privateinherited |
Definition at line 72 of file Bankable/Abstract/MIDIIncrementDecrementButtons.hpp.
|
privateinherited |
Definition at line 73 of file Bankable/Abstract/MIDIIncrementDecrementButtons.hpp.
|
inherited |
Definition at line 76 of file Bankable/Abstract/MIDIIncrementDecrementButtons.hpp.
|
inherited |
Definition at line 77 of file Bankable/Abstract/MIDIIncrementDecrementButtons.hpp.
|
staticprivateinherited |
Definition at line 106 of file Updatable.hpp.
|
protectedinherited |
Definition at line 305 of file LinkedList.hpp.
|
protectedinherited |
Definition at line 306 of file LinkedList.hpp.