From b049bb720047309cd390b854b14f904cf0b275a8 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 24 Mar 2023 19:23:11 -0400 Subject: [PATCH 1/2] Add Mult. --- plugin.json | 9 +++ res/Mult.svg | 213 +++++++++++++++++++++++++++++++++++++++++++++++++ src/Mult.cpp | 63 +++++++++++++++ src/plugin.cpp | 1 + src/plugin.hpp | 1 + 5 files changed, 287 insertions(+) create mode 100644 res/Mult.svg create mode 100644 src/Mult.cpp diff --git a/plugin.json b/plugin.json index ec39554..3ec29ca 100644 --- a/plugin.json +++ b/plugin.json @@ -347,6 +347,15 @@ "tags": [ "Polyphonic" ] + }, + { + "slug": "Mult", + "name": "Mult", + "description": "Copies a signal to 8 outputs", + "tags": [ + "Utility", + "Polyphonic" + ] } ] } \ No newline at end of file diff --git a/res/Mult.svg b/res/Mult.svg new file mode 100644 index 0000000..ffd6fa5 --- /dev/null +++ b/res/Mult.svg @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mult.cpp b/src/Mult.cpp new file mode 100644 index 0000000..544a164 --- /dev/null +++ b/src/Mult.cpp @@ -0,0 +1,63 @@ +#include "plugin.hpp" + + +struct Mult : Module { + enum ParamId { + PARAMS_LEN + }; + enum InputId { + MULT_INPUT, + INPUTS_LEN + }; + enum OutputId { + ENUMS(MULT_OUTPUTS, 8), + OUTPUTS_LEN + }; + enum LightId { + LIGHTS_LEN + }; + + Mult() { + config(PARAMS_LEN, INPUTS_LEN, OUTPUTS_LEN, LIGHTS_LEN); + configInput(MULT_INPUT, "Mult"); + for (int i = 0; i < 8; i++) + configOutput(MULT_OUTPUTS + i, string::f("Mult %d", i + 1)); + } + + void process(const ProcessArgs& args) override { + int channels = std::max(1, inputs[MULT_INPUT].getChannels()); + + // Copy input to outputs + for (int i = 0; i < 8; i++) { + outputs[MULT_OUTPUTS + i].setChannels(channels); + outputs[MULT_OUTPUTS + i].writeVoltages(inputs[MULT_INPUT].getVoltages()); + } + } +}; + + +struct MultWidget : ModuleWidget { + MultWidget(Mult* module) { + setModule(module); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Mult.svg"))); + + addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + + addInput(createInputCentered(mm2px(Vec(7.62, 22.001)), module, Mult::MULT_INPUT)); + + addOutput(createOutputCentered(mm2px(Vec(7.62, 42.017)), module, Mult::MULT_OUTPUTS + 0)); + addOutput(createOutputCentered(mm2px(Vec(7.62, 52.155)), module, Mult::MULT_OUTPUTS + 1)); + addOutput(createOutputCentered(mm2px(Vec(7.62, 62.315)), module, Mult::MULT_OUTPUTS + 2)); + addOutput(createOutputCentered(mm2px(Vec(7.62, 72.475)), module, Mult::MULT_OUTPUTS + 3)); + addOutput(createOutputCentered(mm2px(Vec(7.62, 82.635)), module, Mult::MULT_OUTPUTS + 4)); + addOutput(createOutputCentered(mm2px(Vec(7.62, 92.795)), module, Mult::MULT_OUTPUTS + 5)); + addOutput(createOutputCentered(mm2px(Vec(7.62, 102.955)), module, Mult::MULT_OUTPUTS + 6)); + addOutput(createOutputCentered(mm2px(Vec(7.62, 113.115)), module, Mult::MULT_OUTPUTS + 7)); + } +}; + + +Model* modelMult = createModel("Mult"); \ No newline at end of file diff --git a/src/plugin.cpp b/src/plugin.cpp index f737025..bdf417e 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -40,4 +40,5 @@ void init(Plugin* p) { p->addModel(modelCompare); p->addModel(modelGates); p->addModel(modelProcess); + p->addModel(modelMult); } diff --git a/src/plugin.hpp b/src/plugin.hpp index ad57997..910e193 100644 --- a/src/plugin.hpp +++ b/src/plugin.hpp @@ -40,6 +40,7 @@ extern Model* modelLogic; extern Model* modelCompare; extern Model* modelGates; extern Model* modelProcess; +extern Model* modelMult; struct DigitalDisplay : Widget { From ee850f8487280839ae0548f6b9af65cb9faf3ef8 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 1 Apr 2023 03:49:53 -0400 Subject: [PATCH 2/2] Bump version. Update changelog. --- CHANGELOG.md | 9 +++++++++ plugin.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e64f3c..33c0b38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Fundamental changelog +### 2.4.0 (2023-04-01) +- Add Mult. +- SEQ 3 + - Reset step phase when reset trigger is received. +- Mutes + - Add bypass routes. +- VCA + - Fix graphical glitch when display segments have 0% height. + ### 2.3.1 (2022-08-07) - Logic - Fix polyphonic outputs. diff --git a/plugin.json b/plugin.json index 3ec29ca..dac5088 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "slug": "Fundamental", "name": "VCV Fundamental", - "version": "2.3.1", + "version": "2.4.0", "license": "GPL-3.0-or-later", "brand": "VCV", "author": "VCV",