diff --git a/res/VCO.svg b/res/VCO.svg
index b9177e7..6846d25 100644
--- a/res/VCO.svg
+++ b/res/VCO.svg
@@ -25,9 +25,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="9.2459846"
- inkscape:cy="190.568"
+ inkscape:zoom="5.6"
+ inkscape:cx="97.479243"
+ inkscape:cy="348.565"
inkscape:document-units="mm"
inkscape:current-layer="g13122"
showgrid="false"
@@ -39,7 +39,8 @@
inkscape:window-height="882"
inkscape:window-x="0"
inkscape:window-y="18"
- inkscape:window-maximized="0" />
+ inkscape:window-maximized="0"
+ inkscape:snap-global="false" />
@@ -48,7 +49,7 @@
image/svg+xml
-
+
diff --git a/src/ADSR.cpp b/src/ADSR.cpp
index c1197aa..f63db26 100644
--- a/src/ADSR.cpp
+++ b/src/ADSR.cpp
@@ -98,7 +98,7 @@ ADSRWidget::ADSRWidget() {
{
SVGPanel *panel = new SVGPanel();
panel->box.size = box.size;
- panel->setBackground(SVG::load("plugins/Fundamental/res/ADSR.svg"));
+ panel->setBackground(SVG::load(assetPlugin(plugin, "res/ADSR.svg")));
addChild(panel);
}
diff --git a/src/Delay.cpp b/src/Delay.cpp
index bb2f46e..822220c 100644
--- a/src/Delay.cpp
+++ b/src/Delay.cpp
@@ -119,7 +119,7 @@ DelayWidget::DelayWidget() {
{
SVGPanel *panel = new SVGPanel();
panel->box.size = box.size;
- panel->setBackground(SVG::load("plugins/Fundamental/res/Delay.svg"));
+ panel->setBackground(SVG::load(assetPlugin(plugin, "res/Delay.svg")));
addChild(panel);
}
diff --git a/src/Fundamental.cpp b/src/Fundamental.cpp
index 6e55479..b50464d 100644
--- a/src/Fundamental.cpp
+++ b/src/Fundamental.cpp
@@ -1,25 +1,18 @@
#include "Fundamental.hpp"
-#include
-#include "dsp.hpp"
-struct FundamentalPlugin : Plugin {
- FundamentalPlugin() {
- slug = "Fundamental";
- name = "Fundamental";
- createModel(this, "VCO", "VCO");
- createModel(this, "VCF", "VCF");
- createModel(this, "VCA", "VCA");
- createModel(this, "Delay", "Delay");
- createModel(this, "ADSR", "ADSR");
- createModel(this, "VCMixer", "VC Mixer");
- // createModel(this, "Mult", "Mult");
- createModel(this, "Scope", "Scope");
- createModel(this, "SEQ3", "SEQ-3");
- }
-};
+Plugin *plugin;
-
-Plugin *init() {
- return new FundamentalPlugin();
+void init(rack::Plugin *p) {
+ plugin = p;
+ plugin->slug = "Fundamental";
+ plugin->name = "Fundamental";
+ createModel(plugin, "VCO", "VCO");
+ createModel(plugin, "VCF", "VCF");
+ createModel(plugin, "VCA", "VCA");
+ createModel(plugin, "Delay", "Delay");
+ createModel(plugin, "ADSR", "ADSR");
+ createModel(plugin, "VCMixer", "VC Mixer");
+ createModel(plugin, "Scope", "Scope");
+ createModel(plugin, "SEQ3", "SEQ-3");
}
diff --git a/src/Fundamental.hpp b/src/Fundamental.hpp
index 5cc0acc..550bd8d 100644
--- a/src/Fundamental.hpp
+++ b/src/Fundamental.hpp
@@ -4,6 +4,8 @@
using namespace rack;
+extern Plugin *plugin;
+
////////////////////
// module widgets
////////////////////
@@ -32,10 +34,6 @@ struct VCMixerWidget : ModuleWidget {
VCMixerWidget();
};
-// struct MultWidget : ModuleWidget {
-// MultWidget();
-// };
-
struct ScopeWidget : ModuleWidget {
ScopeWidget();
};
diff --git a/src/SEQ3.cpp b/src/SEQ3.cpp
index c97e6f8..90dfa9e 100644
--- a/src/SEQ3.cpp
+++ b/src/SEQ3.cpp
@@ -174,7 +174,7 @@ SEQ3Widget::SEQ3Widget() {
{
SVGPanel *panel = new SVGPanel();
panel->box.size = box.size;
- panel->setBackground(SVG::load("plugins/Fundamental/res/SEQ3.svg"));
+ panel->setBackground(SVG::load(assetPlugin(plugin, "res/SEQ3.svg")));
addChild(panel);
}
diff --git a/src/Scope.cpp b/src/Scope.cpp
index 8db7754..eded236 100644
--- a/src/Scope.cpp
+++ b/src/Scope.cpp
@@ -154,7 +154,7 @@ struct ScopeDisplay : TransparentWidget {
Stats statsX, statsY;
ScopeDisplay() {
- font = Font::load("plugins/Fundamental/res/DejaVuSansMono.ttf");
+ font = Font::load(assetPlugin(plugin, "res/DejaVuSansMono.ttf"));
}
void drawWaveform(NVGcontext *vg, float *values, float gain, float offset) {
@@ -282,7 +282,7 @@ ScopeWidget::ScopeWidget() {
{
SVGPanel *panel = new SVGPanel();
panel->box.size = box.size;
- panel->setBackground(SVG::load("plugins/Fundamental/res/Scope.svg"));
+ panel->setBackground(SVG::load(assetPlugin(plugin, "res/Scope.svg")));
addChild(panel);
}
diff --git a/src/VCA.cpp b/src/VCA.cpp
index 97d0332..4224455 100644
--- a/src/VCA.cpp
+++ b/src/VCA.cpp
@@ -57,7 +57,7 @@ VCAWidget::VCAWidget() {
{
SVGPanel *panel = new SVGPanel();
panel->box.size = box.size;
- panel->setBackground(SVG::load("plugins/Fundamental/res/VCA.svg"));
+ panel->setBackground(SVG::load(assetPlugin(plugin, "res/VCA.svg")));
addChild(panel);
}
diff --git a/src/VCF.cpp b/src/VCF.cpp
index 323733e..86e94d0 100644
--- a/src/VCF.cpp
+++ b/src/VCF.cpp
@@ -150,7 +150,7 @@ VCFWidget::VCFWidget() {
{
SVGPanel *panel = new SVGPanel();
panel->box.size = box.size;
- panel->setBackground(SVG::load("plugins/Fundamental/res/VCF.svg"));
+ panel->setBackground(SVG::load(assetPlugin(plugin, "res/VCF.svg")));
addChild(panel);
}
diff --git a/src/VCMixer.cpp b/src/VCMixer.cpp
index 44fbe99..11ea90f 100644
--- a/src/VCMixer.cpp
+++ b/src/VCMixer.cpp
@@ -60,7 +60,7 @@ VCMixerWidget::VCMixerWidget() {
{
SVGPanel *panel = new SVGPanel();
panel->box.size = box.size;
- panel->setBackground(SVG::load("plugins/Fundamental/res/VCMixer.svg"));
+ panel->setBackground(SVG::load(assetPlugin(plugin, "res/VCMixer.svg")));
addChild(panel);
}
diff --git a/src/VCO.cpp b/src/VCO.cpp
index 393d5f7..5ed4b01 100644
--- a/src/VCO.cpp
+++ b/src/VCO.cpp
@@ -192,7 +192,7 @@ VCOWidget::VCOWidget() {
{
SVGPanel *panel = new SVGPanel();
panel->box.size = box.size;
- panel->setBackground(SVG::load("plugins/Fundamental/res/VCO.svg"));
+ panel->setBackground(SVG::load(assetPlugin(plugin, "res/VCO.svg")));
addChild(panel);
}