From 5934de0200333a1c96b2b1b4e6e20326786e77a8 Mon Sep 17 00:00:00 2001 From: hemmer <915048+hemmer@users.noreply.github.com> Date: Sat, 4 Sep 2021 08:17:37 +0100 Subject: [PATCH] STMix: update knob colour * changed polyphony logic (we don't want to "broadcast" monophonic channels in the mixer, as downstream these will be summed via getVoltageSum, see e.g. VCMixer in Fundamental) --- res/Davies1900hBlack.svg | 105 +++++++++++++++++++++++++++++++++++ res/Davies1900hDarkGrey.svg | 105 +++++++++++++++++++++++++++++++++++ res/Davies1900hLightGrey.svg | 105 +++++++++++++++++++++++++++++++++++ src/STMix.cpp | 10 ++-- src/plugin.hpp | 19 +++++++ 5 files changed, 339 insertions(+), 5 deletions(-) create mode 100644 res/Davies1900hBlack.svg create mode 100644 res/Davies1900hDarkGrey.svg create mode 100644 res/Davies1900hLightGrey.svg diff --git a/res/Davies1900hBlack.svg b/res/Davies1900hBlack.svg new file mode 100644 index 0000000..7b6aa07 --- /dev/null +++ b/res/Davies1900hBlack.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/res/Davies1900hDarkGrey.svg b/res/Davies1900hDarkGrey.svg new file mode 100644 index 0000000..7992dc9 --- /dev/null +++ b/res/Davies1900hDarkGrey.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/res/Davies1900hLightGrey.svg b/res/Davies1900hLightGrey.svg new file mode 100644 index 0000000..9a3d9e2 --- /dev/null +++ b/res/Davies1900hLightGrey.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/src/STMix.cpp b/src/STMix.cpp index ab8768b..077d9aa 100644 --- a/src/STMix.cpp +++ b/src/STMix.cpp @@ -51,8 +51,8 @@ struct STMix : Module { const float gain = (i < numMixerChannels) ? exponentialBipolar80Pade_5_4(params[GAIN_PARAM + i].getValue()) : 1.f; for (int c = 0; c < numActivePolyphonyEngines; c += 4) { - const float_4 in_left = inputs[LEFT_INPUT + i].getNormalPolyVoltageSimd(0.f, c); - const float_4 in_right = inputs[RIGHT_INPUT + i].getNormalPolyVoltageSimd(in_left, c); + const float_4 in_left = inputs[LEFT_INPUT + i].getNormalVoltageSimd(0.f, c); + const float_4 in_right = inputs[RIGHT_INPUT + i].getNormalVoltageSimd(in_left, c); out_left[c / 4] += in_left * gain; out_right[c / 4] += in_right * gain; @@ -105,9 +105,9 @@ struct STMixWidget : ModuleWidget { addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addParam(createParamCentered(mm2px(Vec(21.0, 18.141)), module, STMix::GAIN_PARAM + 0)); - addParam(createParamCentered(mm2px(Vec(21.0, 41.451)), module, STMix::GAIN_PARAM + 1)); - addParam(createParamCentered(mm2px(Vec(21.0, 64.318)), module, STMix::GAIN_PARAM + 2)); - addParam(createParamCentered(mm2px(Vec(21.0, 87.124)), module, STMix::GAIN_PARAM + 3)); + addParam(createParamCentered(mm2px(Vec(21.0, 41.451)), module, STMix::GAIN_PARAM + 1)); + addParam(createParamCentered(mm2px(Vec(21.0, 64.318)), module, STMix::GAIN_PARAM + 2)); + addParam(createParamCentered(mm2px(Vec(21.0, 87.124)), module, STMix::GAIN_PARAM + 3)); addInput(createInputCentered(mm2px(Vec(6.3, 13.108)), module, STMix::LEFT_INPUT + 0)); addInput(createInputCentered(mm2px(Vec(6.3, 36.175)), module, STMix::LEFT_INPUT + 1)); diff --git a/src/plugin.hpp b/src/plugin.hpp index 12d2ecb..9fea9b3 100644 --- a/src/plugin.hpp +++ b/src/plugin.hpp @@ -78,6 +78,25 @@ struct Davies1900hLargeGreyKnob : Davies1900hKnob { } }; +struct Davies1900hLightGreyKnob : Davies1900hWhiteKnob { + Davies1900hLightGreyKnob() { + setSvg(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Davies1900hLightGrey.svg"))); + } +}; + +struct Davies1900hDarkGreyKnob : Davies1900hWhiteKnob { + Davies1900hDarkGreyKnob() { + setSvg(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Davies1900hDarkGrey.svg"))); + } +}; + +// library black Davies1900h doesn't work well on black backgrounds +struct Davies1900hDarkBlackAlt : Davies1900hWhiteKnob { + Davies1900hDarkBlackAlt() { + setSvg(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Davies1900hBlack.svg"))); + } +}; + struct BefacoOutputPort : app::SvgPort { BefacoOutputPort() { setSvg(APP->window->loadSvg(asset::plugin(pluginInstance, "res/BefacoOutputPort.svg")));