Class daisysp::Adsr¶
#include <adsr.h>
Public Functions¶
Type | Name |
---|---|
Adsr () |
|
uint8_t | GetCurrentSegment () |
void | Init (float sample_rate, int blockSize=1) |
bool | IsRunning () const |
float | Process (bool gate) |
void | Retrigger (bool hard) |
void | SetAttackTime (float timeInS, float shape=0.0f) |
void | SetDecayTime (float timeInS) |
void | SetReleaseTime (float timeInS) |
void | SetSustainLevel (float sus_level) |
void | SetTime (int seg, float time) |
~Adsr () |
Detailed Description¶
adsr envelope module
Original author(s) : Paul Batchelor
Ported from Soundpipe by Ben Sergentanis, May 2020
Remake by Steffan DIedrichsen, May 2021
Public Functions Documentation¶
function Adsr¶
function GetCurrentSegment¶
get the current envelope segment
Returns:
the segment of the envelope that the phase is currently located in.
function Init¶
Initializes the Adsr module.
Parameters:
sample_rate
- The sample rate of the audio engine being run.
function IsRunning¶
Tells whether envelope is active
Returns:
true if the envelope is currently in any stage apart from idle.
function Process¶
Processes one sample through the filter and returns one sample.
Parameters:
gate
- trigger the envelope, hold it to sustain
function Retrigger¶
\function Retrigger forces the envelope back to attack phase
Parameters:
hard
resets the history to zero, results in a click.
function SetAttackTime¶
function SetDecayTime¶
function SetReleaseTime¶
function SetSustainLevel¶
Sustain level
Parameters:
sus_level
- sets sustain level, 0...1.0
function SetTime¶
Sets time Set time per segment in seconds
function ~Adsr¶
The documentation for this class was generated from the following file external-docs/DaisySP/Source/Control/adsr.h