@@ -1,28 +1,25 @@ | |||||
#include "AudibleInstruments.hpp" | #include "AudibleInstruments.hpp" | ||||
struct AudibleInstrumentsPlugin : Plugin { | |||||
AudibleInstrumentsPlugin() { | |||||
slug = "AudibleInstruments"; | |||||
name = "Audible Instruments"; | |||||
createModel<BraidsWidget>(this, "Braids", "Macro Oscillator"); | |||||
createModel<ElementsWidget>(this, "Elements", "Modal Synthesizer"); | |||||
createModel<TidesWidget>(this, "Tides", "Tidal Modulator"); | |||||
createModel<SheepWidget>(this, "Sheep", "Wavetable Oscillator"); | |||||
// createModel<StreamsWidget>(this, "Streams", "Dual Dynamics Gate"); | |||||
createModel<CloudsWidget>(this, "Clouds", "Texture Synthesizer"); | |||||
createModel<WarpsWidget>(this, "Warps", "Meta Modulator"); | |||||
createModel<RingsWidget>(this, "Rings", "Resonator"); | |||||
createModel<LinksWidget>(this, "Links", "Multiples"); | |||||
createModel<KinksWidget>(this, "Kinks", "Utilities"); | |||||
createModel<ShadesWidget>(this, "Shades", "Mixer"); | |||||
createModel<BranchesWidget>(this, "Branches", "Bernoulli Gate"); | |||||
createModel<BlindsWidget>(this, "Blinds", "Quad VC-polarizer"); | |||||
createModel<VeilsWidget>(this, "Veils", "Quad VCA"); | |||||
} | |||||
}; | |||||
Plugin *plugin; | |||||
Plugin *init() { | |||||
return new AudibleInstrumentsPlugin(); | |||||
void init(rack::Plugin *p) { | |||||
plugin = p; | |||||
plugin->slug = "AudibleInstruments"; | |||||
plugin->name = "Audible Instruments"; | |||||
createModel<BraidsWidget>(plugin, "Braids", "Macro Oscillator"); | |||||
createModel<ElementsWidget>(plugin, "Elements", "Modal Synthesizer"); | |||||
createModel<TidesWidget>(plugin, "Tides", "Tidal Modulator"); | |||||
createModel<SheepWidget>(plugin, "Sheep", "Wavetable Oscillator"); | |||||
// createModel<StreamsWidget>(plugin, "Streams", "Dual Dynamics Gate"); | |||||
createModel<CloudsWidget>(plugin, "Clouds", "Texture Synthesizer"); | |||||
createModel<WarpsWidget>(plugin, "Warps", "Meta Modulator"); | |||||
createModel<RingsWidget>(plugin, "Rings", "Resonator"); | |||||
createModel<LinksWidget>(plugin, "Links", "Multiples"); | |||||
createModel<KinksWidget>(plugin, "Kinks", "Utilities"); | |||||
createModel<ShadesWidget>(plugin, "Shades", "Mixer"); | |||||
createModel<BranchesWidget>(plugin, "Branches", "Bernoulli Gate"); | |||||
createModel<BlindsWidget>(plugin, "Blinds", "Quad VC-polarizer"); | |||||
createModel<VeilsWidget>(plugin, "Veils", "Quad VCA"); | |||||
createModel<FramesWidget>(plugin, "Frames", "Keyframer"); | |||||
} | } |
@@ -4,6 +4,8 @@ | |||||
using namespace rack; | using namespace rack; | ||||
extern Plugin *plugin; | |||||
//////////////////// | //////////////////// | ||||
// module widgets | // module widgets | ||||
//////////////////// | //////////////////// | ||||
@@ -64,3 +66,7 @@ struct BlindsWidget : ModuleWidget { | |||||
struct VeilsWidget : ModuleWidget { | struct VeilsWidget : ModuleWidget { | ||||
VeilsWidget(); | VeilsWidget(); | ||||
}; | }; | ||||
struct FramesWidget : ModuleWidget { | |||||
FramesWidget(); | |||||
}; |
@@ -91,7 +91,7 @@ BlindsWidget::BlindsWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Blinds.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Blinds.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -163,7 +163,7 @@ struct BraidsDisplay : TransparentWidget { | |||||
std::shared_ptr<Font> font; | std::shared_ptr<Font> font; | ||||
BraidsDisplay() { | BraidsDisplay() { | ||||
font = Font::load("plugins/AudibleInstruments/res/hdad-segment14-1.002/Segment14.ttf"); | |||||
font = Font::load(assetPlugin(plugin, "res/hdad-segment14-1.002/Segment14.ttf")); | |||||
} | } | ||||
void draw(NVGcontext *vg) { | void draw(NVGcontext *vg) { | ||||
@@ -201,7 +201,7 @@ BraidsWidget::BraidsWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Braids.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Braids.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -80,7 +80,7 @@ BranchesWidget::BranchesWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Branches.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Branches.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -164,7 +164,7 @@ CloudsWidget::CloudsWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Clouds.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Clouds.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -217,7 +217,7 @@ ElementsWidget::ElementsWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Elements.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Elements.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -92,7 +92,7 @@ KinksWidget::KinksWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Kinks.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Kinks.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -61,7 +61,7 @@ LinksWidget::LinksWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Links.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Links.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -247,7 +247,7 @@ RingsWidget::RingsWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Rings.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Rings.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -82,7 +82,7 @@ ShadesWidget::ShadesWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Shades.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Shades.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -193,7 +193,7 @@ SheepWidget::SheepWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Sheep.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Sheep.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -53,7 +53,7 @@ StreamsWidget::StreamsWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Streams.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Streams.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -191,7 +191,7 @@ TidesWidget::TidesWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Tides.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Tides.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -100,7 +100,7 @@ VeilsWidget::VeilsWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Veils.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Veils.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||
@@ -144,6 +144,7 @@ struct WarpsAlgoLight : ValueLight { | |||||
} | } | ||||
}; | }; | ||||
WarpsWidget::WarpsWidget() { | WarpsWidget::WarpsWidget() { | ||||
Warps *module = new Warps(); | Warps *module = new Warps(); | ||||
setModule(module); | setModule(module); | ||||
@@ -151,7 +152,7 @@ WarpsWidget::WarpsWidget() { | |||||
{ | { | ||||
Panel *panel = new LightPanel(); | Panel *panel = new LightPanel(); | ||||
panel->backgroundImage = Image::load("plugins/AudibleInstruments/res/Warps.png"); | |||||
panel->backgroundImage = Image::load(assetPlugin(plugin, "res/Warps.png")); | |||||
panel->box.size = box.size; | panel->box.size = box.size; | ||||
addChild(panel); | addChild(panel); | ||||
} | } | ||||