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 | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
GenericNoteCCRange< MIDIInput_t, RangeLen, Callback > Class Template Reference

#include <NoteCCRange.hpp>

Inheritance diagram for GenericNoteCCRange< MIDIInput_t, RangeLen, Callback >:
Collaboration diagram for GenericNoteCCRange< MIDIInput_t, RangeLen, Callback >:

Public Member Functions

 GenericNoteCCRange (MIDICNChannelAddress address, const Callback &callback)
 
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
 

Static Public Member Functions

constexpr static uint8_t length ()
 

Public Attributes

Callback callback
 

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
 

Static Private Member Functions

static uint8_t getValueFromMIDIMessage (const ChannelMessageMatcher &midimsg)
 

Private Attributes

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

Detailed Description

template<class MIDIInput_t, uint8_t RangeLen, class Callback = NoteCCRangeEmptyCallback>
class GenericNoteCCRange< MIDIInput_t, RangeLen, Callback >

Definition at line 105 of file NoteCCRange.hpp.

Constructor & Destructor Documentation

◆ GenericNoteCCRange()

template<class MIDIInput_t, uint8_t RangeLen, class Callback = NoteCCRangeEmptyCallback>
GenericNoteCCRange< MIDIInput_t, RangeLen, Callback >::GenericNoteCCRange ( MIDICNChannelAddress  address,
const Callback &  callback 
)
inline

Definition at line 108 of file NoteCCRange.hpp.

Member Function Documentation

◆ match()

template<class MIDIInput_t, uint8_t RangeLen, class Callback = NoteCCRangeEmptyCallback>
bool GenericNoteCCRange< MIDIInput_t, RangeLen, Callback >::match ( const MIDICNChannelAddress target) const
inlineoverrideprivate

Check if the address of the incoming MIDI message is within the range of addresses of this element.

Definition at line 114 of file NoteCCRange.hpp.

◆ getValue() [1/4]

uint8_t NoteCCRange< MIDIInput_t, RangeLen, NumBanks, Callback >::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< MIDIInput_t, RangeLen, NumBanks, Callback >::begin ( )
inlineoverrideinherited

Initialize.

Definition at line 57 of file NoteCCRange.hpp.

◆ reset()

void NoteCCRange< MIDIInput_t, RangeLen, NumBanks, Callback >::reset ( )
inlineoverrideinherited

Reset all values to zero.

Definition at line 59 of file NoteCCRange.hpp.

◆ updateImpl()

bool NoteCCRange< MIDIInput_t, RangeLen, NumBanks, Callback >::updateImpl ( const ChannelMessageMatcher midimsg,
const MIDICNChannelAddress target 
)
inlineoverrideprivateinherited

Definition at line 65 of file NoteCCRange.hpp.

◆ getValueFromMIDIMessage()

static uint8_t NoteCCRange< MIDIInput_t, RangeLen, NumBanks, Callback >::getValueFromMIDIMessage ( const ChannelMessageMatcher midimsg)
inlinestaticprivateinherited

Definition at line 77 of file NoteCCRange.hpp.

◆ getSelection()

virtual uint8_t NoteCCRange< MIDIInput_t, RangeLen, NumBanks, Callback >::getSelection ( ) const
inlineprivatevirtualinherited

Get the active bank selection.

Definition at line 82 of file NoteCCRange.hpp.

◆ getBankIndex()

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

Definition at line 90 of file NoteCCRange.hpp.

◆ length() [1/2]

constexpr static uint8_t NoteCCRange< MIDIInput_t, RangeLen, NumBanks, Callback >::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.

Member Data Documentation

◆ values

Array<Array<uint8_t, RangeLen>, NumBanks> NoteCCRange< MIDIInput_t, RangeLen, NumBanks, Callback >::values
privateinherited

Definition at line 94 of file NoteCCRange.hpp.

◆ callback

Callback NoteCCRange< MIDIInput_t, RangeLen, NumBanks, Callback >::callback
inherited

Definition at line 97 of file NoteCCRange.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: