computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit a15fcdb3fbfb86fde2be5f0c7ba365efcc3fd5bf
parent b5620970bed2987fd7c83d3bdc678f0510be2357
Author: Adam M <[email protected]>
Date:   Sun,  6 Jan 2019 10:54:35 -0600

organize peas

Diffstat:
Msrc/ComputerscareOhPeas.cpp | 15++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/ComputerscareOhPeas.cpp b/src/ComputerscareOhPeas.cpp @@ -61,14 +61,23 @@ struct ComputerscareOhPeas : Module { void ComputerscareOhPeas::step() { float A,B,C,D,a,b,c,d; for(int i = 0; i < numChannels; i++) { + a = params[SCALE_VAL+i].value; + b = params[SCALE_TRIM+i].value; - c = params[OFFSET_TRIM+i].value; - d = params[OFFSET_VAL+i].value; - A = inputs[CHANNEL_INPUT+i].value; B = inputs[SCALE_CV].value; + + + A = inputs[CHANNEL_INPUT+i].value; + + + + c = params[OFFSET_TRIM+i].value; C = inputs[OFFSET_CV].value; + d = params[OFFSET_VAL+i].value; + + D = (a + b*B)*A + (c*C + d); outputs[SCALED_OUTPUT + i].value = D; outputs[QUANTIZED_OUTPUT + i].value = D;