A MIDI input element that represents a Mackie Control Universal VU meter. More...
#include <MIDI_Inputs/MCU/VU.hpp>
Public Member Functions | |
void | begin () override |
Initialize. More... | |
void | reset () override |
Reset all values to zero. More... | |
uint8_t | getValue () override |
Return the VU meter value as an integer in [0, 12]. More... | |
bool | getOverload () override |
Return the overload status. More... | |
void | update () override |
Update is called periodically, it decays the meter if the time is right. More... | |
bool | updateWith (const ChannelMessageMatcher &midimsg) |
Receive a new MIDI message and update the internal state. More... | |
virtual float | getFloatValue () |
Get the VU meter value as a floating point number. More... | |
uint8_t | getMax () const |
Get the maximum value that this VU meter can return. More... | |
Static Public Member Functions | |
static void | beginAll () |
static void | resetAll () |
Reset all MIDIInputElementChannelPressure elements to their initial state. More... | |
static void | updateAll () |
Update all MIDIInputElementChannelPressure elements. More... | |
static void | updateAllWith (const ChannelMessageMatcher &midimsg) |
Update all MIDIInputElementChannelPressure elements with a new MIDI message. More... | |
Public Attributes | |
Callback | callback |
Protected Member Functions | |
VU_Base (uint8_t track, const MIDIChannelCN &channelCN, unsigned int decayTime, const Callback &callback) | |
Protected Attributes | |
const MIDIAddress | address |
MIDIInputElementChannelPressure * | next |
MIDIInputElementChannelPressure * | previous |
const uint8_t | max |
Private Member Functions | |
bool | updateImpl (const ChannelMessageMatcher &midimsg, const MIDIAddress &target) override |
Called when an incoming MIDI message matches this element. More... | |
MIDIAddress | getTarget (const ChannelMessageMatcher &midimsg) const override |
The address of the VU meter is the high nibble of the first (and only) data byte. More... | |
void | decay () |
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 | setValue (uint8_t index, uint8_t newValue) |
Set the VU meter value. More... | |
void | setOverload (uint8_t index) |
Set the overload status. More... | |
void | clearOverload (uint8_t index) |
Clear the overload status. More... | |
uint8_t | getValue (uint8_t index) const |
Get the VU meter value from the raw value. More... | |
bool | getOverload (uint8_t index) const |
Get the overload status value from the raw value. More... | |
void | moveDown () |
Move down this element in the linked list of elements. More... | |
virtual bool | match (const MIDIAddress &target) const |
Check if the address of the incoming MIDI message matches an address of this element. More... | |
Private Attributes | |
Array< uint8_t, NumValues > | values = {{}} |
unsigned int | decayTime |
unsigned long | prevDecayTime = 0 |
Static Private Attributes | |
static DoublyLinkedList< MIDIInputElementChannelPressure > | elements |
A MIDI input element that represents a Mackie Control Universal VU meter.
This is a base class to both the Bankable and non-Bankable version.
In the Mackie Control Universal protocol, VU meters are updated using Channel Pressure events.
Each device (cable number) has eight VU meters for the eight tracks. Only MIDI channel 1 is used in the original protocol.
The format of the MIDI message is as follows:
| 1101 cccc | 0hhh llll |
1101
(or 0xD
) is the status for Channel Pressure eventscccc
is the MIDI channelhhh
is the track index [0-7]llll
is the level of the VU meterIf the level is 0x0
, the meter is at 0%, if it's 0xC
, the meter is at 100%.
0xD
is an invalid value.
0xE
sets the overload indicator, and 0xF
clears the overload indicator.
|
inlineprotected |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Reset all values to zero.
Reimplemented from MIDIInputElement.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Update is called periodically, it decays the meter if the time is right.
Reimplemented from MIDIInputElement.
|
inlineoverrideprivatevirtual |
Called when an incoming MIDI message matches this element.
Implements MIDIInputElement.
|
inlineoverrideprivatevirtual |
The address of the VU meter is the high nibble of the first (and only) data byte.
Reimplemented from MIDIInputElement.
|
inlineprivatevirtual |
Get the active bank selection.
Reimplemented in GenericVU< NumBanks >, and GenericVU< NumBanks, VULEDsCallback< NumLEDs > >.
|
inlineprivatevirtual |
Get the bank index from a MIDI address.
Reimplemented in GenericVU< NumBanks, Callback >, GenericVU< NumBanks >, and GenericVU< NumBanks, VULEDsCallback< NumLEDs > >.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlinestaticinherited |
Definition at line 44 of file MIDIInputElementChannelPressure.hpp.
|
inlinestaticinherited |
Reset all MIDIInputElementChannelPressure elements to their initial state.
Definition at line 56 of file MIDIInputElementChannelPressure.hpp.
|
inlinestaticinherited |
Update all MIDIInputElementChannelPressure elements.
Definition at line 65 of file MIDIInputElementChannelPressure.hpp.
|
inlinestaticinherited |
Update all MIDIInputElementChannelPressure elements with a new MIDI message.
Definition at line 77 of file MIDIInputElementChannelPressure.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 105 of file MIDIInputElementChannelPressure.hpp.
|
inlineinherited |
Receive a new MIDI message and update the internal state.
Definition at line 39 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.
|
inlinevirtualinherited |
|
inlineinherited |
|
staticprivateinherited |
Definition at line 110 of file MIDIInputElementChannelPressure.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.