Class that listens for Note events and displays the velocity on an LED Bar Graph. More...
#include <MIDI_Inputs/LEDs/NoteCCRangeLEDBar.hpp>
Public Member Functions | |
NoteLEDBar (const AH::DotBarDisplayLEDs< NumLEDs > &leds, MIDIAddress address) | |
void | dotMode () |
Set the mode to dot mode. More... | |
void | barMode () |
Set the mode to bar mode. More... | |
void | setMode (AH::DotBarMode mode) |
Set the mode to either dot or bar mode. More... | |
uint8_t | getValue (uint8_t index) const final override |
virtual uint8_t | getValue (uint8_t index) const =0 |
Get the velocity or controller value for the given index in the range. More... | |
uint8_t | getValue () const |
Get the velocity or controller value of the first or only note or controller. More... | |
uint8_t | getValue () const |
Get the velocity or controller value of the first or only note or controller. More... | |
void | begin () override |
Initialize. More... | |
void | reset () override |
Reset all values to zero. More... | |
uint8_t | length () const |
Get the length of the range of note/CC addresses. More... | |
virtual void | update () |
Update the value of the input element. Used for decaying VU meters etc. More... | |
bool | updateWith (const ChannelMessageMatcher &midimsg) |
Receive a new MIDI message and update the internal state. More... | |
Static Public Member Functions | |
constexpr static uint8_t | length () |
Get the length of the range. More... | |
static void | beginAll () |
Initialize all MIDIInputElementNote elements. More... | |
static void | updateAll () |
Update all MIDIInputElementNote elements. More... | |
static void | resetAll () |
Reset all MIDIInputElementNote elements to their initial state. More... | |
static void | updateAllWith (const ChannelMessageMatcher &midimsg) |
Update all MIDIInputElementNote elements with a new MIDI message. More... | |
Public Attributes | |
NoteCCLEDBarCallback< NumLEDs > | callback |
Callback that is called when a value in the active bank changes. More... | |
Protected Attributes | |
const MIDIAddress | address |
MIDIInputElementNote * | next |
MIDIInputElementNote * | previous |
Private Member Functions | |
bool | match (const MIDIAddress &target) const override |
Check if the address of the incoming MIDI message is within the range of addresses of this element. More... | |
bool | updateImpl (const ChannelMessageMatcher &midimsg, const MIDIAddress &target) override |
virtual uint8_t | getSelection () const |
Get the active bank selection. More... | |
virtual setting_t | getBankIndex (MIDIAddress target) const |
Get the bank index from a MIDI address. More... | |
virtual uint8_t | getRangeIndex (MIDIAddress target) const |
Get the index of the given MIDI address in the range. More... | |
void | moveDown () |
Move down this element in the linked list of elements. More... | |
virtual MIDIAddress | getTarget (const ChannelMessageMatcher &midimsg) const |
Extract the target address from a MIDI message. More... | |
Static Private Member Functions | |
static uint8_t | getValueFromMIDIMessage (const ChannelMessageMatcher &midimsg) |
Extract the "value" from a MIDI Note or Control Change message. More... | |
Private Attributes | |
Array< Array< uint8_t, RangeLen >, NumBanks > | values |
A 2D array for saving all values of the range, for all banks. More... | |
uint8_t | rangeLength |
Static Private Attributes | |
static DoublyLinkedList< MIDIInputElementNote > | elements |
Class that listens for Note events and displays the velocity on an LED Bar Graph.
NumLEDs | The number of LEDs the display has. |
Definition at line 52 of file NoteCCRangeLEDBar.hpp.
|
inline |
Definition at line 55 of file NoteCCRangeLEDBar.hpp.
|
inline |
Set the mode to dot mode.
Definition at line 64 of file NoteCCRangeLEDBar.hpp.
|
inline |
Set the mode to bar mode.
Definition at line 66 of file NoteCCRangeLEDBar.hpp.
|
inline |
Set the mode to either dot or bar mode.
mode | The mode. |
Definition at line 68 of file NoteCCRangeLEDBar.hpp.
|
inlineoverrideprivatevirtualinherited |
Check if the address of the incoming MIDI message is within the range of addresses of this element.
Reimplemented from MIDIInputElement.
Definition at line 164 of file NoteCCRange.hpp.
|
inlinefinaloverridevirtualinherited |
|
inherited |
Get the velocity or controller value for the given index in the range.
|
inlineinherited |
Get the velocity or controller value of the first or only note or controller.
Definition at line 82 of file NoteCCRange.hpp.
|
inlineinherited |
Get the velocity or controller value of the first or only note or controller.
Definition at line 24 of file NoteCCRange.hpp.
|
inlineoverridevirtualinherited |
|
inlineoverridevirtualinherited |
Reset all values to zero.
Reimplemented from MIDIInputElement.
Definition at line 87 of file NoteCCRange.hpp.
|
inlineoverrideprivatevirtualinherited |
Implements MIDIInputElement.
Definition at line 95 of file NoteCCRange.hpp.
|
inlinestaticprivateinherited |
Extract the "value" from a MIDI Note or Control Change message.
For Note On and Control Change, this is simply the second data byte, for Note Off, it's zero.
Definition at line 120 of file NoteCCRange.hpp.
|
inlineprivatevirtualinherited |
Get the active bank selection.
Definition at line 125 of file NoteCCRange.hpp.
|
inlineprivatevirtualinherited |
Get the bank index from a MIDI address.
Definition at line 128 of file NoteCCRange.hpp.
|
inlineprivatevirtualinherited |
Get the index of the given MIDI address in the range.
Definition at line 135 of file NoteCCRange.hpp.
|
inlinestaticconstexprinherited |
Get the length of the range.
Definition at line 148 of file NoteCCRange.hpp.
|
inlineinherited |
Get the length of the range of note/CC addresses.
Definition at line 19 of file NoteCCRange.hpp.
|
inlinestaticinherited |
Initialize all MIDIInputElementNote elements.
Definition at line 49 of file MIDIInputElementNote.hpp.
|
inlinestaticinherited |
Update all MIDIInputElementNote elements.
Definition at line 60 of file MIDIInputElementNote.hpp.
|
inlinestaticinherited |
Reset all MIDIInputElementNote elements to their initial state.
Definition at line 71 of file MIDIInputElementNote.hpp.
|
inlinestaticinherited |
Update all MIDIInputElementNote elements with a new MIDI message.
Definition at line 84 of file MIDIInputElementNote.hpp.
|
inlineprivateinherited |
Move down this element in the linked list of elements.
This means that the element will be checked earlier on the next iteration.
Definition at line 102 of file MIDIInputElementNote.hpp.
|
inlinevirtualinherited |
Update the value of the input element. Used for decaying VU meters etc.
Reimplemented in VU_Base< NumValues, Callback >, VU_Base< NumBanks, VULEDsCallback< NumLEDs > >, VU_Base< NumBanks, VUEmptyCallback >, VU_Base< 1, VUEmptyCallback >, and VU_Base< 1, VULEDsCallback< NumLEDs > >.
Definition at line 36 of file MIDIInputElement.hpp.
|
inlineinherited |
Receive a new MIDI message and update the internal state.
Definition at line 39 of file MIDIInputElement.hpp.
|
inlineprivatevirtualinherited |
Extract the target address from a MIDI message.
Reimplemented in MIDIInputElementPC, MIDIInputElementChannelPressure, VU_Base< NumValues, Callback >, VU_Base< NumBanks, VULEDsCallback< NumLEDs > >, VU_Base< NumBanks, VUEmptyCallback >, VU_Base< 1, VUEmptyCallback >, and VU_Base< 1, VULEDsCallback< NumLEDs > >.
Definition at line 63 of file MIDIInputElement.hpp.
A 2D array for saving all values of the range, for all banks.
Definition at line 142 of file NoteCCRange.hpp.
|
inherited |
Callback that is called when a value in the active bank changes.
Definition at line 146 of file NoteCCRange.hpp.
|
staticprivateinherited |
Definition at line 107 of file MIDIInputElementNote.hpp.
|
protectedinherited |
Definition at line 83 of file MIDIInputElement.hpp.
|
protectedinherited |
Definition at line 323 of file LinkedList.hpp.
|
protectedinherited |
Definition at line 324 of file LinkedList.hpp.
|
privateinherited |
Definition at line 27 of file NoteCCRange.hpp.