|
DaisySP
|
#include <adsr.h>
Public Member Functions | |
| 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 |
adsr envelope module
Original author(s) : Paul Batchelor
Ported from Soundpipe by Ben Sergentanis, May 2020
Remake by Steffan DIedrichsen, May 2021
|
inline |
get the current envelope segment
| void Adsr::Init | ( | float | sample_rate, |
| int | blockSize = 1 ) |
Initializes the Adsr module.
| sample_rate | - The sample rate of the audio engine being run. |
|
inline |
Tells whether envelope is active
| float Adsr::Process | ( | bool | gate | ) |
Processes one sample through the filter and returns one sample.
| gate | - trigger the envelope, hold it to sustain |
| void Adsr::Retrigger | ( | bool | hard | ) |
\function Retrigger forces the envelope back to attack phase
| hard | resets the history to zero, results in a click. |
|
inline |
Sustain level
| sus_level | - sets sustain level, 0...1.0 |
| void Adsr::SetTime | ( | int | seg, |
| float | time ) |
Sets time Set time per segment in seconds