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/CCIncrementDecrementButtons.hpp>
Public Member Functions | |
CCIncrementDecrementButtons (const AH::IncrementDecrementButtons &buttons, const MIDICNChannelAddress &address, uint8_t multiplier=1, const MIDICNChannelAddress &resetNote={}, const RelativeCCSender &relativeSender={}, const DigitalNoteSender &resetSender={}) | |
Construct a new 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 | |
AH::IncrementDecrementButtons | buttons |
const MIDICNChannelAddress | address |
const uint8_t | multiplier |
const MIDICNChannelAddress | resetAddress |
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 cannot be banked.
Definition at line 19 of file CCIncrementDecrementButtons.hpp.
|
inline |
Construct a new CCIncrementDecrementButtons object.
buttons | The pins with the increment and decrement buttons connected. The internal pull-up resistors will be enabled. |
address | The address 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. |
resetNote | The MIDI address to use to reset the setting, containing the note number [0, 119], 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 46 of file CCIncrementDecrementButtons.hpp.
|
inlineoverridevirtualinherited |
Initialize this updatable.
Implements Updatable<>.
Definition at line 33 of file Abstract/MIDIIncrementDecrementButtons.hpp.
|
inlineoverridevirtualinherited |
Update this updatable.
Implements Updatable<>.
Definition at line 35 of file Abstract/MIDIIncrementDecrementButtons.hpp.
|
inlineinherited |
Definition at line 46 of file Abstract/MIDIIncrementDecrementButtons.hpp.
|
inlineinherited |
Definition at line 50 of file Abstract/MIDIIncrementDecrementButtons.hpp.
|
inlineinherited |
Definition at line 58 of file Abstract/MIDIIncrementDecrementButtons.hpp.
|
inlineinherited |
Definition at line 61 of file 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 66 of file Abstract/MIDIIncrementDecrementButtons.hpp.
|
privateinherited |
Definition at line 67 of file Abstract/MIDIIncrementDecrementButtons.hpp.
|
privateinherited |
Definition at line 68 of file Abstract/MIDIIncrementDecrementButtons.hpp.
|
privateinherited |
Definition at line 69 of file Abstract/MIDIIncrementDecrementButtons.hpp.
|
inherited |
Definition at line 72 of file Abstract/MIDIIncrementDecrementButtons.hpp.
|
inherited |
Definition at line 73 of file 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.