Xeno-rat
Loading...
Searching...
No Matches
NAudio.Dsp.EnvelopeDetector Class Reference
Collaboration diagram for NAudio.Dsp.EnvelopeDetector:

Public Member Functions

 EnvelopeDetector ()
 
 EnvelopeDetector (double ms, double sampleRate)
 
double Run (double inValue, double state)
 Runs the attack or release process based on the input value and state, and returns the result.
 

Properties

double TimeConstant [get, set]
 
double SampleRate [get, set]
 

Private Member Functions

void SetCoef ()
 Sets the coefficient using the formula: e^(-1.0 / (0.001 * ms * sampleRate ))
 

Private Attributes

double sampleRate
 
double ms
 
double coeff
 

Constructor & Destructor Documentation

◆ EnvelopeDetector() [1/2]

NAudio.Dsp.EnvelopeDetector.EnvelopeDetector ( )
inline

◆ EnvelopeDetector() [2/2]

NAudio.Dsp.EnvelopeDetector.EnvelopeDetector ( double ms,
double sampleRate )
inline
Here is the call graph for this function:

Member Function Documentation

◆ Run()

double NAudio.Dsp.EnvelopeDetector.Run ( double inValue,
double state )
inline

Runs the attack or release process based on the input value and state, and returns the result.

Parameters
inValueThe input value to be processed.
stateThe state value used for processing.
Returns
The result of the attack or release process based on the input inValue and state .

This method determines whether to run the attack or release process based on the comparison between the input value inValue and the state value state . If the input value is greater than the state value, the attack process is executed using the attack.Run method; otherwise, the release process is executed using the release.Run method. The method assumes that a positive delta represents an attack, while a negative delta represents a release, and it is suitable for both linear and logarithmic values.

Here is the caller graph for this function:

◆ SetCoef()

void NAudio.Dsp.EnvelopeDetector.SetCoef ( )
inlineprivate

Sets the coefficient using the formula: e^(-1.0 / (0.001 * ms * sampleRate ))

This method calculates the coefficient using the formula: e^(-1.0 / (0.001 * ms * sampleRate )) and assigns the result to the private variable coeff .

Here is the caller graph for this function:

Member Data Documentation

◆ coeff

double NAudio.Dsp.EnvelopeDetector.coeff
private

◆ ms

double NAudio.Dsp.EnvelopeDetector.ms
private

◆ sampleRate

double NAudio.Dsp.EnvelopeDetector.sampleRate
private

Property Documentation

◆ SampleRate

double NAudio.Dsp.EnvelopeDetector.SampleRate
getset

◆ TimeConstant

double NAudio.Dsp.EnvelopeDetector.TimeConstant
getset

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