This is an old version of the documentation. View the latest version here.
Control Surface  1.0.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
NoteValueLED Class Reference

#include <NoteCCRangeLEDs.hpp>

Inheritance diagram for NoteValueLED:
Collaboration diagram for NoteValueLED:

Public Member Functions

 NoteValueLED (pin_t ledPin, MIDICNChannelAddress address)
 
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

NoteCCLED< 1 > 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

Examples
1.Note-LED.ino, 2.First-Input.ino, Debug-MIDI-Interface.ino, and Dual-MIDI-Interface.ino.

Definition at line 44 of file NoteCCRangeLEDs.hpp.

Constructor & Destructor Documentation

◆ NoteValueLED()

NoteValueLED::NoteValueLED ( pin_t  ledPin,
MIDICNChannelAddress  address 
)
inline

Definition at line 47 of file NoteCCRangeLEDs.hpp.

Member Function Documentation

◆ match()

bool GenericNoteCCRange< MIDIInputElementNote , RangeLen, NoteCCLED< 1 > >::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, NoteCCLED< 1 > >::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, NoteCCLED< 1 > >::begin ( )
inlineoverridevirtualinherited

Initialize.

Reimplemented from MIDIInputElement.

Definition at line 57 of file NoteCCRange.hpp.

◆ reset()

void NoteCCRange< MIDIInputElementNote , RangeLen, NumBanks, NoteCCLED< 1 > >::reset ( )
inlineoverridevirtualinherited

Reset all values to zero.

Reimplemented from MIDIInputElement.

Definition at line 59 of file NoteCCRange.hpp.

◆ updateImpl()

bool NoteCCRange< MIDIInputElementNote , RangeLen, NumBanks, NoteCCLED< 1 > >::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, NoteCCLED< 1 > >::getValueFromMIDIMessage ( const ChannelMessageMatcher midimsg)
inlinestaticprivateinherited

Definition at line 77 of file NoteCCRange.hpp.

◆ getSelection()

virtual uint8_t NoteCCRange< MIDIInputElementNote , RangeLen, NumBanks, NoteCCLED< 1 > >::getSelection ( ) const
inlineprivatevirtualinherited

Get the active bank selection.

Definition at line 82 of file NoteCCRange.hpp.

◆ getBankIndex()

virtual setting_t NoteCCRange< MIDIInputElementNote , RangeLen, NumBanks, NoteCCLED< 1 > >::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, NoteCCLED< 1 > >::getRangeIndex ( MIDICNChannelAddress  target) const
inlineprivatevirtualinherited

Definition at line 90 of file NoteCCRange.hpp.

◆ length() [1/2]

constexpr static uint8_t NoteCCRange< MIDIInputElementNote , RangeLen, NumBanks, NoteCCLED< 1 > >::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 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, NoteCCLED< 1 > >::values
privateinherited

Definition at line 94 of file NoteCCRange.hpp.

◆ callback

NoteCCLED< 1 > NoteCCRange< MIDIInputElementNote , RangeLen, NumBanks, NoteCCLED< 1 > >::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 301 of file LinkedList.hpp.

◆ previous

MIDIInputElementNote * DoublyLinkable< MIDIInputElementNote >::previous
protectedinherited

Definition at line 302 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: