@@ -25,9 +25,9 @@ | |||||
borderopacity="1.0" | borderopacity="1.0" | ||||
inkscape:pageopacity="0.0" | inkscape:pageopacity="0.0" | ||||
inkscape:pageshadow="2" | 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:document-units="mm" | ||||
inkscape:current-layer="g13122" | inkscape:current-layer="g13122" | ||||
showgrid="false" | showgrid="false" | ||||
@@ -39,7 +39,8 @@ | |||||
inkscape:window-height="882" | inkscape:window-height="882" | ||||
inkscape:window-x="0" | inkscape:window-x="0" | ||||
inkscape:window-y="18" | inkscape:window-y="18" | ||||
inkscape:window-maximized="0" /> | |||||
inkscape:window-maximized="0" | |||||
inkscape:snap-global="false" /> | |||||
<metadata | <metadata | ||||
id="metadata4538"> | id="metadata4538"> | ||||
<rdf:RDF> | <rdf:RDF> | ||||
@@ -48,7 +49,7 @@ | |||||
<dc:format>image/svg+xml</dc:format> | <dc:format>image/svg+xml</dc:format> | ||||
<dc:type | <dc:type | ||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
<dc:title></dc:title> | |||||
<dc:title /> | |||||
</cc:Work> | </cc:Work> | ||||
</rdf:RDF> | </rdf:RDF> | ||||
</metadata> | </metadata> | ||||
@@ -98,7 +98,7 @@ ADSRWidget::ADSRWidget() { | |||||
{ | { | ||||
SVGPanel *panel = new SVGPanel(); | SVGPanel *panel = new SVGPanel(); | ||||
panel->box.size = box.size; | 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); | addChild(panel); | ||||
} | } | ||||
@@ -119,7 +119,7 @@ DelayWidget::DelayWidget() { | |||||
{ | { | ||||
SVGPanel *panel = new SVGPanel(); | SVGPanel *panel = new SVGPanel(); | ||||
panel->box.size = box.size; | 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); | addChild(panel); | ||||
} | } | ||||
@@ -1,25 +1,18 @@ | |||||
#include "Fundamental.hpp" | #include "Fundamental.hpp" | ||||
#include <math.h> | |||||
#include "dsp.hpp" | |||||
struct FundamentalPlugin : Plugin { | |||||
FundamentalPlugin() { | |||||
slug = "Fundamental"; | |||||
name = "Fundamental"; | |||||
createModel<VCOWidget>(this, "VCO", "VCO"); | |||||
createModel<VCFWidget>(this, "VCF", "VCF"); | |||||
createModel<VCAWidget>(this, "VCA", "VCA"); | |||||
createModel<DelayWidget>(this, "Delay", "Delay"); | |||||
createModel<ADSRWidget>(this, "ADSR", "ADSR"); | |||||
createModel<VCMixerWidget>(this, "VCMixer", "VC Mixer"); | |||||
// createModel<MultWidget>(this, "Mult", "Mult"); | |||||
createModel<ScopeWidget>(this, "Scope", "Scope"); | |||||
createModel<SEQ3Widget>(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<VCOWidget>(plugin, "VCO", "VCO"); | |||||
createModel<VCFWidget>(plugin, "VCF", "VCF"); | |||||
createModel<VCAWidget>(plugin, "VCA", "VCA"); | |||||
createModel<DelayWidget>(plugin, "Delay", "Delay"); | |||||
createModel<ADSRWidget>(plugin, "ADSR", "ADSR"); | |||||
createModel<VCMixerWidget>(plugin, "VCMixer", "VC Mixer"); | |||||
createModel<ScopeWidget>(plugin, "Scope", "Scope"); | |||||
createModel<SEQ3Widget>(plugin, "SEQ3", "SEQ-3"); | |||||
} | } |
@@ -4,6 +4,8 @@ | |||||
using namespace rack; | using namespace rack; | ||||
extern Plugin *plugin; | |||||
//////////////////// | //////////////////// | ||||
// module widgets | // module widgets | ||||
//////////////////// | //////////////////// | ||||
@@ -32,10 +34,6 @@ struct VCMixerWidget : ModuleWidget { | |||||
VCMixerWidget(); | VCMixerWidget(); | ||||
}; | }; | ||||
// struct MultWidget : ModuleWidget { | |||||
// MultWidget(); | |||||
// }; | |||||
struct ScopeWidget : ModuleWidget { | struct ScopeWidget : ModuleWidget { | ||||
ScopeWidget(); | ScopeWidget(); | ||||
}; | }; | ||||
@@ -174,7 +174,7 @@ SEQ3Widget::SEQ3Widget() { | |||||
{ | { | ||||
SVGPanel *panel = new SVGPanel(); | SVGPanel *panel = new SVGPanel(); | ||||
panel->box.size = box.size; | 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); | addChild(panel); | ||||
} | } | ||||
@@ -154,7 +154,7 @@ struct ScopeDisplay : TransparentWidget { | |||||
Stats statsX, statsY; | Stats statsX, statsY; | ||||
ScopeDisplay() { | 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) { | void drawWaveform(NVGcontext *vg, float *values, float gain, float offset) { | ||||
@@ -282,7 +282,7 @@ ScopeWidget::ScopeWidget() { | |||||
{ | { | ||||
SVGPanel *panel = new SVGPanel(); | SVGPanel *panel = new SVGPanel(); | ||||
panel->box.size = box.size; | 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); | addChild(panel); | ||||
} | } | ||||
@@ -57,7 +57,7 @@ VCAWidget::VCAWidget() { | |||||
{ | { | ||||
SVGPanel *panel = new SVGPanel(); | SVGPanel *panel = new SVGPanel(); | ||||
panel->box.size = box.size; | 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); | addChild(panel); | ||||
} | } | ||||
@@ -150,7 +150,7 @@ VCFWidget::VCFWidget() { | |||||
{ | { | ||||
SVGPanel *panel = new SVGPanel(); | SVGPanel *panel = new SVGPanel(); | ||||
panel->box.size = box.size; | 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); | addChild(panel); | ||||
} | } | ||||
@@ -60,7 +60,7 @@ VCMixerWidget::VCMixerWidget() { | |||||
{ | { | ||||
SVGPanel *panel = new SVGPanel(); | SVGPanel *panel = new SVGPanel(); | ||||
panel->box.size = box.size; | 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); | addChild(panel); | ||||
} | } | ||||
@@ -192,7 +192,7 @@ VCOWidget::VCOWidget() { | |||||
{ | { | ||||
SVGPanel *panel = new SVGPanel(); | SVGPanel *panel = new SVGPanel(); | ||||
panel->box.size = box.size; | 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); | addChild(panel); | ||||
} | } | ||||