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 | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Attributes | List of all members
MIDIInputElementNote Class Referenceabstract

Class for objects that listen for incoming MIDI Note events. More...

#include <MIDIInputElementNote.hpp>

Inheritance diagram for MIDIInputElementNote:
Collaboration diagram for MIDIInputElementNote:

Public Member Functions

virtual ~MIDIInputElementNote ()
 Destructor. More...
 
virtual void begin ()
 Initialize the input element. More...
 
virtual void reset ()
 Reset the input element to its initial state. 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

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

Protected Member Functions

 MIDIInputElementNote (const MIDICNChannelAddress &address)
 Constructor. More...
 

Protected Attributes

const MIDICNChannelAddress address
 
MIDIInputElementNotenext
 
MIDIInputElementNoteprevious
 

Private Member Functions

void moveDown ()
 Move down this element in the linked list of elements. More...
 
virtual bool updateImpl (const ChannelMessageMatcher &midimsg, const MIDICNChannelAddress &target)=0
 Update the internal state with the new MIDI message. More...
 
virtual MIDICNChannelAddress getTarget (const ChannelMessageMatcher &midimsg) const
 Extract the target address from a MIDI message. More...
 
virtual bool match (const MIDICNChannelAddress &target) const
 Check if the address of the incoming MIDI message matches an address of this element. More...
 

Static Private Attributes

static DoublyLinkedList< MIDIInputElementNoteelements
 

Detailed Description

Class for objects that listen for incoming MIDI Note events.

Definition at line 20 of file MIDIInputElementNote.hpp.

Constructor & Destructor Documentation

◆ MIDIInputElementNote()

MIDIInputElementNote::MIDIInputElementNote ( const MIDICNChannelAddress address)
inlineprotected

Constructor.

Todo:
Documentation.

Definition at line 27 of file MIDIInputElementNote.hpp.

◆ ~MIDIInputElementNote()

virtual MIDIInputElementNote::~MIDIInputElementNote ( )
inlinevirtual

Destructor.

Todo:
Documentation.

Definition at line 38 of file MIDIInputElementNote.hpp.

Member Function Documentation

◆ beginAll()

static void MIDIInputElementNote::beginAll ( )
inlinestatic

Initialize all MIDIInputElementNote elements.

See also
MIDIInputElementNote::begin

Definition at line 48 of file MIDIInputElementNote.hpp.

◆ updateAll()

static void MIDIInputElementNote::updateAll ( )
inlinestatic

Update all MIDIInputElementNote elements.

See also
MIDIInputElementNote::update

Definition at line 59 of file MIDIInputElementNote.hpp.

◆ resetAll()

static void MIDIInputElementNote::resetAll ( )
inlinestatic

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)
inlinestatic

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 ( )
inlineprivate

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.

◆ begin()

virtual void MIDIInputElement::begin ( )
inlinevirtualinherited

Initialize the input element.

Reimplemented in MCU::VPotRing_Base< NumValues, Callback >, MCU::VPotRing_Base< NumBanks, Callback >, MCU::VPotRing_Base< 1, VPotRingLEDsCallback >, MCU::VPotRing_Base< NumBanks, VPotEmptyCallback >, MCU::VPotRing_Base< 1, VPotEmptyCallback >, MCU::VPotRing_Base< 1, Callback >, MCU::VPotRing_Base< NumBanks, VPotRingLEDsCallback >, 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 >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCFastLED< ColorMapper > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCFastLED< ColorMapper > >, GenericProgramChangeSelector< N, Callback >, GenericProgramChangeSelector< N >, and GenericProgramChangeSelector< N, SelectorLEDsCallback< N > >.

Definition at line 30 of file MIDIInputElement.hpp.

◆ reset()

virtual void MIDIInputElement::reset ( )
inlinevirtualinherited

Reset the input element to its initial state.

Reimplemented in MCU::VPotRing_Base< NumValues, Callback >, MCU::VPotRing_Base< NumBanks, Callback >, MCU::VPotRing_Base< 1, VPotRingLEDsCallback >, MCU::VPotRing_Base< NumBanks, VPotEmptyCallback >, MCU::VPotRing_Base< 1, VPotEmptyCallback >, MCU::VPotRing_Base< 1, Callback >, MCU::VPotRing_Base< NumBanks, VPotRingLEDsCallback >, 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 >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCFastLED< ColorMapper > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCFastLED< ColorMapper > >, MCU::SevenSegmentDisplay< LENGTH >, MCU::SevenSegmentDisplay< AssignmentDisplayLength >, MCU::SevenSegmentDisplay< TimeDisplayLength >, GenericProgramChangeSelector< N, Callback >, GenericProgramChangeSelector< N >, and GenericProgramChangeSelector< N, SelectorLEDsCallback< N > >.

Definition at line 33 of file MIDIInputElement.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.

◆ updateImpl()

virtual bool MIDIInputElement::updateImpl ( const ChannelMessageMatcher midimsg,
const MIDICNChannelAddress target 
)
privatepure virtualinherited

Update the internal state with the new MIDI message.

Implemented in MCU::VPotRing_Base< NumValues, Callback >, MCU::VU_Base< NumValues, Callback >, MCU::VPotRing_Base< NumBanks, Callback >, MCU::VPotRing_Base< 1, VPotRingLEDsCallback >, MCU::VPotRing_Base< NumBanks, VPotEmptyCallback >, MCU::VPotRing_Base< 1, VPotEmptyCallback >, MCU::VPotRing_Base< 1, Callback >, MCU::VPotRing_Base< NumBanks, VPotRingLEDsCallback >, 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 >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCFastLED< ColorMapper > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCFastLED< ColorMapper > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementCC, RangeLen, 1, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementNote, RangeLen, NumBanks, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCRangeEmptyCallback >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCLEDBarCallback< NumLEDs > >, NoteCCRange< MIDIInputElementCC, RangeLen, NumBanks, NoteCCLED< RangeLen > >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCLED< 1 > >, NoteCCRange< MIDIInputElementNote, RangeLen, 1, NoteCCFastLED< ColorMapper > >, MCU::SevenSegmentDisplay< LENGTH >, MCU::SevenSegmentDisplay< AssignmentDisplayLength >, MCU::SevenSegmentDisplay< TimeDisplayLength >, GenericProgramChangeSelector< N, Callback >, GenericProgramChangeSelector< N >, and GenericProgramChangeSelector< N, SelectorLEDsCallback< N > >.

◆ 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.

◆ match()

virtual bool MIDIInputElement::match ( const MIDICNChannelAddress target) const
inlineprivatevirtualinherited

Check if the address of the incoming MIDI message matches an address of this element.

Note
This base version of the function is only valid for non-Bankable MIDI input elements, it only matches if the address is equal to the address of this element.

Reimplemented in MCU::Bankable::GenericVU< NumBanks, Callback >, MCU::Bankable::GenericVU< NumBanks >, MCU::Bankable::GenericVU< NumBanks, VULEDsCallback< NumLEDs > >, MCU::Bankable::GenericVPotRing< NumBanks, Callback >, MCU::Bankable::GenericVPotRing< NumBanks >, MCU::Bankable::GenericVPotRing< NumBanks, VPotRingLEDsCallback >, Bankable::GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCFastLED< ColorMapper > >, Bankable::GenericNoteCCRange< MIDIInputElementCC, 1, NumBanks >, Bankable::GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCFastLED< ColorMapper > >, Bankable::GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCFastLED< ColorMapper > >, Bankable::GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLED< 1 > >, Bankable::GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCLED< RangeLen > >, Bankable::GenericNoteCCRange< MIDIInputElementNote, RangeLen, NumBanks >, Bankable::GenericNoteCCRange< MIDIInputElementNote, 1, NumBanks >, Bankable::GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, Bankable::GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLED< 1 > >, Bankable::GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCFastLED< ColorMapper > >, Bankable::GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, Bankable::GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCLED< RangeLen > >, Bankable::GenericNoteCCRange< MIDIInputElementCC, RangeLen, NumBanks >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, NoteCCFastLED< ColorMapper > >, GenericNoteCCRange< MIDIInputElementCC, 1, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen >, GenericNoteCCRange< MIDIInputElementNote, 1, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementNote, 1, NoteCCFastLED< ColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, NoteCCFastLED< ColorMapper > >, GenericNoteCCRange< MIDIInputElementCC, 1 >, GenericNoteCCRange< MIDIInputElementCC, 1, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementNote, 1 >, GenericNoteCCRange< MIDIInputElementCC, RangeLen >, GenericNoteCCRange< MIDIInputElementCC, 1, NoteCCFastLED< ColorMapper > >, MCU::SevenSegmentDisplay< LENGTH >, MCU::SevenSegmentDisplay< AssignmentDisplayLength >, and MCU::SevenSegmentDisplay< TimeDisplayLength >.

Definition at line 75 of file MIDIInputElement.hpp.

Member Data Documentation

◆ elements

DoublyLinkedList< MIDIInputElementNote > MIDIInputElementNote::elements
staticprivate

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.


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