This commit is contained in:
Gordon JC Pearce 2024-09-08 20:57:11 +01:00
parent 875cf03b44
commit 5f1d620a46

View File

@ -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 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++) { for (uint32_t i = 0; i < samples; i++) {
y = delay; y = delay;
delay = 0; delay = 0;
@ -197,7 +199,7 @@ void Voice::run(Synth &s, float *buffer, uint32_t samples) {
out = y; out = y;
// widthDelay = pw; // widthDelay = pw;
vr58c106 += (((env / 16383.0) - vr58c106) * 0.0075); vr58c106 += ((vcaEnv- vr58c106) * 0.0075);
buffer[i] += (gain * out * vr58c106); buffer[i] += (gain * out * vr58c106);
} }
} }