Control Surface master
MIDI Control Surface library for Arduino
Public Types | Public Member Functions | Public Attributes | List of all members
VUState Struct Reference

#include <MIDI_Inputs/MCU/VU.hpp>

Detailed Description

Struct that keeps track of the value and overload indicator of a Mackie Control Universal VU meter.

Definition at line 13 of file VU.hpp.

+ Collaboration diagram for VUState:

Public Types

enum  Changed { NothingChanged = 0 , ValueChanged = 1 , OverloadChanged = 2 }
 

Public Member Functions

 VUState (uint8_t value=0, bool overload=false)
 Constructor. More...
 
Changed update (uint8_t data)
 Update the value or overload status with a new raw MIDI value. More...
 
bool decay ()
 Decay the VU value: subtract one from the position if it is not zero. More...
 

Public Attributes

uint8_t value: 4
 The value of the VU meter [0, 12]. More...
 
bool overload: 1
 The state of the overload indicator. More...
 

Member Enumeration Documentation

◆ Changed

enum Changed
Enumerator
NothingChanged 
ValueChanged 
OverloadChanged 

Definition at line 28 of file VU.hpp.

Constructor & Destructor Documentation

◆ VUState()

VUState ( uint8_t  value = 0,
bool  overload = false 
)
inline

Constructor.

Parameters
valueThe value of the VU meter [0, 12].
overloadThe state of the overload indicator.

Definition at line 22 of file VU.hpp.

Member Function Documentation

◆ update()

Changed update ( uint8_t  data)
inline

Update the value or overload status with a new raw MIDI value.

Parameters
dataThe raw 4-bit MIDI data (with track number masked out).
Return values
ValueChangedThe VU meter value has changed.
OverloadChangedThe overload status has changed.
NothingChangedNeither the value nor overload status has changed.

Definition at line 47 of file VU.hpp.

◆ decay()

bool decay ( )
inline

Decay the VU value: subtract one from the position if it is not zero.

Returns
Returns true if the value changed.

Definition at line 72 of file VU.hpp.

Member Data Documentation

◆ value

uint8_t value

The value of the VU meter [0, 12].

Definition at line 25 of file VU.hpp.

◆ overload

bool overload

The state of the overload indicator.

Definition at line 26 of file VU.hpp.


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