Skip to content

Commit

Permalink
Adjust current envelope output value when attack/release/Base is changed
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Arndt <[email protected]>
  • Loading branch information
SpotlightKid committed Oct 14, 2019
1 parent eb57e91 commit e1a3248
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/TransportGate/EnvelopeAR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ void EnvelopeAR::setReleaseTime(float time) {
void EnvelopeAR::setAttackBase(float amp) {
attackBase = amp;
attackCoef = calcCoef(attackTime, attackBase);

if (state == ENV_IDLE) output = amp;
}

void EnvelopeAR::setReleaseBase(float amp) {
releaseBase = amp;
releaseCoef = calcCoef(releaseTime, releaseBase);

if (state == ENV_IDLE) output = amp;
}

void EnvelopeAR::setSampleRate(float rate) {
Expand Down

0 comments on commit e1a3248

Please sign in to comment.