Browse Source

Update to new Rack plugin interface

tags/v0.4.0
Andrew Belt 7 years ago
parent
commit
3699e91462
16 changed files with 42 additions and 38 deletions
  1. +20
    -23
      src/AudibleInstruments.cpp
  2. +6
    -0
      src/AudibleInstruments.hpp
  3. +1
    -1
      src/Blinds.cpp
  4. +2
    -2
      src/Braids.cpp
  5. +1
    -1
      src/Branches.cpp
  6. +1
    -1
      src/Clouds.cpp
  7. +1
    -1
      src/Elements.cpp
  8. +1
    -1
      src/Kinks.cpp
  9. +1
    -1
      src/Links.cpp
  10. +1
    -1
      src/Rings.cpp
  11. +1
    -1
      src/Shades.cpp
  12. +1
    -1
      src/Sheep.cpp
  13. +1
    -1
      src/Streams.cpp
  14. +1
    -1
      src/Tides.cpp
  15. +1
    -1
      src/Veils.cpp
  16. +2
    -1
      src/Warps.cpp

+ 20
- 23
src/AudibleInstruments.cpp View File

@@ -1,28 +1,25 @@
#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");
}

+ 6
- 0
src/AudibleInstruments.hpp View File

@@ -4,6 +4,8 @@
using namespace rack;


extern Plugin *plugin;

////////////////////
// module widgets
////////////////////
@@ -64,3 +66,7 @@ struct BlindsWidget : ModuleWidget {
struct VeilsWidget : ModuleWidget {
VeilsWidget();
};

struct FramesWidget : ModuleWidget {
FramesWidget();
};

+ 1
- 1
src/Blinds.cpp View File

@@ -91,7 +91,7 @@ BlindsWidget::BlindsWidget() {

{
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;
addChild(panel);
}


+ 2
- 2
src/Braids.cpp View File

@@ -163,7 +163,7 @@ struct BraidsDisplay : TransparentWidget {
std::shared_ptr<Font> font;

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) {
@@ -201,7 +201,7 @@ BraidsWidget::BraidsWidget() {

{
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;
addChild(panel);
}


+ 1
- 1
src/Branches.cpp View File

@@ -80,7 +80,7 @@ BranchesWidget::BranchesWidget() {

{
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;
addChild(panel);
}


+ 1
- 1
src/Clouds.cpp View File

@@ -164,7 +164,7 @@ CloudsWidget::CloudsWidget() {

{
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;
addChild(panel);
}


+ 1
- 1
src/Elements.cpp View File

@@ -217,7 +217,7 @@ ElementsWidget::ElementsWidget() {

{
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;
addChild(panel);
}


+ 1
- 1
src/Kinks.cpp View File

@@ -92,7 +92,7 @@ KinksWidget::KinksWidget() {

{
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;
addChild(panel);
}


+ 1
- 1
src/Links.cpp View File

@@ -61,7 +61,7 @@ LinksWidget::LinksWidget() {

{
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;
addChild(panel);
}


+ 1
- 1
src/Rings.cpp View File

@@ -247,7 +247,7 @@ RingsWidget::RingsWidget() {

{
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;
addChild(panel);
}


+ 1
- 1
src/Shades.cpp View File

@@ -82,7 +82,7 @@ ShadesWidget::ShadesWidget() {

{
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;
addChild(panel);
}


+ 1
- 1
src/Sheep.cpp View File

@@ -193,7 +193,7 @@ SheepWidget::SheepWidget() {

{
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;
addChild(panel);
}


+ 1
- 1
src/Streams.cpp View File

@@ -53,7 +53,7 @@ StreamsWidget::StreamsWidget() {

{
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;
addChild(panel);
}


+ 1
- 1
src/Tides.cpp View File

@@ -191,7 +191,7 @@ TidesWidget::TidesWidget() {

{
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;
addChild(panel);
}


+ 1
- 1
src/Veils.cpp View File

@@ -100,7 +100,7 @@ VeilsWidget::VeilsWidget() {

{
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;
addChild(panel);
}


+ 2
- 1
src/Warps.cpp View File

@@ -144,6 +144,7 @@ struct WarpsAlgoLight : ValueLight {
}
};


WarpsWidget::WarpsWidget() {
Warps *module = new Warps();
setModule(module);
@@ -151,7 +152,7 @@ WarpsWidget::WarpsWidget() {

{
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;
addChild(panel);
}


Loading…
Cancel
Save