cleanup envelopeGenerator initialization

This commit is contained in:
2025-12-26 15:23:18 -06:00
parent c417801547
commit cbd60e2701
7 changed files with 79 additions and 52 deletions

View File

@@ -26,7 +26,7 @@ float Envelope::process() {
state_ = State::Decay;
}
break;
case State::Decay:
case State::Decay: // TODO: if noteOff occurs during decay, release doesn't trigger until decay finishes
value_ -= (1.0f - sustain_) / (decay_ * sampleRate_);
if(value_ <= sustain_) {
value_ = sustain_;