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