Control Surface main
MIDI Control Surface library for Arduino
Public Member Functions | Protected Attributes | List of all members
IVU Class Referenceabstract

#include <MIDI_Inputs/InterfaceMIDIInputElements.hpp>

Detailed Description

An abstract interface for VU meters.

To allow for both floating point values and integers, all values are integers under the hood.

Using floats instead integers would be a strange choice as LED bar VU meters have discrete levels.
Continuous "analog" VU meters can use or override the getFloatValue() method.

Definition at line 87 of file InterfaceMIDIInputElements.hpp.

+ Inheritance diagram for IVU:
+ Collaboration diagram for IVU:

Detecting changes

bool getDirty () const
 Check if the value was updated since the last time the dirty flag was cleared. More...
 
void clearDirty ()
 Clear the dirty flag. More...
 

Public Member Functions

 IVU (uint8_t max, bool alwaysDirty=false)
 
virtual uint8_t getValue ()=0
 Return the VU meter value as an integer. More...
 
virtual bool getOverload ()=0
 Return the overload status. 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...
 

Protected Attributes

uint8_t max
 
bool alwaysDirty
 
bool dirty = true
 

Constructor & Destructor Documentation

◆ IVU()

IVU ( uint8_t  max,
bool  alwaysDirty = false 
)
inline

Definition at line 89 of file InterfaceMIDIInputElements.hpp.

Member Function Documentation

◆ getDirty()

bool getDirty ( ) const
inline

Check if the value was updated since the last time the dirty flag was cleared.

Definition at line 97 of file InterfaceMIDIInputElements.hpp.

◆ clearDirty()

void clearDirty ( )
inline

Clear the dirty flag.

Definition at line 99 of file InterfaceMIDIInputElements.hpp.

◆ getValue()

virtual uint8_t getValue ( )
pure virtual

Return the VU meter value as an integer.

Implemented in AudioVU, VU, and VU< BankSize >.

◆ getOverload()

virtual bool getOverload ( )
pure virtual

Return the overload status.

Implemented in AudioVU, VU, and VU< BankSize >.

◆ getFloatValue()

virtual float getFloatValue ( )
inlinevirtual

Get the VU meter value as a floating point number.

Reimplemented in AudioVU, and VU< BankSize >.

Definition at line 108 of file InterfaceMIDIInputElements.hpp.

◆ getMax()

uint8_t getMax ( ) const
inline

Get the maximum value that this VU meter can return.

Definition at line 110 of file InterfaceMIDIInputElements.hpp.

Member Data Documentation

◆ max

uint8_t max
protected

Definition at line 113 of file InterfaceMIDIInputElements.hpp.

◆ alwaysDirty

bool alwaysDirty
protected

Definition at line 114 of file InterfaceMIDIInputElements.hpp.

◆ dirty

bool dirty = true
protected

Definition at line 115 of file InterfaceMIDIInputElements.hpp.


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