diff --git a/src/Gates.cpp b/src/Gates.cpp index b31495d..514f980 100644 --- a/src/Gates.cpp +++ b/src/Gates.cpp @@ -64,7 +64,7 @@ struct Gates : Module { } void process(const ProcessArgs& args) override { - int channels = inputs[IN_INPUT].getChannels(); + int channels = std::max(1, inputs[IN_INPUT].getChannels()); bool anyRise = false; bool anyFall = false; diff --git a/src/Logic.cpp b/src/Logic.cpp index 7131cbb..7b43fbc 100644 --- a/src/Logic.cpp +++ b/src/Logic.cpp @@ -55,7 +55,7 @@ struct Logic : Module { } void process(const ProcessArgs& args) override { - int channels = std::max(inputs[A_INPUT].getChannels(), inputs[B_INPUT].getChannels()); + int channels = std::max({1, inputs[A_INPUT].getChannels(), inputs[B_INPUT].getChannels()}); bool bPush = params[B_PARAM].getValue() > 0.f; bool anyState[8] = {};