#include <Audio/AudioVU.hpp>
A VU meter that reads from an Audio stream using the Analyzer class.
Definition at line 16 of file AudioVU.hpp.
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. | |
Classes | |
| class | Analyzer |
| The AudioAnalyzePeak and AudioAnalyzeRMS classes don't implement a common interface, so we have to use our own RTTI wrapper to allow both classes to be used. More... | |
Public Member Functions | |
| template<class T> | |
| AudioVU (T &level, float gain=1.0, uint8_t max=255) | |
| Create a new AudioVU object. | |
| template<class T> | |
| AudioVU (T &level, MovingCoilBallistics ballistics, float gain=1.0, uint8_t max=255) | |
| Create a new AudioVU object. | |
| uint8_t | getValue () override |
| Get the value of the VU meter. | |
| float | getFloatValue () override |
| Get the value of the VU meter. | |
| bool | getOverload () override |
| void | setGain (float gain) |
| Set the gain for the VU meter. | |
| uint8_t | getMax () const |
| Get the maximum value that this VU meter can return. | |
Protected Attributes | |
| uint8_t | max |
| bool | alwaysDirty |
| bool | dirty = true |
Private Attributes | |
| MovingCoilBallistics | ballistics = MovingCoilBallistics::responsiveVU() |
| class AudioVU::Analyzer | level |
| float | gain |
|
inline |
Create a new AudioVU object.
| level | The Teensy Audio peak or RMS analyzer object. Note that it is kept by reference, so it must outlive the AudioVU instance. |
| gain | A multiplier to calibrate the VU meter. |
| max | The max output, or the length of the output scale: getValue will output a number in [0, max]. |
Definition at line 32 of file AudioVU.hpp.
|
inline |
Create a new AudioVU object.
| level | The Teensy Audio peak or RMS analyzer object. Note that it is kept by reference, so it must outlive the AudioVU instance. |
| ballistics | The dynamic model to use for the VU meter. |
| gain | A multiplier to calibrate the VU meter. |
| max | The max output, or the length of the output scale: getValue will output a number in [0, max]. |
Definition at line 51 of file AudioVU.hpp.
|
inlineoverridevirtual |
Get the value of the VU meter.
Implements IVU.
Definition at line 60 of file AudioVU.hpp.
|
inlineoverridevirtual |
Get the value of the VU meter.
Reimplemented from IVU.
Definition at line 70 of file AudioVU.hpp.
|
inlineoverridevirtual |
Implements IVU.
Definition at line 83 of file AudioVU.hpp.
|
inline |
Set the gain for the VU meter.
| gain | The new gain. |
Definition at line 91 of file AudioVU.hpp.
|
inlineinherited |
Check if the value was updated since the last time the dirty flag was cleared.
Definition at line 94 of file InterfaceMIDIInputElements.hpp.
|
inlineinherited |
Clear the dirty flag.
Definition at line 96 of file InterfaceMIDIInputElements.hpp.
|
inlineinherited |
Get the maximum value that this VU meter can return.
Definition at line 107 of file InterfaceMIDIInputElements.hpp.
|
private |
Definition at line 94 of file AudioVU.hpp.
|
private |
|
private |
Definition at line 135 of file AudioVU.hpp.
|
protectedinherited |
Definition at line 110 of file InterfaceMIDIInputElements.hpp.
|
protectedinherited |
Definition at line 111 of file InterfaceMIDIInputElements.hpp.
|
protectedinherited |
Definition at line 112 of file InterfaceMIDIInputElements.hpp.