Global Cable Bug:
-
@griffinboy Are you defining the global cables in your onInit of your interface?
-
Main UI Code:
const var rm = Engine.getGlobalRoutingManager(); // Create the Cables const var mc1 = rm.getCable("GC1"); const var mc2 = rm.getCable("GC2"); const var mc3 = rm.getCable("GC3"); mc1.setRange(0, 1); mc2.setRange(0, 1); mc3.setRange(0, 1); // Register callbacks for all three cables mc1.registerCallback(function(value) { calibrateState(); }, AsyncNotification); mc2.registerCallback(function(value) { calibrateState(); }, AsyncNotification); mc3.registerCallback(function(value) { calibrateState(); }, AsyncNotification);
And my nodes look like this:
// ==================================| Third Party Node Template |================================== #pragma once #include <JuceHeader.h> #include "src/GlobalCables.h" #include <cmath> namespace project { using namespace juce; using namespace hise; using namespace scriptnode; using cable_manager_t = routing::global_cable_cpp_manager<SN_GLOBAL_CABLE(70357), SN_GLOBAL_CABLE(70358), SN_GLOBAL_CABLE(70359), SN_GLOBAL_CABLE(70360), SN_GLOBAL_CABLE(70361), SN_GLOBAL_CABLE(70362)>; // ==========================| The node class with all required callbacks |========================== template <int NV> struct Lufs_Out_One : public data::base, public cable_manager_t { // Metadata Definitions ------------------------------------------------------------------------ SNEX_NODE(Lufs_Out_One); struct MetadataClass { SN_NODE_ID("Lufs_Out_One"); };
#include "src/GlobalCables.h"
#pragma once namespace project { enum class GlobalCables { GC1 = 0, GC2 = 1, GC3 = 2, GC4 = 3, GC5 = 4, GC6 = 5 }; }
-
The on init isn't actually a function is it?
I've never seen it before I assumed that the main interface script already embodies this -
@griffinboy yup it calls everything in
onInit
when you compile the script / load the plugin. -
Just checked again with a slightler more complex test project and three cables, and it works here.
-
I cannot find any xml file for the Hise save in that upload sorry!
I'd like to poke around and see what the difference is between our projects. -
@griffinboy Ah, it's the hip file. Isn't it included in the archive?
-
@Christoph-Hart
Hip File! I've never heard of them!
You mentioned this earlier but I didn't enquire let me look for it.How do you open these? It's not in the docs when I search for the term
-
-
Curious.
Yours works for sure.The only immediate difference I can see is this:
Mine
YoursYours seems to have (3) whilst mine says (2) I assume this is connections? I never really understood it.
-
@griffinboy lol I just pasted your code and there it creates three cables.
If you donβt create the other three but use them in your nodes then thatβs your answer: you have to define all cables that you use in the script code, the nodes can not create cables.
-
Oh no sorry, my code was a simplification!
I have many and they are defined in identical fashion.As you can see none of them light up.
I'm going to try and recreate the issue in a new project.
Funny thing is that all cables work when you delete and reimport the nodes. But never on startup
-
@griffinboy does it help when you recompile all nodes (from the tools menu)?
This should reinitialise the cable connections.
-
@Christoph-Hart
Unfortunately not.
I'll work on it and get back to you when I have a smaller project to share. -
Hi, I've been unable to replicate it since, probably due to the complex mess that is the project in question.
And so I'll ask instead, is there any way for me to delete stored data for maybe the cables / dsp networks, so that I can attempt to compile fresh and remake the connections?
I've tried deleting all the project saves and presets, as well as removing and adding back the code for the GCs but neither solved my issue:
As soon as I reload the project XML my global cables disconnect from my nodes. -
plus it would be nice to have a way to delete cables...
Cue: someone telling me just how easy it is...
-
From what I've seen, removing all code that uses a cable, or removing the global cable manager, does the trick: they all disappear.
But yeah, I've not used cables much I've always had issues with them. But they seem to work now, just not in this one project
-
@griffinboy said in Global Cable Bug::
From what I've seen, removing all code that uses a cable, or removing the global cable manager, does the trick: they all disappear.
But yeah, I've not used cables much I've always had issues with them. But they seem to work now, just not in this one project
yeah Ive done this:
"removing all code that uses a cable".... its still there - maybe I missed something.