|
Gin
|
#include <gin_adsr.h>
Public Types | |
| enum | State { idle , attack , decay , sustain , release , finished } |
Public Member Functions | |
| ADSR () | |
| ~ADSR () | |
| void | setSampleRate (double sr) |
| float | process () |
| float | process (int num) |
| void | process (juce::AudioSampleBuffer &buffer) |
| void | process (juce::AudioSampleBuffer &buffer, int startSample, int numSamples) |
| float | getOutput () |
| std::pair< int, float > | getCurrentPhase () |
| State | getState () |
| void | noteOn () |
| void | noteOff () |
| void | setAttack (float seconds) |
| void | setDecay (float seconds) |
| void | setRelease (float seconds) |
| void | setSustainLevel (float level) |
| void | reset () |
Protected Attributes | |
| State | state = idle |
| double | sampleRate = 44100.0 |
| float | output = 0.0f |
| float | attackDelta = 0.0f |
| float | decayDelta = 0.0f |
| float | releaseDelta = 0.0f |
| float | sustainLevel = 0.0f |
Linear ADSR.
Good for a modulation source
| enum ADSR::State |
| ADSR::ADSR | ( | ) |
| ADSR::~ADSR | ( | ) |
| void ADSR::setSampleRate | ( | double | sr | ) |
References sampleRate.
| float ADSR::process | ( | ) |
| float ADSR::process | ( | int | num | ) |
| void ADSR::process | ( | juce::AudioSampleBuffer & | buffer | ) |
| void ADSR::process | ( | juce::AudioSampleBuffer & | buffer, |
| int | startSample, | ||
| int | numSamples | ||
| ) |
| float ADSR::getOutput | ( | ) |
References attackDelta, idle, output, and state.
| std::pair< int, float > ADSR::getCurrentPhase | ( | ) |
| void ADSR::setAttack | ( | float | seconds | ) |
| void ADSR::setDecay | ( | float | seconds | ) |
| void ADSR::setRelease | ( | float | seconds | ) |
| void ADSR::setSustainLevel | ( | float | level | ) |
| void ADSR::reset | ( | ) |
Referenced by getCurrentPhase(), getOutput(), getState(), noteOff(), and noteOn().
|
protected |
Referenced by setSampleRate().
|
protected |
Referenced by getCurrentPhase(), and getOutput().
|
protected |
Referenced by getOutput().
|
protected |
|
protected |
|
protected |