Control Surface  1.1.0
MIDI Control Surface library for Arduino
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CCValueFastLED< ColorMapper > Class Template Reference

#include <FastLED.hpp>

Inheritance diagram for CCValueFastLED< ColorMapper >:
Collaboration diagram for CCValueFastLED< ColorMapper >:

Public Member Functions

 CCValueFastLED (CRGB &led, MIDICNChannelAddress 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...
 
uint8_t getValue (uint8_t index) const override
 
virtual uint8_t getValue (uint8_t index) const =0
 
uint8_t getValue () const
 
uint8_t getValue () const
 
void begin () override
 Initialize. More...
 
void reset () override
 Reset all values to zero. More...
 
uint8_t length () const
 
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 ()
 
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

NoteCCFastLED< ColorMapper > callback
 

Protected Attributes

const MIDICNChannelAddress address
 
MIDIInputElementCCnext
 
MIDIInputElementCCprevious
 

Private Member Functions

bool match (const MIDICNChannelAddress &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 MIDICNChannelAddress &target) override
 
virtual uint8_t getSelection () const
 Get the active bank selection. More...
 
virtual setting_t getBankIndex (MIDICNChannelAddress target) const
 Get the bank index from a MIDI address. More...
 
virtual uint8_t getRangeIndex (MIDICNChannelAddress target) const
 
void moveDown ()
 Move down this element in the linked list of elements. More...
 
virtual MIDICNChannelAddress 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)
 

Private Attributes

Array< Array< uint8_t, RangeLen >, NumBanks > values
 
uint8_t rangeLength
 

Static Private Attributes

static DoublyLinkedList< MIDIInputElementCCelements
 

Detailed Description

template<class ColorMapper = DefaultColorMapper>
class CCValueFastLED< ColorMapper >

Definition at line 178 of file FastLED.hpp.

Constructor & Destructor Documentation

◆ CCValueFastLED()

template<class ColorMapper = DefaultColorMapper>
CCValueFastLED< ColorMapper >::CCValueFastLED ( CRGB &  led,
MIDICNChannelAddress  address,
const ColorMapper &  colormapper = {} 
)
inline

Definition at line 181 of file FastLED.hpp.

Member Function Documentation

◆ setBrightness()

template<class ColorMapper = DefaultColorMapper>
void CCValueFastLED< ColorMapper >::setBrightness ( uint8_t  brightness)
inline

Set the maximum brightness of the LEDs.

Parameters
brightnessThe maximum brightness [0, 255]

Definition at line 189 of file FastLED.hpp.

◆ getBrightness()

template<class ColorMapper = DefaultColorMapper>
uint8_t CCValueFastLED< ColorMapper >::getBrightness ( ) const
inline

Get the maximum brightness of the LEDs.

Definition at line 193 of file FastLED.hpp.

◆ match()

bool GenericNoteCCRange< MIDIInputElementCC , RangeLen, NoteCCFastLED< ColorMapper > >::match ( const MIDICNChannelAddress target) const
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 114 of file NoteCCRange.hpp.

◆ getValue() [1/4]

uint8_t NoteCCRange< MIDIInputElementCC , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::getValue ( uint8_t  index) const
inlineoverridevirtualinherited
Todo:
check index bounds

Implements INoteCCValue.

Definition at line 51 of file NoteCCRange.hpp.

◆ getValue() [2/4]

virtual uint8_t INoteCCValue::getValue
inherited

◆ getValue() [3/4]

uint8_t INoteCCValue::getValue
inlineinherited

Definition at line 16 of file NoteCCRange.hpp.

◆ getValue() [4/4]

uint8_t INoteCCValue::getValue ( ) const
inlineinherited

Definition at line 16 of file NoteCCRange.hpp.

◆ begin()

void NoteCCRange< MIDIInputElementCC , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::begin ( )
inlineoverridevirtualinherited

Initialize.

Reimplemented from MIDIInputElement.

Definition at line 57 of file NoteCCRange.hpp.

◆ reset()

void NoteCCRange< MIDIInputElementCC , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::reset ( )
inlineoverridevirtualinherited

Reset all values to zero.

Reimplemented from MIDIInputElement.

Definition at line 59 of file NoteCCRange.hpp.

◆ updateImpl()

bool NoteCCRange< MIDIInputElementCC , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::updateImpl ( const ChannelMessageMatcher midimsg,
const MIDICNChannelAddress target 
)
inlineoverrideprivatevirtualinherited

Implements MIDIInputElement.

Definition at line 65 of file NoteCCRange.hpp.

◆ getValueFromMIDIMessage()

static uint8_t NoteCCRange< MIDIInputElementCC , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::getValueFromMIDIMessage ( const ChannelMessageMatcher midimsg)
inlinestaticprivateinherited

Definition at line 77 of file NoteCCRange.hpp.

◆ getSelection()

virtual uint8_t NoteCCRange< MIDIInputElementCC , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::getSelection ( ) const
inlineprivatevirtualinherited

Get the active bank selection.

Definition at line 82 of file NoteCCRange.hpp.

◆ getBankIndex()

virtual setting_t NoteCCRange< MIDIInputElementCC , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::getBankIndex ( MIDICNChannelAddress  target) const
inlineprivatevirtualinherited

Get the bank index from a MIDI address.

Definition at line 85 of file NoteCCRange.hpp.

◆ getRangeIndex()

virtual uint8_t NoteCCRange< MIDIInputElementCC , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::getRangeIndex ( MIDICNChannelAddress  target) const
inlineprivatevirtualinherited

Definition at line 90 of file NoteCCRange.hpp.

◆ length() [1/2]

constexpr static uint8_t NoteCCRange< MIDIInputElementCC , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::length ( )
inlinestaticconstexprinherited

Definition at line 98 of file NoteCCRange.hpp.

◆ length() [2/2]

uint8_t INoteCCValue::length ( ) const
inlineinherited

Definition at line 14 of file NoteCCRange.hpp.

◆ beginAll()

static void MIDIInputElementCC::beginAll ( )
inlinestaticinherited

Initialize all MIDIInputElementCC elements.

See also
MIDIInputElementCC::begin

Definition at line 50 of file MIDIInputElementCC.hpp.

◆ updateAll()

static void MIDIInputElementCC::updateAll ( )
inlinestaticinherited

Update all MIDIInputElementCC elements.

See also
MIDIInputElementCC::update

Definition at line 58 of file MIDIInputElementCC.hpp.

◆ resetAll()

static void MIDIInputElementCC::resetAll ( )
inlinestaticinherited

Reset all MIDIInputElementCC elements to their initial state.

See also
MIDIInputElementCC::reset

Definition at line 66 of file MIDIInputElementCC.hpp.

◆ updateAllWith()

static void MIDIInputElementCC::updateAllWith ( const ChannelMessageMatcher midimsg)
inlinestaticinherited

Update all MIDIInputElementCC elements with a new MIDI message.

See also
MIDIInputElementCC::updateWith

Definition at line 74 of file MIDIInputElementCC.hpp.

◆ moveDown()

void MIDIInputElementCC::moveDown ( )
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 92 of file MIDIInputElementCC.hpp.

◆ update()

virtual void MIDIInputElement::update ( )
inlinevirtualinherited

◆ updateWith()

bool MIDIInputElement::updateWith ( const ChannelMessageMatcher midimsg)
inlineinherited

Receive a new MIDI message and update the internal state.

Definition at line 39 of file MIDIInputElement.hpp.

◆ getTarget()

virtual MIDICNChannelAddress MIDIInputElement::getTarget ( const ChannelMessageMatcher midimsg) const
inlineprivatevirtualinherited

Extract the target address from a MIDI message.

Note
This base version of the function is only valid for messages that use data1 as an address (i.e. Note On, Note Off, Polyphonic Key Pressure and Control Change), because it assumes that the target address consists of the address (data 1), the MIDI channel and the cable number.

Reimplemented in MCU::VU_Base< NumValues, Callback >, MCU::VU_Base< NumBanks, Callback >, MCU::VU_Base< NumBanks, VULEDsCallback< NumLEDs > >, MCU::VU_Base< NumBanks, VUEmptyCallback >, MCU::VU_Base< 1, VUEmptyCallback >, MCU::VU_Base< 1, VULEDsCallback< NumLEDs > >, MCU::VU_Base< 1, Callback >, MIDIInputElementChannelPressure, and MIDIInputElementPC.

Definition at line 64 of file MIDIInputElement.hpp.

Member Data Documentation

◆ values

Array<Array<uint8_t, RangeLen>, NumBanks> NoteCCRange< MIDIInputElementCC , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::values
privateinherited

Definition at line 94 of file NoteCCRange.hpp.

◆ callback

NoteCCFastLED< ColorMapper > NoteCCRange< MIDIInputElementCC , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::callback
inherited

Definition at line 97 of file NoteCCRange.hpp.

◆ elements

DoublyLinkedList< MIDIInputElementCC > MIDIInputElementCC::elements
staticprivateinherited

Definition at line 97 of file MIDIInputElementCC.hpp.

◆ address

const MIDICNChannelAddress MIDIInputElement::address
protectedinherited

Definition at line 80 of file MIDIInputElement.hpp.

◆ next

MIDIInputElementCC * DoublyLinkable< MIDIInputElementCC >::next
protectedinherited

Definition at line 305 of file LinkedList.hpp.

◆ previous

MIDIInputElementCC * DoublyLinkable< MIDIInputElementCC >::previous
protectedinherited

Definition at line 306 of file LinkedList.hpp.

◆ rangeLength

uint8_t INoteCCValue::rangeLength
privateinherited

Definition at line 19 of file NoteCCRange.hpp.


The documentation for this class was generated from the following file: