commit ff91242f2200a6a01d8a19822def960f0fdd764a
parent baa08648efc5cf6a04c6277594c600d7d7327b7e
Author: Adam M <[email protected]>
Date: Sat, 10 Nov 2018 19:00:49 -0600
change range to 0,+10v
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/ComputerscareILoveCookies.cpp b/src/ComputerscareILoveCookies.cpp
@@ -227,7 +227,7 @@ void onCreate () override
4: 0,1
*/
float mappedValue = 0.f;
- int mapEnum = 0;
+ int mapEnum = 2;
switch(mapEnum) {
case 0: mappedValue = rawValue; break;
case 1: mappedValue = rawValue / 2.f; break;
@@ -294,6 +294,7 @@ void ComputerscareILoveCookies::step() {
lights[SWITCH_LIGHTS + i*numKnobRows*numKnobColumns + k].value = (k==activeKnob) ? 1.0 : 0.0;
}
}
+ //outputs[TRG_OUTPUT + i].value = params[KNOB_PARAM + activeKnob].value;
knobRawValue = params[KNOB_PARAM + activeKnob].value;
outputs[TRG_OUTPUT + i].value = mapKnobValue(knobRawValue,i);
if(inputs[CLOCK_INPUT + i].active) {
@@ -413,12 +414,12 @@ struct ComputerscareILoveCookiesWidget : ModuleWidget {
letterDisplay->box.pos = mm2px(Vec(knobPosX-3,knobPosY-2));
letterDisplay->box.size = Vec(20, 20);
letterDisplay->value = knoblookup[index];
- //letterDisplay->active = (module->absoluteSequences[i][module->absoluteStep[i]]==index);
+
addChild(letterDisplay);
- ParamWidget* knob = ParamWidget::create<SmoothKnob>(mm2px(Vec(knobPosX,knobPosY)), module, ComputerscareILoveCookies::KNOB_PARAM +index, -10.0f, 10.0f, 0.0f);
+ ParamWidget* knob = ParamWidget::create<SmoothKnob>(mm2px(Vec(knobPosX,knobPosY)), module, ComputerscareILoveCookies::KNOB_PARAM +index, 0.f, 10.0f, 0.0f);
addParam(knob);
}