Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Types | Public Member Functions | Public Attributes | List of all members
EnvelopeDetector Class Reference

Public Types

enum  ConstantMode { ANALOG = 0, DIGITAL = 1 }
 
enum  BranchingMode { DECOUPLING = 0, BRANCHING = 1 }
 
enum  DetectionMode { PEAK = 0, MS = 1, RMS = 2, PREPROCESSED = 3 }
 

Public Member Functions

 EnvelopeDetector (float attackTimeMs, float releaseTimeMs, float sampleRate, unsigned int constantMode=ANALOG, unsigned int branchingMode=BRANCHING, unsigned int detectionMode=PEAK, bool smooth=true)
 
int setup (float attackTimeMs, float releaseTimeMs, float sampleRate, unsigned int constantMode=ANALOG, unsigned int branchingMode=BRANCHING, unsigned int detectionMode=PEAK, bool smooth=true)
 
int cleanup ()
 
float process (float input)
 
void setAttackTime (float attackTimeMs)
 
float getAttackTime ()
 
void setReleaseTime (float releaseTimeMs)
 
float getReleaseTime ()
 
void setConstantMode (unsigned int mode)
 
unsigned int getConstantMode ()
 
void setBranchingMode (unsigned int mode)
 
unsigned int getBranchingMOde ()
 
void setDetectionMode (unsigned int mode)
 
unsigned getDetectionMode ()
 
void setSmooth (bool isSmooth)
 
bool getSmooth ()
 

Public Attributes

const float kTcAnalog = log(1/M_E)
 
const float kTcDigital = log(0.01)
 

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