A VU meter that reads from an Audio stream using the Analyzer class.  
 More...
#include <AudioVU.hpp>
 | 
| 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...
  | 
|   | 
A VU meter that reads from an Audio stream using the Analyzer class. 
- Examples
 - 2.VU-Meter-OLED-USB-DAC.ino.
 
Definition at line 16 of file AudioVU.hpp.
 
◆ AudioVU() [1/2]
template<class T > 
  
  
      
        
          | AudioVU::AudioVU  | 
          ( | 
          T &  | 
          level,  | 
         
        
           | 
           | 
          float  | 
          gain = 1.0,  | 
         
        
           | 
           | 
          uint8_t  | 
          max = 255  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Create a new AudioVU object. 
- Parameters
 - 
  
    | 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.
 
 
◆ AudioVU() [2/2]
template<class T > 
  
  
      
        
          | AudioVU::AudioVU  | 
          ( | 
          T &  | 
          level,  | 
         
        
           | 
           | 
          MovingCoilBallistics  | 
          ballistics,  | 
         
        
           | 
           | 
          float  | 
          gain = 1.0,  | 
         
        
           | 
           | 
          uint8_t  | 
          max = 255  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Create a new AudioVU object. 
- Parameters
 - 
  
    | 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.
 
 
◆ getValue()
  
  
      
        
          | uint8_t AudioVU::getValue  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Get the value of the VU meter. 
- Returns
 - A value in [0, max] 
 
Implements IVU.
Definition at line 60 of file AudioVU.hpp.
 
 
◆ getFloatValue()
  
  
      
        
          | float AudioVU::getFloatValue  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Get the value of the VU meter. 
- Returns
 - A value in [0.0, 1.0] 
 
Reimplemented from IVU.
Definition at line 70 of file AudioVU.hpp.
 
 
◆ getOverload()
  
  
      
        
          | bool AudioVU::getOverload  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
- Note
 - This function will always return false for an AudioVU. 
 
Implements IVU.
Definition at line 83 of file AudioVU.hpp.
 
 
◆ setGain()
  
  
      
        
          | void AudioVU::setGain  | 
          ( | 
          float  | 
          gain | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ getMax()
  
  
      
        
          | uint8_t IVU::getMax  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get the maximum value that this VU meter can return. 
Definition at line 30 of file VU.hpp.
 
 
◆ ballistics
◆ level
◆ gain
◆ max
The documentation for this class was generated from the following file: