env/gate
This commit is contained in:
parent
875cf03b44
commit
5f1d620a46
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user