diff --git a/src/Scope.cpp b/src/Scope.cpp index f21c470..c15dfc1 100644 --- a/src/Scope.cpp +++ b/src/Scope.cpp @@ -24,6 +24,7 @@ struct Scope : Module { NUM_INPUTS }; enum OutputIds { + SUM_OUTPUT, NUM_OUTPUTS }; @@ -124,6 +125,11 @@ void Scope::step() { bufferIndex = 0; frameIndex = 0; return; } } + + // Set the output + + setf(outputs[SUM_OUTPUT], getf(inputs[X_INPUT]) + getf(inputs[Y_INPUT])); + } @@ -332,6 +338,8 @@ ScopeWidget::ScopeWidget() { addInput(createInput(Vec(63, 319), module, Scope::Y_INPUT)); addInput(createInput(Vec(154, 319), module, Scope::TRIG_INPUT)); + addOutput(createOutput(Vec(107, 319), module, Scope::SUM_OUTPUT)); + addChild(createValueLight>(Vec(104, 251), &module->lights[0])); addChild(createValueLight>(Vec(104, 296), &module->lights[1])); addChild(createValueLight>(Vec(150, 251), &module->lights[2]));