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
NoteRangeFastLED< RangeLen, ColorMapper > Class Template Reference


More...

#include <FastLED.hpp>

Inheritance diagram for NoteRangeFastLED< RangeLen, ColorMapper >:
Collaboration diagram for NoteRangeFastLED< RangeLen, ColorMapper >:

Public Member Functions

 NoteRangeFastLED (Array< CRGB, RangeLen > &leds, MIDICNChannelAddress address, const ColorMapper &colormapper={})
 
 NoteRangeFastLED (CRGB *leds, 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 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

NoteCCFastLED< ColorMapper > callback
 

Protected Attributes

const MIDICNChannelAddress address
 
MIDIInputElementNotenext
 
MIDIInputElementNoteprevious
 

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< MIDIInputElementNoteelements
 

Detailed Description

template<uint8_t RangeLen, class ColorMapper = DefaultColorMapper>
class NoteRangeFastLED< RangeLen, ColorMapper >


Template Parameters
RangeLen
DefaultColorMapper
Examples
10.Note-FastLED-ColorMapper.ino, and 9.Note-FastLED.ino.

Definition at line 80 of file FastLED.hpp.

Constructor & Destructor Documentation

◆ NoteRangeFastLED() [1/2]

template<uint8_t RangeLen, class ColorMapper = DefaultColorMapper>
NoteRangeFastLED< RangeLen, ColorMapper >::NoteRangeFastLED ( Array< CRGB, RangeLen > &  leds,
MIDICNChannelAddress  address,
const ColorMapper &  colormapper = {} 
)
inline

Definition at line 94 of file FastLED.hpp.

◆ NoteRangeFastLED() [2/2]

template<uint8_t RangeLen, class ColorMapper = DefaultColorMapper>
NoteRangeFastLED< RangeLen, ColorMapper >::NoteRangeFastLED ( CRGB *  leds,
MIDICNChannelAddress  address,
const ColorMapper &  colormapper = {} 
)
inline

Definition at line 102 of file FastLED.hpp.

Member Function Documentation

◆ setBrightness()

template<uint8_t RangeLen, class ColorMapper = DefaultColorMapper>
void NoteRangeFastLED< RangeLen, ColorMapper >::setBrightness ( uint8_t  brightness)
inline

Set the maximum brightness of the LEDs.

Parameters
brightnessThe maximum brightness [0, 255]

Definition at line 111 of file FastLED.hpp.

◆ getBrightness()

template<uint8_t RangeLen, class ColorMapper = DefaultColorMapper>
uint8_t NoteRangeFastLED< RangeLen, ColorMapper >::getBrightness ( ) const
inline

Get the maximum brightness of the LEDs.

Definition at line 115 of file FastLED.hpp.

◆ match()

bool GenericNoteCCRange< MIDIInputElementNote , 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< MIDIInputElementNote , 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< MIDIInputElementNote , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::begin ( )
inlineoverridevirtualinherited

Initialize.

Reimplemented from MIDIInputElement.

Definition at line 57 of file NoteCCRange.hpp.

◆ reset()

void NoteCCRange< MIDIInputElementNote , 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< MIDIInputElementNote , 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< MIDIInputElementNote , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::getValueFromMIDIMessage ( const ChannelMessageMatcher midimsg)
inlinestaticprivateinherited

Definition at line 77 of file NoteCCRange.hpp.

◆ getSelection()

virtual uint8_t NoteCCRange< MIDIInputElementNote , 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< MIDIInputElementNote , 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< MIDIInputElementNote , 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< MIDIInputElementNote , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::length ( )
inlinestaticconstexprinherited
Examples
10.Note-FastLED-ColorMapper.ino, and 9.Note-FastLED.ino.

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 MIDIInputElementNote::beginAll ( )
inlinestaticinherited

Initialize all MIDIInputElementNote elements.

See also
MIDIInputElementNote::begin

Definition at line 48 of file MIDIInputElementNote.hpp.

◆ updateAll()

static void MIDIInputElementNote::updateAll ( )
inlinestaticinherited

Update all MIDIInputElementNote elements.

See also
MIDIInputElementNote::update

Definition at line 59 of file MIDIInputElementNote.hpp.

◆ resetAll()

static void MIDIInputElementNote::resetAll ( )
inlinestaticinherited

Reset all MIDIInputElementNote elements to their initial state.

See also
MIDIInputElementNote::reset

Definition at line 70 of file MIDIInputElementNote.hpp.

◆ updateAllWith()

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

Update all MIDIInputElementNote elements with a new MIDI message.

See also
MIDIInputElementNote::updateWith

Definition at line 82 of file MIDIInputElementNote.hpp.

◆ moveDown()

void MIDIInputElementNote::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 100 of file MIDIInputElementNote.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< MIDIInputElementNote , RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >::values
privateinherited

Definition at line 94 of file NoteCCRange.hpp.

◆ callback

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

Definition at line 97 of file NoteCCRange.hpp.

◆ elements

DoublyLinkedList< MIDIInputElementNote > MIDIInputElementNote::elements
staticprivateinherited

Definition at line 105 of file MIDIInputElementNote.hpp.

◆ address

const MIDICNChannelAddress MIDIInputElement::address
protectedinherited

Definition at line 80 of file MIDIInputElement.hpp.

◆ next

Definition at line 305 of file LinkedList.hpp.

◆ previous

MIDIInputElementNote * DoublyLinkable< MIDIInputElementNote >::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: