Help! Managed to disappear all the input/output ports in Skylights Plugin!

Here’s where I’m way out of my depth.

I have this fork of Skylights:
My branch is chaircrusher-v1-port.

These are basically all the changes from the ‘mostly working’ v1 version I posted yesterday.
If I look at what I changed it’s all pretty mundane. You can view it here:

Basically I made this change – as suggested – replacing Port::create with createInput/createOutput: i.e. going from
addInput(Port::create (mm2px(Vec(6, 22)),

(mm2px(Vec(6, 22)),

Now the modules can’t be hooked to anything and look like this:

I honestly can’t see how what I did to make this happen.


addInput(createInput(mm2px(Vec(6, 22)), ...));

looks oddly incomplete… all the calls to createInput that I can find take a port type as a template parameter, for example:

addInput(createInput<PJ301MPort>(Vec(9.507, 88.842), ...));

This is actually what’s in the source code, the funky forum editor nuked the template argument.

	    (mm2px(Vec(6, 22)),

Took a look.
If you replace the DavidLT port with the PJ3301M whatever it works
If you look in the log when you run you will see

[2.757 warn src/window.cpp:75] Failed to load SVG res/cntr_LT.svg

which is what is loaded from the

This is because your code uses loadSvg with a raw(“res/cntr_LT.svg”);

This diff fixes it

diff --git a/src/components.hh b/src/components.hh
index 5a551a9..eaf8536 100644
--- a/src/components.hh
+++ b/src/components.hh
@@ -3,6 +3,7 @@
 struct DavidLTPort : public SvgPort {
    DavidLTPort() {
-      setSvg(APP->window->loadSvg("res/cntr_LT.svg"));
+       rack::INFO( "Loading port" );
+       setSvg(APP->window->loadSvg(asset::plugin(pluginInstance,"res/cntr_LT.svg")));

except of course you want to remove the rack::INFO!

Thanks so much!

I feel a little better from the standpoint that this is a problem in code I didn’t change :wink:

1 Like