From a693020254dec17fd77dd6d9c4f6da31b54f1117 Mon Sep 17 00:00:00 2001
From: hemmer <915048+hemmer@users.noreply.github.com>
Date: Fri, 30 Aug 2024 11:09:27 +0100
Subject: [PATCH] Add capacitor graphics
* tweak svgs for weird drawing artifact
---
res/components/cosmos_led_and.svg | 22 +++---------
res/components/cosmos_led_diff.svg | 18 ++++------
res/components/cosmos_led_nand.svg | 16 +++------
res/components/cosmos_led_nor.svg | 16 +++------
res/components/cosmos_led_or.svg | 55 +++++++++++++++--------------
res/components/cosmos_led_x.svg | 18 ++++------
res/components/cosmos_led_x_inv.svg | 22 +++---------
res/components/cosmos_led_xnor.svg | 16 +++------
res/components/cosmos_led_y.svg | 18 ++++------
res/components/cosmos_led_y_inv.svg | 22 +++---------
src/SlewLFO.cpp | 14 +++++---
11 files changed, 85 insertions(+), 152 deletions(-)
diff --git a/res/components/cosmos_led_and.svg b/res/components/cosmos_led_and.svg
index fd46e9d..6b34009 100644
--- a/res/components/cosmos_led_and.svg
+++ b/res/components/cosmos_led_and.svg
@@ -7,7 +7,7 @@
viewBox="0 0 4.9938502 5.0141191"
version="1.1"
id="svg5975"
- inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
+ inkscape:version="1.3.2 (091e20e, 2023-11-25)"
sodipodi:docname="cosmos_led_and.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
@@ -24,10 +24,10 @@
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
- inkscape:zoom="0.914906"
- inkscape:cx="-34.429766"
- inkscape:cy="9.2905719"
- inkscape:window-width="1390"
+ inkscape:zoom="32"
+ inkscape:cx="8.5625"
+ inkscape:cy="10.59375"
+ inkscape:window-width="1392"
inkscape:window-height="1205"
inkscape:window-x="0"
inkscape:window-y="25"
@@ -44,18 +44,6 @@
id="g226"
transform="matrix(0.33866667,0,0,0.33866667,-8.660883,109.2548)"
style="fill:#4d4d4d">
-
-
-
+ style="display:inline;fill:#4d4d4d" />
-
-
-
-
+ transform="matrix(0.33866667,0,0,0.33866667,87.373527,84.234932)"
+ style="fill:#000000">
+ id="path138"
+ style="fill:#000000" />
+ id="path140"
+ style="fill:#000000" />
+ id="path142"
+ style="fill:#000000"
+ sodipodi:nodetypes="cccccc" />
+ id="path144"
+ style="fill:#000000" />
+ id="path146"
+ style="fill:#000000" />
+ id="path148"
+ style="fill:#000000" />
+ id="path150"
+ style="fill:#000000" />
+ id="path152"
+ style="fill:#000000" />
+ id="path154"
+ style="fill:#000000" />
diff --git a/res/components/cosmos_led_x.svg b/res/components/cosmos_led_x.svg
index 110bd44..ec56fa8 100644
--- a/res/components/cosmos_led_x.svg
+++ b/res/components/cosmos_led_x.svg
@@ -7,7 +7,7 @@
viewBox="0 0 4.9938503 4.9927259"
version="1.1"
id="svg6213"
- inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
+ inkscape:version="1.3.2 (091e20e, 2023-11-25)"
sodipodi:docname="cosmos_led_x.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
@@ -24,13 +24,13 @@
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
- inkscape:zoom="2.587745"
- inkscape:cx="-3.2847132"
- inkscape:cy="90.233004"
- inkscape:window-width="1390"
+ inkscape:zoom="20.70196"
+ inkscape:cx="16.858307"
+ inkscape:cy="13.042243"
+ inkscape:window-width="1392"
inkscape:window-height="1205"
inkscape:window-x="3008"
- inkscape:window-y="134"
+ inkscape:window-y="106"
inkscape:window-maximized="0"
inkscape:current-layer="layer1" />
-
-
-
-
-
-
-
0 ? +value / 10.f : 0.f, deltaTime); // green
lights[firstLightId + 2].setBrightness(0.f); // blue
}
-
-
};
struct SlewInLed : BlackNoiseLed {
@@ -134,6 +132,12 @@ struct SlewOutLed : BlackNoiseLed {
}
};
+struct CapacitorPanel : SvgSwitch {
+ CapacitorPanel() {
+ addFrame(Svg::load(asset::plugin(pluginInstance, "res/components/slew_cap.svg")));
+ }
+};
+
struct SlewLFOWidget : ModuleWidget {
SlewLFOWidget(SlewLFO* module) {
setModule(module);
@@ -147,7 +151,7 @@ struct SlewLFOWidget : ModuleWidget {
addParam(createParamCentered(mm2px(Vec(10.14, 63.247)), module, SlewLFO::FALL_PARAM));
addParam(createParamCentered(mm2px(Vec(5.133, 80.944)), module, SlewLFO::MODE_PARAM));
addParam(createParamCentered(mm2px(Vec(15.197, 80.944)), module, SlewLFO::RATE_PARAM));
- addParam(createParamCentered(mm2px(Vec(10.147, 103.259)), module, SlewLFO::CAPACITOR_PARAM));
+ addParam(createParamCentered(mm2px(Vec(10.147, 103.259)), module, SlewLFO::CAPACITOR_PARAM));
addInput(createInputCentered(mm2px(Vec(5.072, 95.296)), module, SlewLFO::RISE_INPUT));
addInput(createInputCentered(mm2px(Vec(15.124, 95.296)), module, SlewLFO::FALL_INPUT));