Gin
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EnvelopeDetector Class Reference

EnvelopeDetector for Dynamics. More...

Public Types

enum  Mode { peak , ms , rms }
 

Public Member Functions

 EnvelopeDetector ()=default
 
 ~EnvelopeDetector ()=default
 
void setSampleRate (double f)
 
void setParams (float attackS, float holdS, float releaseS, bool analogTC, Mode detect, bool logDetector)
 
void reset ()
 
float process (float input)
 

Protected Member Functions

void setAttackTime (float attackS)
 
void setHoldTime (float holdS)
 
void setReleaseTime (float releaseS)
 

Protected Attributes

double sampleRate = 44100.0
 
Mode mode = peak
 
float attackTime = 0.0f
 
float releaseTime = 0.0f
 
float envelope = 0.0
 
float holdTime = 0.0f
 
float holdRemaining = 0.0f
 
bool analogTC = false
 
bool logDetector = false
 

Detailed Description

EnvelopeDetector for Dynamics.

Member Enumeration Documentation

◆ Mode

Enumerator
peak 
ms 
rms 

Constructor & Destructor Documentation

◆ EnvelopeDetector()

EnvelopeDetector::EnvelopeDetector ( )
default

◆ ~EnvelopeDetector()

EnvelopeDetector::~EnvelopeDetector ( )
default

Member Function Documentation

◆ setSampleRate()

void EnvelopeDetector::setSampleRate ( double  f)

References sampleRate.

◆ setParams()

void EnvelopeDetector::setParams ( float  attackS,
float  holdS,
float  releaseS,
bool  analogTC,
Mode  detect,
bool  logDetector 
)

◆ reset()

void EnvelopeDetector::reset ( )

◆ process()

float EnvelopeDetector::process ( float  input)

◆ setAttackTime()

void EnvelopeDetector::setAttackTime ( float  attackS)
protected

◆ setHoldTime()

void EnvelopeDetector::setHoldTime ( float  holdS)
protected

◆ setReleaseTime()

void EnvelopeDetector::setReleaseTime ( float  releaseS)
protected

Member Data Documentation

◆ sampleRate

double EnvelopeDetector::sampleRate = 44100.0
protected

Referenced by setSampleRate().

◆ mode

Mode EnvelopeDetector::mode = peak
protected

◆ attackTime

float EnvelopeDetector::attackTime = 0.0f
protected

◆ releaseTime

float EnvelopeDetector::releaseTime = 0.0f
protected

◆ envelope

float EnvelopeDetector::envelope = 0.0
protected

◆ holdTime

float EnvelopeDetector::holdTime = 0.0f
protected

◆ holdRemaining

float EnvelopeDetector::holdRemaining = 0.0f
protected

◆ analogTC

bool EnvelopeDetector::analogTC = false
protected

◆ logDetector

bool EnvelopeDetector::logDetector = false
protected

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