#include <MIDI_Inputs/MCU/VPotRing.hpp>
Public Member Functions | |
void | begin () override |
Initialize. More... | |
void | reset () override |
Reset all values to zero. 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... | |
uint8_t | getPosition () const |
Return the position of the V-Pot ring. [0, 11]. More... | |
bool | getCenterLed () const |
Return the status of the center LED of the V-Pot ring. More... | |
uint8_t | getMode () const |
Return the mode of the V-Pot ring: 0 = single dot, 1 = boost/cut, 2 = wrap, 3 = spread. More... | |
uint8_t | getStartOn () const |
Get the first segment that should be on. More... | |
uint8_t | getStartOff () const |
Get the first segment that should be off. More... | |
Static Public Member Functions | |
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 | |
Callback | callback |
Protected Member Functions | |
VPotRing_Base (uint8_t track, const MIDIChannelCN &channelCN, const Callback &callback) | |
Static Protected Member Functions | |
static uint8_t | sanitizeValue (uint8_t value) |
Make sure that the received value is valid and will not result in array out of bounds conditions. More... | |
Protected Attributes | |
const MIDIAddress | address |
MIDIInputElementCC * | next |
MIDIInputElementCC * | previous |
Private Member Functions | |
bool | updateImpl (const ChannelMessageMatcher &midimsg, const MIDIAddress &target) override |
Update the internal state with the new MIDI message. More... | |
uint8_t | getValue () const override |
virtual uint8_t | getSelection () const |
Get the active bank selection. More... | |
virtual setting_t | getBankIndex (const MIDIAddress &target) const |
Get the bank index from a MIDI address. More... | |
void | moveDown () |
Move down this element in the linked list of elements. More... | |
virtual MIDIAddress | getTarget (const ChannelMessageMatcher &midimsg) const |
Extract the target address from a MIDI message. More... | |
virtual bool | match (const MIDIAddress &target) const |
Check if the address of the incoming MIDI message matches an address of this element. More... | |
Static Private Member Functions | |
static uint8_t | getPosition (uint8_t value) |
Extract the position from the raw value. More... | |
static bool | getCenterLed (uint8_t value) |
Extract the center LED state from the raw value. More... | |
static uint8_t | getMode (uint8_t value) |
Extract the mode from the raw value. More... | |
Private Attributes | |
Array< uint8_t, NumValues > | values = {{}} |
Static Private Attributes | |
static DoublyLinkedList< MIDIInputElementCC > | elements |
Definition at line 83 of file VPotRing.hpp.
|
inlineprotected |
Definition at line 85 of file VPotRing.hpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Reset all values to zero.
Reimplemented from MIDIInputElement.
Definition at line 95 of file VPotRing.hpp.
|
inlinestaticprotected |
Make sure that the received value is valid and will not result in array out of bounds conditions.
Definition at line 105 of file VPotRing.hpp.
|
inlineoverrideprivatevirtual |
Update the internal state with the new MIDI message.
Implements MIDIInputElement.
Definition at line 110 of file VPotRing.hpp.
|
inlineoverrideprivatevirtual |
Implements IVPotRing.
Definition at line 120 of file VPotRing.hpp.
|
inlineprivatevirtual |
Get the active bank selection.
Reimplemented in GenericVPotRing< NumBanks >, and GenericVPotRing< NumBanks, VPotRingLEDsCallback >.
Definition at line 123 of file VPotRing.hpp.
|
inlineprivatevirtual |
Get the bank index from a MIDI address.
Reimplemented in GenericVPotRing< NumBanks, Callback >, GenericVPotRing< NumBanks >, and GenericVPotRing< NumBanks, VPotRingLEDsCallback >.
Definition at line 126 of file VPotRing.hpp.
|
inlinestaticinherited |
Initialize all MIDIInputElementCC elements.
Definition at line 52 of file MIDIInputElementCC.hpp.
|
inlinestaticinherited |
Update all MIDIInputElementCC elements.
Definition at line 60 of file MIDIInputElementCC.hpp.
|
inlinestaticinherited |
Reset all MIDIInputElementCC elements to their initial state.
Definition at line 68 of file MIDIInputElementCC.hpp.
|
inlinestaticinherited |
Update all MIDIInputElementCC elements with a new MIDI message.
Definition at line 76 of file MIDIInputElementCC.hpp.
|
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 94 of file MIDIInputElementCC.hpp.
|
inlinevirtualinherited |
Update the value of the input element. Used for decaying VU meters etc.
Reimplemented in VU_Base< NumValues, Callback >, VU_Base< NumBanks, VULEDsCallback< NumLEDs > >, VU_Base< NumBanks, VUEmptyCallback >, VU_Base< 1, VUEmptyCallback >, and VU_Base< 1, VULEDsCallback< NumLEDs > >.
Definition at line 36 of file MIDIInputElement.hpp.
|
inlineinherited |
Receive a new MIDI message and update the internal state.
Definition at line 39 of file MIDIInputElement.hpp.
|
inlineprivatevirtualinherited |
Extract the target address from a MIDI message.
Reimplemented in MIDIInputElementPC, MIDIInputElementChannelPressure, VU_Base< NumValues, Callback >, VU_Base< NumBanks, VULEDsCallback< NumLEDs > >, VU_Base< NumBanks, VUEmptyCallback >, VU_Base< 1, VUEmptyCallback >, and VU_Base< 1, VULEDsCallback< NumLEDs > >.
Definition at line 63 of file MIDIInputElement.hpp.
|
inlineprivatevirtualinherited |
Check if the address of the incoming MIDI message matches an address of this element.
Reimplemented in GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCFastLEDCallback< DefaultColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCFastLEDCallback< DefaultColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCFastLEDCallback< DefaultColorMapper > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCFastLEDCallback< DefaultColorMapper > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementCC, 1, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, NoteCCFastLEDCallback< DefaultColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, 1, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementCC, 1, NoteCCFastLEDCallback< DefaultColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, 1, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, NoteCCFastLEDCallback< DefaultColorMapper > >, GenericNoteCCRange< MIDIInputElementCC, 1, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, NoteCCFastLEDCallback< DefaultColorMapper > >, GenericVU< NumBanks, Callback >, GenericVU< NumBanks >, GenericVU< NumBanks, VULEDsCallback< NumLEDs > >, GenericVPotRing< NumBanks, Callback >, GenericVPotRing< NumBanks >, GenericVPotRing< NumBanks, VPotRingLEDsCallback >, SevenSegmentDisplay< LENGTH >, SevenSegmentDisplay< AssignmentDisplayLength >, and SevenSegmentDisplay< TimeDisplayLength >.
Definition at line 78 of file MIDIInputElement.hpp.
|
inlineinherited |
Return the position of the V-Pot ring. [0, 11].
Definition at line 32 of file VPotRing.hpp.
|
inlinestaticprivateinherited |
Extract the position from the raw value.
Definition at line 72 of file VPotRing.hpp.
|
inlineinherited |
Return the status of the center LED of the V-Pot ring.
Definition at line 34 of file VPotRing.hpp.
|
inlinestaticprivateinherited |
Extract the center LED state from the raw value.
Definition at line 77 of file VPotRing.hpp.
|
inlineinherited |
Return the mode of the V-Pot ring: 0 = single dot, 1 = boost/cut, 2 = wrap, 3 = spread.
Definition at line 37 of file VPotRing.hpp.
|
inlinestaticprivateinherited |
Extract the mode from the raw value.
Definition at line 79 of file VPotRing.hpp.
|
inlineinherited |
Get the first segment that should be on.
Definition at line 40 of file VPotRing.hpp.
|
inlineinherited |
Get the first segment that should be off.
Definition at line 56 of file VPotRing.hpp.
|
private |
Definition at line 131 of file VPotRing.hpp.
Callback callback |
Definition at line 134 of file VPotRing.hpp.
|
staticprivateinherited |
Definition at line 99 of file MIDIInputElementCC.hpp.
|
protectedinherited |
Definition at line 83 of file MIDIInputElement.hpp.
|
protectedinherited |
Definition at line 323 of file LinkedList.hpp.
|
protectedinherited |
Definition at line 324 of file LinkedList.hpp.