|
|
@@ -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<PJ301MPort>(Vec(63, 319), module, Scope::Y_INPUT)); |
|
|
|
addInput(createInput<PJ301MPort>(Vec(154, 319), module, Scope::TRIG_INPUT)); |
|
|
|
|
|
|
|
addOutput(createOutput<PJ301MPort>(Vec(107, 319), module, Scope::SUM_OUTPUT)); |
|
|
|
|
|
|
|
addChild(createValueLight<TinyLight<GreenValueLight>>(Vec(104, 251), &module->lights[0])); |
|
|
|
addChild(createValueLight<TinyLight<GreenValueLight>>(Vec(104, 296), &module->lights[1])); |
|
|
|
addChild(createValueLight<TinyLight<GreenValueLight>>(Vec(150, 251), &module->lights[2])); |
|
|
|