diff --git a/plugin/voice.cpp b/plugin/voice.cpp index e5e195b..ff9be2a 100644 --- a/plugin/voice.cpp +++ b/plugin/voice.cpp @@ -149,6 +149,8 @@ void Voice::run(Synth &s, float *buffer, uint32_t samples) { float gain = 0.5 * powf(2, (s.patchRam.vca / 64.0f) - 1); + float vcaEnv = (s.patchRam.switch2 & 0x04)?(float)ff11:(env / 16384.0f); + for (uint32_t i = 0; i < samples; i++) { y = delay; delay = 0; @@ -197,7 +199,7 @@ void Voice::run(Synth &s, float *buffer, uint32_t samples) { out = y; // widthDelay = pw; - vr58c106 += (((env / 16383.0) - vr58c106) * 0.0075); + vr58c106 += ((vcaEnv- vr58c106) * 0.0075); buffer[i] += (gain * out * vr58c106); } }