Class daisysp::AdEnv¶
#include <adenv.h>
Public Functions¶
Type | Name |
---|---|
AdEnv () |
|
uint8_t | GetCurrentSegment () |
float | GetValue () const |
void | Init (float sample_rate) |
bool | IsRunning () const |
float | Process () |
void | SetCurve (float scalar) |
void | SetMax (float max) |
void | SetMin (float min) |
void | SetTime (uint8_t seg, float time) |
void | Trigger () |
~AdEnv () |
Detailed Description¶
Trigger-able envelope with adjustable min/max, and independent per-segment time control.
Author:
shensley
Todo
-
Add Cycling
-
Implement Curve (its only linear for now).
-
Maybe make this an ADsr_ that has AD/AR/Asr_ modes.
Public Functions Documentation¶
function AdEnv¶
function GetCurrentSegment¶
Returns the segment of the envelope that the phase is currently located in.
function GetValue¶
Returns the current output value without processing the next sample
function Init¶
Initializes the ad envelope.
Defaults: * current segment = idle * curve = linear * phase = 0 * min = 0 * max = 1
Parameters:
sample_rate
sample rate of the audio engine being run
function IsRunning¶
Returns true if the envelope is currently in any stage apart from idle.
function Process¶
Processes the current sample of the envelope. This should be called once per sample period.
Returns:
the current envelope value.
function SetCurve¶
Sets the amount of curve applied. A positve value will create a log curve. Input range: -100 to 100. (or more)
function SetMax¶
Sets the maximum value of the envelope output. Input range: -FLTmax_, to FLTmax_
function SetMin¶
Sets the minimum value of the envelope output. Input range: -FLTmax_, to FLTmax_
function SetTime¶
Sets the length of time (in seconds) for a specific segment.
function Trigger¶
Starts or retriggers the envelope.
function ~AdEnv¶
The documentation for this class was generated from the following file external-docs/DaisySP/Source/Control/adenv.h