Functions
tEnvelopeFollower

Detects and returns the basic envelope of incoming audio data. More...

Functions

void tEnvelopeFollower_init (tEnvelopeFollower *const follower, float attackThreshold, float decayCoefficient, LEAF *const leaf)
 Initialize a tEnvelopeFollower to the default mempool of a LEAF instance. More...
 
void tEnvelopeFollower_initToPool (tEnvelopeFollower *const follower, float attackThreshold, float decayCoefficient, tMempool *const mempool)
 Initialize a tEnvelopeFollower to a specified mempool. More...
 
void tEnvelopeFollower_free (tEnvelopeFollower *const follower)
 Free a tEnvelopeFollower from its mempool. More...
 
float tEnvelopeFollower_tick (tEnvelopeFollower *const follower, float sample)
 Tick the tEnvelopeFollower. More...
 
void tEnvelopeFollower_setDecayCoefficient (tEnvelopeFollower *const follower, float decayCoefficient)
 Set the envelope decay coefficient. More...
 
void tEnvelopeFollower_setAttackThreshold (tEnvelopeFollower *const follower, float attackThreshold)
 Set the envelope attack threshold. More...
 

Detailed Description

Detects and returns the basic envelope of incoming audio data.

Function Documentation

◆ tEnvelopeFollower_init()

void tEnvelopeFollower_init ( tEnvelopeFollower *const  follower,
float  attackThreshold,
float  decayCoeff,
LEAF *const  leaf 
)

Initialize a tEnvelopeFollower to the default mempool of a LEAF instance.

Parameters
followerA pointer to the tEnvelopeFollower to initialize.
attackThresholdAmplitude threshold for determining an envelope onset. 0.0 to 1.0
decayCoefficientMultiplier to determine the envelope rate of decay. 0.0 to 1.0, above 0.95 recommended.
leafA pointer to the leaf instance.

◆ tEnvelopeFollower_initToPool()

void tEnvelopeFollower_initToPool ( tEnvelopeFollower *const  follower,
float  attackThreshold,
float  decayCoeff,
tMempool *const  mempool 
)

Initialize a tEnvelopeFollower to a specified mempool.

Parameters
followerA pointer to the tEnvelopeFollower to initialize.
attackThresholdAmplitude threshold for determining an envelope onset. 0.0 to 1.0
decayCoefficientMultiplier to determine the envelope rate of decay. 0.0 to 1.0, above 0.95 recommended.
mempoolA pointer to the tMempool to use.

◆ tEnvelopeFollower_free()

void tEnvelopeFollower_free ( tEnvelopeFollower *const  follower)

Free a tEnvelopeFollower from its mempool.

Parameters
followerA pointer to the tEnvelopeFollower to free.

◆ tEnvelopeFollower_tick()

float tEnvelopeFollower_tick ( tEnvelopeFollower *const  follower,
float  input 
)

Tick the tEnvelopeFollower.

Parameters
followerA pointer to the relevant tEnvelopeFollower.
inputThe input sample.
Returns
The envelope value.

◆ tEnvelopeFollower_setDecayCoefficient()

void tEnvelopeFollower_setDecayCoefficient ( tEnvelopeFollower *const  follower,
float  decayCoeff 
)

Set the envelope decay coefficient.

Parameters
followerA pointer to the relevant tEnvelopeFollower.
decayCoefficientMultiplier to determine the envelope rate of decay. 0.0 to 1.0, above 0.95 recommended.

◆ tEnvelopeFollower_setAttackThreshold()

void tEnvelopeFollower_setAttackThreshold ( tEnvelopeFollower *const  follower,
float  attackThresh 
)

Set the envelope attack threshold.

Parameters
followerA pointer to the relevant tEnvelopeFollower.
attackThresholdThe new threshold to determine envelope onset as an amplitude from 0.0 to 1.0