HISE Logo Forum
    • Categories
    • Register
    • Login

    How to use Global Cables in fx plugin

    Scheduled Pinned Locked Moved General Questions
    10 Posts 7 Posters 201 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.
    • JulesVJ
      JulesV
      last edited by

      I'm gonna use Global Cables for the first time in my fx project.

      There are posts on the forum but does anyone have any suggestions on how I can get started?

      resonantR JulesVJ 2 Replies Last reply Reply Quote 0
      • resonantR
        resonant @JulesV
        last edited by

        @JulesV You can start with this:

        Link Preview Image
        HISE | Examples | Scriptnode Snippets

        Examples in the category Scriptnode

        favicon

        (docs.hise.audio)

        JulesVJ 1 Reply Last reply Reply Quote 1
        • JulesVJ
          JulesV @resonant
          last edited by

          @resonant Thanks!

          1 Reply Last reply Reply Quote 0
          • JulesVJ
            JulesV @JulesV
            last edited by

            Is it possible to use Global Cable in HarcodedMasterFX?

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

              @JulesV

              I think it struggles in that case, unless it was coded in c++

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

                @griffinboy nope should be fine, I think the issue is if you load the compiled fx into a network instead if a hardcoded fx module.

                HISEnbergH 1 Reply Last reply Reply Quote 1
                • HISEnbergH
                  HISEnberg @Christoph Hart
                  last edited by

                  @Christoph-Hart I can vouch for this I've been using them in my hard-coded fx without issue !

                  1 Reply Last reply Reply Quote 1
                  • JulesVJ
                    JulesV
                    last edited by JulesV

                    Yes I was also be able to load it in Hardcoded.

                    However, on initialization, it gives the error undefined parameter for this.data.value

                    Why it does that?

                    const var MyPnl = Content.getComponent("MyPnl");
                    
                    const var rm = Engine.getGlobalRoutingManager();
                    const var mc = rm.getCable("dlyDuckGR");
                    
                    mc.registerCallback(function(value)
                    {	
                    	MyPnl.data.value = Engine.doubleToString(Engine.getDecibelsForGainFactor(value), 1);
                    	MyPnl.repaint();
                    }, AsyncNotification);
                    
                    MyPnl.setPaintRoutine(function(g)
                    {
                        g.setFont("Arial", (12)); 
                        g.setColour(Colours.white);
                        g.drawAlignedText(this.data.value, [71, 0, 60, 20], "left");
                    	
                    });
                    
                    
                    
                    
                    LindonL DanHD 2 Replies Last reply Reply Quote 0
                    • LindonL
                      Lindon @JulesV
                      last edited by

                      @JulesV possibly a timing issue - the paint routine might be executing (on init) before the Global cable has had a chance to send a value, or before the panel has had a chance to load its data...try checking your this.data.value is defined...

                      HISE Development for hire.
                      www.channelrobot.com

                      1 Reply Last reply Reply Quote 1
                      • DanHD
                        DanH @JulesV
                        last edited by

                        @JulesV I seem to remember getting that too but everything worked fine, the project would compile and export. @Lindon's explanation seems plausible.

                        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                        https://dhplugins.com/ | https://dcbreaks.com/
                        London, UK

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

                        23

                        Online

                        1.8k

                        Users

                        11.9k

                        Topics

                        104.0k

                        Posts