An abstract class for momentary push buttons that send multiple MIDI events. More...
#include <MIDIChordButton.hpp>
Public Member Functions | |
| template<uint8_t N> | |
| MIDIChordButton (const OutputBankConfig &config, pin_t pin, const MIDICNChannelAddress &address, const Chord< N > &chord, const Sender &sender) | |
| Construct a new bankable MIDIChordButton. More... | |
| void | begin () override |
| Initialize this updatable. More... | |
| void | update () override |
| Update this updatable. More... | |
| AH::Button::State | getButtonState () const |
| template<uint8_t N> | |
| void | setChord (const Chord< N > &chord) |
| 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) |
| template<class U , size_t N> | |
| static void | enable (U(&array)[N]) |
| static void | disable (Updatable< T > *element) |
| static void | disable (Updatable< T > &element) |
| template<class U , size_t N> | |
| 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 | |
| Sender | sender |
Protected Attributes | |
| Updatable< T > * | next |
| Updatable< T > * | previous |
Private Attributes | |
| SingleAddress | address |
| AH::Button | button |
| AH::UniquePtr< const IChord > | chord |
| AH::UniquePtr< const IChord > | newChord |
Static Private Attributes | |
| static DoublyLinkedList< Updatable< T > > | updatables |
An abstract class for momentary push buttons that send multiple MIDI events.
The button is debounced.
Definition at line 23 of file Bankable/Abstract/MIDIChordButton.hpp.
|
inline |
Construct a new bankable MIDIChordButton.
| config | The bank configuration to use: the bank to add this element to, and whether to change the address, channel or cable number. |
| pin | The digital input pin with the button connected. The internal pull-up resistor will be enabled. |
| address | The address of the base note, containing the note number [0, 127], the MIDI channel [CHANNEL_1, CHANNEL_16] and Cable Number [0, 15]. |
| chord | The chord to play on top of the base notes. |
| sender | The MIDI sender to use. |
Definition at line 44 of file Bankable/Abstract/MIDIChordButton.hpp.
|
inlineoverridevirtual |
Initialize this updatable.
Implements AH::Updatable< T >.
Definition at line 50 of file Bankable/Abstract/MIDIChordButton.hpp.
|
inlineoverridevirtual |
Update this updatable.
Implements AH::Updatable< T >.
Definition at line 51 of file Bankable/Abstract/MIDIChordButton.hpp.
|
inline |
Definition at line 74 of file Bankable/Abstract/MIDIChordButton.hpp.
|
inline |
Definition at line 77 of file Bankable/Abstract/MIDIChordButton.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.
|
private |
Definition at line 82 of file Bankable/Abstract/MIDIChordButton.hpp.
|
private |
Definition at line 83 of file Bankable/Abstract/MIDIChordButton.hpp.
|
private |
Definition at line 84 of file Bankable/Abstract/MIDIChordButton.hpp.
|
private |
Definition at line 85 of file Bankable/Abstract/MIDIChordButton.hpp.
| Sender Bankable::MIDIChordButton< Sender >::sender |
Definition at line 88 of file Bankable/Abstract/MIDIChordButton.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.
1.8.16