Global Cables Flag?
-
I have a scriptnode with a global cable. Works fine in HISE but not in the compiled plugin. Is there a flag that needs to be put in the extra definitions in order to use them? If so what is it?
-
This is very familiar. There used to be a bug where all these were broken. I haven't tested it recently, I thought it had been resolved.
I remember it being the case that you have to define them all, I'm guessing you've done this stuff?
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 cable mc1.registerCallback(function(value) { calibrateState(); }, AsyncNotification);
edit* you know what, cables were messed up on Nebula and still are. I forgot that one of my projects has completely broken cables. I wonder if there is a persistent issue still
-
@griffinboy Yes the ghosts of global cables are coming back to haunt me now. My set up is quite similar to yours.
I think some people here have successfully released projects with global cables however. Isn't there a preprocessor definition for them however, something like "ENABLE_GLOBALCABELS" ?
I actually just found this old post which is an extremely useful list of all preprocessor definitions. @Christoph-Hart and/or @Dominik-Mayer could we get these uploaded to the HISE docs? I always struggle to find these:
OG post: https://forum.hise.audio/topic/8023/preprocesor-definitions
HISE Definitions: https://docs.google.com/spreadsheets/d/1crdLOkfyebQZefBQBJEXMisHs2qPkUafBtBjgVM-ir4/edit?gid=1018116899#gid=1018116899
PROJUCER Definitions:
https://docs.google.com/spreadsheets/d/1_1VHwHgDNo2ruV4zDOWTKKGUDnS2SOWEHOwHAZKcNHw/edit?gid=1220927349#gid=1220927349 -
I have no problems with Global Cables in version 4.0
Leave here my github with a compressor in faust connected to two global cables in HISE. I compiled the project and I can see the Gain Reduction in the final plugin (win & osx).waitingroom/HISE/PumpCompressor at main · P23ASURE/waitingroom
Hi League! Contribute to P23ASURE/waitingroom development by creating an account on GitHub.
GitHub (github.com)
I reopened the project and checked, I didn't add Extra Definition
 -
Yes global cables are supposed to work without any special flags, but you have to create the cable in your main script as the compiled nodes do not have that ability.