#include <Generator.h>
Public Methods | |
AdsrEnvOsc () | |
float | lerp (const float lerpVal, const float from, const float to) |
float | generate () |
generate wave data... More... | |
void | trigger (float duration=-1) |
trigger the envelope state machine from the beginning. More... | |
void | release () |
void | setAttackTime (float t) |
set length of attack stage this is the amount of time in sec to go from 0 to 1 1 | . More... | |
float | getAttackTime () |
void | setDecayTime (float t) |
set length of decay stage this is the amount of time in sec to go from 1 to sustain() 1 | . More... | |
float | getDecayTime () |
void | setSustainLevel (float sustain) |
set amplitude of the sustain stage this is the level that the ADSR sustains at. More... | |
float | getSustainLevel () |
void | setReleaseTime (float t) |
set length of release stage this is the amount of time in sec to go from sustain() to 0 1 | . More... | |
float | getReleaseTime () |
unsigned int | samplesPerOsc () |
get the number of samples for a single oscillation. More... | |
void | setFreq (float freqHz) |
not used in ADSR. More... | |
void | setSampRate (float samplingRateHz) |
set the sampling rate of the generated wave. More... | |
void | reset () |
reset the waveform phase at 0. More... |
NOTE: ADSR = (A)ttack, (D)elay, (S)ustain, (R)elease NOTE: this is non-bandlimited...
Definition at line 491 of file Generator.h.
|
Definition at line 494 of file Generator.h. |
|
Definition at line 503 of file Generator.h. Referenced by generate().
|
|
generate wave data...
Definition at line 511 of file Generator.h. |
|
trigger the envelope state machine from the beginning.
Definition at line 571 of file Generator.h. |
|
Definition at line 579 of file Generator.h. Referenced by generate().
|
|
set length of attack stage this is the amount of time in sec to go from 0 to 1 1 | . | / \.___ |./ `\ 0 +---+------------ time Definition at line 591 of file Generator.h. |
|
Definition at line 597 of file Generator.h. |
|
set length of decay stage this is the amount of time in sec to go from 1 to sustain() 1 | . | / \.___ |./ `\ 0 ----+-+---------- time Definition at line 606 of file Generator.h. |
|
Definition at line 612 of file Generator.h. |
|
set amplitude of the sustain stage this is the level that the ADSR sustains at. 1 | . | / \.___ |./ | `\ 0 ---------------- t Definition at line 622 of file Generator.h. |
|
Definition at line 626 of file Generator.h. |
|
set length of release stage this is the amount of time in sec to go from sustain() to 0 1 | . | / \.___ |./ `\ 0 ----------+-+---- time Definition at line 635 of file Generator.h. |
|
Definition at line 641 of file Generator.h. |
|
get the number of samples for a single oscillation. this tells you how many samples before the osc repeats. useful for filling a wavetable so that it can repeat without pops. Definition at line 647 of file Generator.h. |
|
not used in ADSR.
Definition at line 658 of file Generator.h. |
|
set the sampling rate of the generated wave. samples per sec. Definition at line 663 of file Generator.h. |
|
reset the waveform phase at 0.
Definition at line 674 of file Generator.h. Referenced by AdsrEnvOsc().
|