Browse Source

Merge branch 'v2' into v2-rename

tags/v2.5.0
Andrew Belt 8 months ago
parent
commit
9808e9d7a1
5 changed files with 288 additions and 1 deletions
  1. +10
    -1
      plugin.json
  2. +213
    -0
      res/Mult.svg
  3. +63
    -0
      src/Mult.cpp
  4. +1
    -0
      src/plugin.cpp
  5. +1
    -0
      src/plugin.hpp

+ 10
- 1
plugin.json View File

@@ -1,7 +1,7 @@
{
"slug": "Fundamental",
"name": "VCV Free",
"version": "2.3.2",
"version": "2.4.0",
"license": "GPL-3.0-or-later",
"brand": "VCV",
"author": "VCV",
@@ -353,6 +353,15 @@
"tags": [
"Polyphonic"
]
},
{
"slug": "Mult",
"name": "Mult",
"description": "Copies a signal to 8 outputs",
"tags": [
"Utility",
"Polyphonic"
]
}
]
}

+ 213
- 0
res/Mult.svg View File

@@ -0,0 +1,213 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="45"
height="380"
viewBox="0 0 45 380"
version="1.1"
id="svg60"
sodipodi:docname="MULT.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview62"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="2.1815789"
inkscape:cx="22.689988"
inkscape:cy="190.22919"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg60" />
<defs
id="defs7">
<linearGradient
id="uuid-60bc910a-6e97-42c3-8478-f8c19ee4331d"
x1="22.5"
y1="0"
x2="22.5"
y2="380"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#ebebeb"
id="stop2" />
<stop
offset="1"
stop-color="#e1e1e1"
id="stop4" />
</linearGradient>
</defs>
<g
id="uuid-09a9c7dc-55ea-489d-89f4-e7edf94df086"
data-name="FND BG">
<rect
width="45"
height="380"
fill="url(#uuid-60bc910a-6e97-42c3-8478-f8c19ee4331d)"
id="rect9" />
</g>
<g
id="uuid-9e91242f-5469-4143-b462-79afb2d1bf7f"
data-name="FND GRAPH">
<g
id="g20">
<circle
cx="23.00165"
cy="355.83101"
r="1.18571"
fill="#1f1f1f"
id="circle12" />
<path
d="m14.35927,359.75298c-.34551,0-.66126-.1952-.8158-.50419l-2.96428-5.92856c-.22526-.45057-.04266-.99844.40794-1.2237.45008-.22535.99831-.04271,1.22366.4079l2.14848,4.29696,2.14848-4.29696c.22526-.45057.77314-.63325,1.22366-.4079.45061.22526.63321.77314.40794,1.2237l-2.96428,5.92856c-.15454.30899-.47029.50419-.8158.50419Z"
fill="#1f1f1f"
id="path14" />
<path
d="m30.64073,359.75298c-.34551,0-.66126-.1952-.8158-.50419l-2.96428-5.92856c-.22526-.45057-.04266-.99844.40794-1.2237.45016-.22535.9984-.04271,1.22366.4079l2.14848,4.29696,2.14848-4.29696c.22526-.45057.77305-.63325,1.22366-.4079.45061.22526.63321.77314.40794,1.2237l-2.96428,5.92856c-.15454.30899-.47029.50419-.8158.50419Z"
fill="#1f1f1f"
id="path16" />
<path
d="m22.94242,359.75298c-2.13744,0-3.87637-1.73893-3.87637-3.87637s1.73893-3.87637,3.87637-3.87637c.84653,0,1.65102.26819,2.32653.77554.40278.30253.48401.87428.18153,1.27705-.30248.40273-.87432.48401-1.2771.18148-.357-.26815-.78267-.4099-1.23096-.4099-1.13156,0-2.05219.92059-2.05219,2.05219s.92064,2.05219,2.05219,2.05219c.44829,0,.87396-.14176,1.23096-.4099.40269-.30271.97444-.22125,1.2771.18148.30248.40278.22125.97453-.18153,1.27705-.67551.50735-1.48.77554-2.32653.77554Z"
fill="#1f1f1f"
id="path18" />
</g>
<rect
x="8.1842"
y="98.96797"
width="28.6316"
height="249.24526"
rx="2.83465"
ry="2.83465"
fill="#1f1f1f"
id="rect22" />
</g>
<g
id="uuid-ee8017a8-dba3-4a09-83bc-73d3dfbfbb73"
data-name="FND TXT">
<g
id="g33">
<path
d="m5.80078,20.44141c0-.53809.42578-.96338.96289-.96338h.21289c.41309,0,.70117.2124.87598.50049l2.32715,3.79102,2.33984-3.80371c.2002-.3252.47559-.48779.86328-.48779h.21289c.53809,0,.96289.42529.96289.96338v6.95703c0,.53809-.4248.96338-.96289.96338-.52539,0-.95117-.43799-.95117-.96338v-4.36719l-1.68945,2.60254c-.19922.30078-.4502.48828-.80078.48828-.34961,0-.59961-.1875-.80078-.48828l-1.66406-2.56445v4.354c0,.52539-.4248.93848-.95117.93848-.52539,0-.9375-.41309-.9375-.93848v-6.98193Z"
fill="#1f1f1f"
id="path25" />
<path
d="m16.71973,24.5332v-4.1167c0-.53809.4248-.96338.96387-.96338.53711,0,.96289.42529.96289.96338v4.06641c0,1.42627.71289,2.16455,1.88867,2.16455,1.17676,0,1.89062-.71289,1.89062-2.10205v-4.12891c0-.53809.4248-.96338.96289-.96338s.96289.42529.96289.96338v4.0542c0,2.65234-1.48828,3.95361-3.84082,3.95361s-3.79102-1.31396-3.79102-3.89111Z"
fill="#1f1f1f"
id="path27" />
<path
d="m26.50488,20.4165c0-.53809.42578-.96338.96387-.96338s.96289.42529.96289.96338v6.11865h3.56641c.48828,0,.87598.3877.87598.87549s-.3877.87598-.87598.87598h-4.5293c-.53809,0-.96387-.42529-.96387-.96338v-6.90674Z"
fill="#1f1f1f"
id="path29" />
<path
d="m35.23047,21.30469h-1.85156c-.4873,0-.8877-.40039-.8877-.88818s.40039-.88818.8877-.88818h5.63086c.48828,0,.88867.40039.88867.88818s-.40039.88818-.88867.88818h-1.85156v6.09375c0,.53809-.42578.96338-.96387.96338s-.96387-.42529-.96387-.96338v-6.09375Z"
fill="#1f1f1f"
id="path31" />
</g>
<g
id="g41">
<path
d="m15.01367,106.46826v-.01367c0-1.34814,1.06348-2.45264,2.52734-2.45264,1.46289,0,2.5127,1.09082,2.5127,2.43945v.01318c0,1.34814-1.06348,2.45264-2.52637,2.45264-1.46387,0-2.51367-1.09082-2.51367-2.43896Zm3.94922,0v-.01367c0-.81299-.5957-1.49023-1.43555-1.49023-.84082,0-1.42383.66357-1.42383,1.47705v.01318c0,.81299.59668,1.49072,1.4375,1.49072.83984,0,1.42188-.66406,1.42188-1.47705Z"
fill="#f0f0f0"
id="path35" />
<path
d="m21.13281,106.79346v-2.229c0-.29102.23047-.52148.52148-.52148s.52148.23047.52148.52148v2.20215c0,.77197.38574,1.17188,1.02344,1.17188.63672,0,1.02246-.38623,1.02246-1.13818v-2.23584c0-.29102.23047-.52148.52148-.52148.29199,0,.52246.23047.52246.52148v2.19531c0,1.43604-.80664,2.14062-2.08008,2.14062-1.27441,0-2.05273-.71143-2.05273-2.10693Z"
fill="#f0f0f0"
id="path37" />
<path
d="m27.61719,105.04541h-1.00195c-.26465,0-.48145-.2168-.48145-.48096s.2168-.48096.48145-.48096h3.04785c.26465,0,.48145.2168.48145.48096s-.2168.48096-.48145.48096h-1.00293v3.29932c0,.2915-.23047.52197-.52148.52197s-.52148-.23047-.52148-.52197v-3.29932Z"
fill="#f0f0f0"
id="path39" />
</g>
<g
id="g47">
<path
d="m19.30078,45.41797c0-.23047.18262-.41357.41992-.41357.23047,0,.41309.18311.41309.41357v3.9834c0,.23047-.18262.41309-.41309.41309-.2373,0-.41992-.18262-.41992-.41309v-3.9834Z"
fill="#1f1f1f"
id="path43" />
<path
d="m21.60938,45.43115c0-.22998.18359-.41992.41992-.41992h.08789c.2041,0,.31934.10156.43359.24365l2.37207,3.06934v-2.91309c0-.22363.18262-.40674.40625-.40674.23047,0,.41309.18311.41309.40674v3.9834c0,.23047-.17578.41309-.40625.41309h-.0332c-.19727,0-.31934-.10156-.43359-.25049l-2.43945-3.15674v3.00781c0,.22363-.18359.40625-.40625.40625-.23047,0-.41406-.18262-.41406-.40625v-3.97705Z"
fill="#1f1f1f"
id="path45" />
</g>
</g>
<g
id="uuid-f5b14dba-6a57-481d-87f2-aa67c1806a3e"
data-name="components"
style="display:none"
inkscape:groupmode="layer">
<circle
id="uuid-269564ec-7000-4fdb-9461-5b7539e12aac"
data-name="In#PJ301MPort"
cx="22.5"
cy="64.962143"
r="5"
fill="#00ff00" />
<circle
id="uuid-b84a2024-2509-4969-8c8f-8802aa4abcf1"
data-name="Out8#PJ301MPort"
cx="22.5"
cy="334"
r="5"
fill="#0000ff" />
<circle
id="uuid-2b9c49c0-9b3f-4ba0-967c-92fca66778d4"
data-name="Out7#PJ301MPort"
cx="22.5"
cy="304"
r="5"
fill="#0000ff" />
<circle
id="uuid-0d4ef144-8cf6-4b4c-8af5-bff1fbf535df"
data-name="Out6#PJ301MPort"
cx="22.5"
cy="274"
r="5"
fill="#0000ff" />
<circle
id="uuid-64664922-f42a-491a-8c67-0b2af6c68b69"
data-name="Out5#PJ301MPort"
cx="22.5"
cy="243.99998"
r="5"
fill="#0000ff" />
<circle
id="uuid-302b4d70-9beb-41be-8ca7-aea89e147382"
data-name="Out4#PJ301MPort"
cx="22.5"
cy="213.99998"
r="5"
fill="#0000ff" />
<circle
id="uuid-c5417d83-3085-4589-b530-a56ad2113a7b"
data-name="Out3#PJ301MPort"
cx="22.5"
cy="183.99998"
r="5"
fill="#0000ff" />
<circle
id="uuid-5ba5a970-cc8b-43a2-8f84-1d04dcf4652e"
data-name="Out2#PJ301MPort"
cx="22.5"
cy="153.99998"
r="5"
fill="#0000ff" />
<circle
id="uuid-50da49c1-b41e-4957-8748-822a89c3eed0"
data-name="Out1#PJ301MPort"
cx="22.5"
cy="124.06613"
r="5"
fill="#0000ff" />
</g>
</svg>

+ 63
- 0
src/Mult.cpp View File

@@ -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<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.62, 22.001)), module, Mult::MULT_INPUT));

addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 42.017)), module, Mult::MULT_OUTPUTS + 0));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 52.155)), module, Mult::MULT_OUTPUTS + 1));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 62.315)), module, Mult::MULT_OUTPUTS + 2));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 72.475)), module, Mult::MULT_OUTPUTS + 3));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 82.635)), module, Mult::MULT_OUTPUTS + 4));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 92.795)), module, Mult::MULT_OUTPUTS + 5));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 102.955)), module, Mult::MULT_OUTPUTS + 6));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 113.115)), module, Mult::MULT_OUTPUTS + 7));
}
};


Model* modelMult = createModel<Mult, MultWidget>("Mult");

+ 1
- 0
src/plugin.cpp View File

@@ -40,4 +40,5 @@ void init(Plugin* p) {
p->addModel(modelCompare);
p->addModel(modelGates);
p->addModel(modelProcess);
p->addModel(modelMult);
}

+ 1
- 0
src/plugin.hpp View File

@@ -40,6 +40,7 @@ extern Model* modelLogic;
extern Model* modelCompare;
extern Model* modelGates;
extern Model* modelProcess;
extern Model* modelMult;


struct DigitalDisplay : Widget {


Loading…
Cancel
Save