DaisySP
|
#include <adenv.h>
Public Member Functions | |
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 |
Trigger-able envelope with adjustable min/max, and independent per-segment time control.
- Implement Curve (its only linear for now).
- Maybe make this an ADsr_ that has AD/AR/Asr_ modes.
|
inline |
Returns the segment of the envelope that the phase is currently located in.
|
inline |
Returns the current output value without processing the next sample
void AdEnv::Init | ( | float | sample_rate | ) |
Initializes the ad envelope.
Defaults:
sample_rate | sample rate of the audio engine being run |
|
inline |
Returns true if the envelope is currently in any stage apart from idle.
float AdEnv::Process | ( | ) |
Processes the current sample of the envelope. This should be called once per sample period.
|
inline |
Sets the amount of curve applied. A positve value will create a log curve. Input range: -100 to 100. (or more)
|
inline |
Sets the maximum value of the envelope output. Input range: -FLTmax_, to FLTmax_
|
inline |
Sets the minimum value of the envelope output. Input range: -FLTmax_, to FLTmax_
|
inline |
Sets the length of time (in seconds) for a specific segment.
|
inline |
Starts or retriggers the envelope.