Browse Source

CV Mix: Normalize all inputs to 10V instead of just the first input.

tags/v2.2.1
Andrew Belt 1 year ago
parent
commit
b699912f90
1 changed files with 2 additions and 7 deletions
  1. +2
    -7
      src/CVMix.cpp

+ 2
- 7
src/CVMix.cpp View File

@@ -28,7 +28,6 @@ struct CVMix : Module {

for (int i = 0; i < 3; i++)
configInput(CV_INPUTS + i, string::f("CV %d", i + 1));
getInputInfo(CV_INPUTS + 0)->description = "Normalized to 10 V";

configOutput(MIX_OUTPUT, "Mix");
}
@@ -46,12 +45,8 @@ struct CVMix : Module {
// Sum CV inputs
float_4 mix = 0.f;
for (int i = 0; i < 3; i++) {
float_4 cv;
// Normalize first input to 10V
if (i == 0)
cv = inputs[CV_INPUTS + i].getNormalPolyVoltageSimd<float_4>(10.f, c);
else
cv = inputs[CV_INPUTS + i].getPolyVoltageSimd<float_4>(c);
// Normalize inputs to 10V
float_4 cv = inputs[CV_INPUTS + i].getNormalPolyVoltageSimd<float_4>(10.f, c);

// Apply gain
cv *= params[LEVEL_PARAMS + i].getValue();


Loading…
Cancel
Save