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

An abstract interface for VU meters. More...

#include <VU.hpp>

Inheritance diagram for IVU:
Collaboration diagram for IVU:

Public Member Functions

 IVU (uint8_t max)
 
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

const uint8_t max
 

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 20 of file VU.hpp.

Constructor & Destructor Documentation

◆ IVU()

IVU::IVU ( uint8_t  max)
inline

Definition at line 22 of file VU.hpp.

Member Function Documentation

◆ getValue()

virtual uint8_t IVU::getValue ( )
pure virtual

◆ getOverload()

virtual bool IVU::getOverload ( )
pure virtual

◆ getFloatValue()

virtual float IVU::getFloatValue ( )
inlinevirtual

Get the VU meter value as a floating point number.

Reimplemented in AudioVU.

Definition at line 28 of file VU.hpp.

◆ getMax()

uint8_t IVU::getMax ( ) const
inline

Get the maximum value that this VU meter can return.

Definition at line 30 of file VU.hpp.

Member Data Documentation

◆ max

const uint8_t IVU::max
protected

Definition at line 33 of file VU.hpp.


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