Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
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 84 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.
 
void clearDirty ()
 Clear the dirty flag.
 

Public Member Functions

 IVU (uint8_t max, bool alwaysDirty=false)
 
virtual uint8_t getValue ()=0
 Return the VU meter value as an integer.
 
virtual bool getOverload ()=0
 Return the overload status.
 
virtual float getFloatValue ()
 Get the VU meter value as a floating point number.
 
uint8_t getMax () const
 Get the maximum value that this VU meter can return.
 

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 86 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 94 of file InterfaceMIDIInputElements.hpp.

◆ clearDirty()

void clearDirty ( )
inline

Clear the dirty flag.

Definition at line 96 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 105 of file InterfaceMIDIInputElements.hpp.

◆ getMax()

uint8_t getMax ( ) const
inline

Get the maximum value that this VU meter can return.

Definition at line 107 of file InterfaceMIDIInputElements.hpp.

Member Data Documentation

◆ max

uint8_t max
protected

Definition at line 110 of file InterfaceMIDIInputElements.hpp.

◆ alwaysDirty

bool alwaysDirty
protected

Definition at line 111 of file InterfaceMIDIInputElements.hpp.

◆ dirty

bool dirty = true
protected

Definition at line 112 of file InterfaceMIDIInputElements.hpp.


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