HISE Logo Forum
    • Categories
    • Register
    • Login

    Global Cable Bug:

    Scheduled Pinned Locked Moved Unsolved Bug Reports
    19 Posts 3 Posters 1.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Christoph HartC
      Christoph Hart @griffinboy
      last edited by

      @griffinboy Are you defining the global cables in your onInit of your interface?

      griffinboyG 2 Replies Last reply Reply Quote 1
      • griffinboyG
        griffinboy @Christoph Hart
        last edited by griffinboy

        @Christoph-Hart

        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
        };
            
        }
        
        
        
        1 Reply Last reply Reply Quote 0
        • griffinboyG
          griffinboy @Christoph Hart
          last edited by

          @Christoph-Hart

          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

          Christoph HartC 1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart @griffinboy
            last edited by

            @griffinboy yup it calls everything in onInit when you compile the script / load the plugin.

            Christoph HartC 1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart @Christoph Hart
              last edited by

              Just checked again with a slightler more complex test project and three cables, and it works here.

              GlobalCableTest2.zip

              griffinboyG 1 Reply Last reply Reply Quote 0
              • griffinboyG
                griffinboy @Christoph Hart
                last edited by griffinboy

                @Christoph-Hart

                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.

                Christoph HartC 1 Reply Last reply Reply Quote 0
                • Christoph HartC
                  Christoph Hart @griffinboy
                  last edited by

                  @griffinboy Ah, it's the hip file. Isn't it included in the archive?

                  griffinboyG 1 Reply Last reply Reply Quote 0
                  • griffinboyG
                    griffinboy @Christoph Hart
                    last edited by griffinboy

                    @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

                    Christoph HartC 1 Reply Last reply Reply Quote 0
                    • Christoph HartC
                      Christoph Hart @griffinboy
                      last edited by

                      @griffinboy

                      Link Preview Image
                      HISE | HISE | File Menu

                      The file menu

                      favicon

                      (docs.hise.dev)

                      griffinboyG 1 Reply Last reply Reply Quote 0
                      • griffinboyG
                        griffinboy @Christoph Hart
                        last edited by griffinboy

                        @Christoph-Hart

                        Curious.
                        Yours works for sure.

                        The only immediate difference I can see is this:

                        9f3f9cad-15b2-4451-a522-49007cf3e8e3-image.png
                        Mine

                        0e03f870-c191-4620-8e70-2a1c6bd2ff63-image.png
                        Yours

                        Yours seems to have (3) whilst mine says (2) I assume this is connections? I never really understood it.

                        Christoph HartC 1 Reply Last reply Reply Quote 0
                        • Christoph HartC
                          Christoph Hart @griffinboy
                          last edited by

                          @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.

                          griffinboyG 1 Reply Last reply Reply Quote 0
                          • griffinboyG
                            griffinboy @Christoph Hart
                            last edited by griffinboy

                            @Christoph-Hart

                            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

                            Christoph HartC 1 Reply Last reply Reply Quote 0
                            • Christoph HartC
                              Christoph Hart @griffinboy
                              last edited by

                              @griffinboy does it help when you recompile all nodes (from the tools menu)?

                              This should reinitialise the cable connections.

                              griffinboyG 2 Replies Last reply Reply Quote 0
                              • griffinboyG
                                griffinboy @Christoph Hart
                                last edited by

                                @Christoph-Hart
                                Unfortunately not.
                                I'll work on it and get back to you when I have a smaller project to share.

                                1 Reply Last reply Reply Quote 0
                                • griffinboyG
                                  griffinboy @Christoph Hart
                                  last edited by

                                  @Christoph-Hart

                                  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.

                                  LindonL 1 Reply Last reply Reply Quote 0
                                  • LindonL
                                    Lindon @griffinboy
                                    last edited by

                                    plus it would be nice to have a way to delete cables...

                                    Cue: someone telling me just how easy it is...

                                    HISE Development for hire.
                                    www.channelrobot.com

                                    griffinboyG 1 Reply Last reply Reply Quote 0
                                    • griffinboyG
                                      griffinboy @Lindon
                                      last edited by griffinboy

                                      @Lindon

                                      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 ๐Ÿ˜†

                                      LindonL 1 Reply Last reply Reply Quote 0
                                      • LindonL
                                        Lindon @griffinboy
                                        last edited by

                                        @griffinboy said in Global Cable Bug::

                                        @Lindon

                                        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.

                                        HISE Development for hire.
                                        www.channelrobot.com

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post

                                        35

                                        Online

                                        1.8k

                                        Users

                                        12.0k

                                        Topics

                                        104.5k

                                        Posts