daisysp::Adsr¶
#include <adsr.h>
Public Functions¶
Name | |
---|---|
Adsr() | |
~Adsr() | |
void | Init(float sample_rate, int blockSize =1) |
void | Retrigger(bool hard) |
float | Process(bool gate) |
void | SetTime(int seg, float time) |
void | SetAttackTime(float timeInS, float shape =0.0f) |
void | SetDecayTime(float timeInS) |
void | SetReleaseTime(float timeInS) |
void | SetSustainLevel(float sus_level) |
uint8_t | GetCurrentSegment() |
bool | IsRunning() const |
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 ~Adsr¶
function Init¶
Parameters:
- sample_rate - The sample rate of the audio engine being run.
Initializes the Adsr module.
function Retrigger¶
Parameters:
- hard resets the history to zero, results in a click.
\function Retrigger forces the envelope back to attack phase
function Process¶
Parameters:
- gate - trigger the envelope, hold it to sustain
Processes one sample through the filter and returns one sample.
function SetTime¶
Sets time Set time per segment in seconds
function SetAttackTime¶
function SetDecayTime¶
function SetReleaseTime¶
function SetSustainLevel¶
Parameters:
- sus_level - sets sustain level, 0...1.0
Sustain level
function GetCurrentSegment¶
Return: the segment of the envelope that the phase is currently located in.
get the current envelope segment
function IsRunning¶
Return: true if the envelope is currently in any stage apart from idle.
Tells whether envelope is active
---¶
Updated on 2024-01-03 at 19:38:46 +0000