From b699912f9074c6cf7e495db3b2353c594176a65c Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 24 May 2022 04:44:13 -0400 Subject: [PATCH] CV Mix: Normalize all inputs to 10V instead of just the first input. --- src/CVMix.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/CVMix.cpp b/src/CVMix.cpp index da40153..0d41345 100644 --- a/src/CVMix.cpp +++ b/src/CVMix.cpp @@ -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(10.f, c); - else - cv = inputs[CV_INPUTS + i].getPolyVoltageSimd(c); + // Normalize inputs to 10V + float_4 cv = inputs[CV_INPUTS + i].getNormalPolyVoltageSimd(10.f, c); // Apply gain cv *= params[LEVEL_PARAMS + i].getValue();