BogaudioModules

BogaudioModules for VCV Rack
Log | Files | Refs | README | LICENSE

commit 7ee4059cffce67db0131662d09525b37b736a279
parent c449136e263438e6c3cdd63b4a4e5e1a6303e4d2
Author: Matt Demanett <matt@demanett.net>
Date:   Fri, 16 Nov 2018 00:41:55 -0500

MATRIX88 revisions.

Diffstat:
Msrc/Matrix88.cpp | 17++++++-----------
Msrc/Matrix88.hpp | 1-
Msrc/bogaudio.cpp | 4+++-
3 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/src/Matrix88.cpp b/src/Matrix88.cpp @@ -3,17 +3,12 @@ void Matrix88::step() { for (int i = 0; i < 8; ++i) { - _inputs[i] = inputs[IN1_INPUT + i].active ? inputs[IN1_INPUT + i].value : 5.0f; - } - for (int i = 0; i < 8; ++i) { - if (outputs[OUT1_OUTPUT + i].active) { - int paramOffset = MIX11_PARAM + i * 8; - float out = 0.0f; - for (int j = 0; j < 8; ++j) { - out += _inputs[j] * params[paramOffset + j].value; - } - outputs[OUT1_OUTPUT + i].value = _saturators[i].next(params[LEVEL_PARAM].value * out); + int paramOffset = MIX11_PARAM + i * 8; + float out = 0.0f; + for (int j = 0; j < 8; ++j) { + out += inputs[IN1_INPUT + j].value * params[paramOffset + j].value; } + outputs[OUT1_OUTPUT + i].value = _saturators[i].next(params[LEVEL_PARAM].value * out); } } @@ -207,4 +202,4 @@ struct Matrix88Widget : ModuleWidget { } }; -Model* modelMatrix88 = createModel<Matrix88, Matrix88Widget>("Bogaudio-Matrix88", "Matrix88", "signal routing matrix", MIXER_TAG); +Model* modelMatrix88 = createModel<Matrix88, Matrix88Widget>("Bogaudio-Matrix88", "Matrix88", "8x8 matrix mixer", MIXER_TAG); diff --git a/src/Matrix88.hpp b/src/Matrix88.hpp @@ -107,7 +107,6 @@ struct Matrix88 : Module { NUM_LIGHTS }; - float _inputs[8] {}; Saturator _saturators[8]; Matrix88() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { diff --git a/src/bogaudio.cpp b/src/bogaudio.cpp @@ -86,6 +86,9 @@ void init(rack::Plugin *p) { p->addModel(modelMix4); p->addModel(modelMix8); p->addModel(modelVCM); + #ifdef EXPERIMENTAL + p->addModel(modelMatrix88); + #endif p->addModel(modelUMix); p->addModel(modelMute8); p->addModel(modelPan); @@ -128,7 +131,6 @@ void init(rack::Plugin *p) { #ifdef EXPERIMENTAL p->addModel(modelLag); - p->addModel(modelMatrix88); #endif #ifdef TEST