Gin
|
Public Types | |
enum class | State { idle , attack , decay , sustain , release } |
Public Member Functions | |
AnalogADSR () | |
~AnalogADSR ()=default | |
void | setSampleRate (double sr) |
float | process () |
float | process (int num) |
void | process (juce::AudioSampleBuffer &buffer) |
void | process (juce::AudioSampleBuffer &buffer, int startSample, int numSamples) |
void | processMultiplying (juce::AudioSampleBuffer &buffer) |
void | processMultiplying (juce::AudioSampleBuffer &buffer, int startSample, int numSamples) |
float | getOutput () |
State | getState () |
void | noteOn () |
void | noteOff () |
void | setAttack (float seconds) |
void | setDecay (float seconds) |
void | setRelease (float seconds) |
void | setSustainLevel (float level) |
void | reset () |
std::pair< int, float > | getCurrentPhase () |
Protected Member Functions | |
void | calculateAttack () |
void | calculateDecay () |
void | calculateRelease () |
Protected Attributes | |
State | state = State::idle |
double | sampleRate = 44100.0 |
float | attack = 0.0f |
float | decay = 0.0f |
float | sustain = 0.0f |
float | release = 0.0f |
float | attackCoeff = 0.0f |
float | decayCoeff = 0.0f |
float | releaseCoeff = 0.0f |
float | attackOffset = 0.0f |
float | decayOffset = 0.0f |
float | releaseOffset = 0.0f |
float | output = 0.0f |
|
strong |
AnalogADSR::AnalogADSR | ( | ) |
|
default |
void AnalogADSR::setSampleRate | ( | double | sr | ) |
References sampleRate.
Referenced by GateEffect::setSampleRate().
float AnalogADSR::process | ( | ) |
Referenced by GateEffect::process().
float AnalogADSR::process | ( | int | num | ) |
void AnalogADSR::process | ( | juce::AudioSampleBuffer & | buffer | ) |
void AnalogADSR::process | ( | juce::AudioSampleBuffer & | buffer, |
int | startSample, | ||
int | numSamples | ||
) |
void AnalogADSR::processMultiplying | ( | juce::AudioSampleBuffer & | buffer | ) |
void AnalogADSR::processMultiplying | ( | juce::AudioSampleBuffer & | buffer, |
int | startSample, | ||
int | numSamples | ||
) |
float AnalogADSR::getOutput | ( | ) |
References output.
void AnalogADSR::noteOn | ( | ) |
Referenced by GateEffect::process().
void AnalogADSR::noteOff | ( | ) |
Referenced by GateEffect::process().
void AnalogADSR::setAttack | ( | float | seconds | ) |
Referenced by GateEffect::setAttack().
void AnalogADSR::setDecay | ( | float | seconds | ) |
Referenced by GateEffect::GateEffect().
void AnalogADSR::setRelease | ( | float | seconds | ) |
Referenced by GateEffect::setRelease().
void AnalogADSR::setSustainLevel | ( | float | level | ) |
Referenced by GateEffect::GateEffect().
void AnalogADSR::reset | ( | ) |
Referenced by GateEffect::reset().
std::pair<int, float> AnalogADSR::getCurrentPhase | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by getCurrentPhase(), and getState().
|
protected |
Referenced by setSampleRate().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by getCurrentPhase(), and getOutput().