From 85b174a8f4550e78b5f7bcc972860e9b443929e8 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 15 Feb 2018 16:31:13 -0500 Subject: [PATCH] Set Branches threshold input range from 0V to 10V, instead of 0 to 1V --- src/Branches.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Branches.cpp b/src/Branches.cpp index 1ee9498..2a154a4 100644 --- a/src/Branches.cpp +++ b/src/Branches.cpp @@ -62,7 +62,8 @@ void Branches::step() { if (gateTrigger[i].process(gate)) { // trigger float r = randomf(); - bool toss = (r < params[THRESHOLD1_PARAM + i].value + inputs[P1_INPUT + i].value); + float threshold = clamp(params[THRESHOLD1_PARAM + i].value + inputs[P1_INPUT + i].value / 10.f, 0.f, 1.f); + bool toss = (r < threshold); if (!mode[i]) { // direct mode outcome[i] = toss;