From d132599fd5e6b886f9c3e8e610c388c14af49796 Mon Sep 17 00:00:00 2001 From: Bryan Head Date: Fri, 19 Mar 2021 06:23:56 -0700 Subject: [PATCH] Normal Warps lvl inputs to 5v; make pots attenuate This matches the behavior of my hardware Warps as well as the description of level inputs in the manual --- src/Warps.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Warps.cpp b/src/Warps.cpp index e6a3c5e..67050c7 100644 --- a/src/Warps.cpp +++ b/src/Warps.cpp @@ -63,8 +63,8 @@ struct Warps : Module { if (++frame >= 60) { frame = 0; - p->channel_drive[0] = clamp(params[LEVEL1_PARAM].getValue() + inputs[LEVEL1_INPUT].getVoltage() / 5.0f, 0.0f, 1.0f); - p->channel_drive[1] = clamp(params[LEVEL2_PARAM].getValue() + inputs[LEVEL2_INPUT].getVoltage() / 5.0f, 0.0f, 1.0f); + p->channel_drive[0] = clamp(params[LEVEL1_PARAM].getValue() * inputs[LEVEL1_INPUT].getNormalVoltage(5.0f) / 5.0f, 0.0f, 1.0f); + p->channel_drive[1] = clamp(params[LEVEL2_PARAM].getValue() * inputs[LEVEL2_INPUT].getNormalVoltage(5.0f) / 5.0f, 0.0f, 1.0f); p->modulation_algorithm = clamp(params[ALGORITHM_PARAM].getValue() / 8.0f + inputs[ALGORITHM_INPUT].getVoltage() / 5.0f, 0.0f, 1.0f); {