#include <MIDI_Inputs/LEDs/FastLED.hpp>
Public Member Functions | |
CCRangeFastLED (Array< CRGB, RangeLen > &leds, MIDIAddress address, const ColorMapper &colormapper={}) | |
CCRangeFastLED (CRGB *leds, MIDIAddress address, const ColorMapper &colormapper={}) | |
void | setBrightness (uint8_t brightness) |
Set the maximum brightness of the LEDs. More... | |
uint8_t | getBrightness () const |
Get the maximum brightness of the LEDs. More... | |
void | setLEDIndexPermuter (index_permuter_f permuter) |
Change the mapping from the MIDI index to the LED index. 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 MIDIInputElementCC elements. More... | |
static void | updateAll () |
Update all MIDIInputElementCC elements. More... | |
static void | resetAll () |
Reset all MIDIInputElementCC elements to their initial state. More... | |
static void | updateAllWith (const ChannelMessageMatcher &midimsg) |
Update all MIDIInputElementCC elements with a new MIDI message. More... | |
Public Attributes | |
NoteCCFastLEDCallback< DefaultColorMapper > | callback |
Callback that is called when a value in the active bank changes. More... | |
Protected Attributes | |
const MIDIAddress | address |
MIDIInputElementCC * | next |
MIDIInputElementCC * | 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< MIDIInputElementCC > | elements |
Definition at line 222 of file FastLED.hpp.
|
inline |
Definition at line 227 of file FastLED.hpp.
|
inline |
Definition at line 235 of file FastLED.hpp.
|
inline |
Set the maximum brightness of the LEDs.
brightness | The maximum brightness [0, 255] |
Definition at line 244 of file FastLED.hpp.
|
inline |
Get the maximum brightness of the LEDs.
Definition at line 248 of file FastLED.hpp.
|
inline |
Change the mapping from the MIDI index to the LED index.
The MIDI index is derived from the note or controller number.
The function should take the (zer-based) MIDI index value as a parameter, and return the corresponding LED index (zero-based). By default, the LED index is the same as the MIDI index.
Definition at line 250 of file FastLED.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 MIDIInputElementCC elements.
Definition at line 52 of file MIDIInputElementCC.hpp.
|
inlinestaticinherited |
Update all MIDIInputElementCC elements.
Definition at line 60 of file MIDIInputElementCC.hpp.
|
inlinestaticinherited |
Reset all MIDIInputElementCC elements to their initial state.
Definition at line 68 of file MIDIInputElementCC.hpp.
|
inlinestaticinherited |
Update all MIDIInputElementCC elements with a new MIDI message.
Definition at line 76 of file MIDIInputElementCC.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 94 of file MIDIInputElementCC.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 99 of file MIDIInputElementCC.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.