An abstract class for momentary push buttons that send multiple MIDI events. More...
#include <MIDIChordButton.hpp>
Public Member Functions | |
| template<uint8_t N> | |
| MIDIChordButton (pin_t pin, const MIDICNChannelAddress &address, const Chord< N > &chord, const Sender &sender) | |
| Construct a new MIDIChordButton. More... | |
| void | begin () final override |
| Initialize this updatable. More... | |
| void | update () final 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) |
| 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 | |
| Sender | sender |
Protected Attributes | |
| Updatable< NormalUpdatable > * | next |
| Updatable< NormalUpdatable > * | previous |
Private Attributes | |
| AH::Button | button |
| const MIDICNChannelAddress | address |
| AH::UniquePtr< const IChord > | chord |
| AH::UniquePtr< const IChord > | newChord |
Static Private Attributes | |
| static DoublyLinkedList< Updatable< NormalUpdatable > > | updatables |
An abstract class for momentary push buttons that send multiple MIDI events.
The button is debounced.
Definition at line 20 of file Abstract/MIDIChordButton.hpp.
|
inline |
Construct a new MIDIChordButton.
| pin | The digital input pin with the button connected. The internal pull-up resistor will be enabled. |
| address | The MIDI address of the base note, containing the note number [0, 127], channel [CHANNEL_1, CHANNEL_16], and optional cable number [0, 15]. |
| chord | The chord containing the intervals of the other notes to play. |
| sender | The MIDI Note sender to use. |
| N | The number of notes in the chord. |
Definition at line 41 of file Abstract/MIDIChordButton.hpp.
|
inlinefinaloverridevirtual |
Initialize this updatable.
Implements AH::Updatable<>.
Definition at line 47 of file Abstract/MIDIChordButton.hpp.
|
inlinefinaloverridevirtual |
Update this updatable.
Implements AH::Updatable<>.
Definition at line 48 of file Abstract/MIDIChordButton.hpp.
|
inline |
Definition at line 68 of file Abstract/MIDIChordButton.hpp.
|
inline |
Definition at line 71 of file 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 76 of file Abstract/MIDIChordButton.hpp.
|
private |
Definition at line 77 of file Abstract/MIDIChordButton.hpp.
|
private |
Definition at line 78 of file Abstract/MIDIChordButton.hpp.
|
private |
Definition at line 79 of file Abstract/MIDIChordButton.hpp.
| Sender MIDIChordButton< Sender >::sender |
Definition at line 82 of file 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