HISE Logo Forum
    • Categories
    • Register
    • Login

    'global_send' / How can I 'getValue() ?

    Scheduled Pinned Locked Moved Solved Scripting
    5 Posts 3 Posters 33 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.
    • ChazroxC
      Chazrox
      last edited by Chazrox

      I need to get this value from my ScriptNode 'global_send' cable within a script in onInit.

      // I need to be able to:
      
      Slot.DelayLeft.getValue();
      
      // How do I do this? 
      

      This is what i've been trying so far...

      const var globalRouting = Engine.getGlobalRoutingManager();
      const var SlotFxDelayLeft = globalRouting.getCable("Slot.DelayLeft");
      Console.print(SlotFxDelayLeft.getValue());
      
      const var delayTimer = Engine.createTimerObject();
      
      delayTimer.setTimerCallback(function()
      {
      	if (SlotFxDelayLeft.getValue() == 1.0);
      	{
      		//Console.print("ONNNN");
      	}
      	
      });
      delayTimer.startTimer(20);
      
      

      Screenshot 2025-10-14 at 6.20.04 AM.png

      Im trying to get an LED animation to respond to the delay signals so I need to get the signal value and this was how I thought to do it. You can let me know if this is not a good approach.

      Screenshot 2025-10-14 at 6.27.05 AM.png

      Thanks! 🙏

      Christoph HartC HISEnbergH 2 Replies Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart @Chazrox
        last edited by

        @Chazrox you don't need to poll the value with a timer, just attach a asynchronous callback to the cable and it will do the same thing.

        ChazroxC 1 Reply Last reply Reply Quote 0
        • HISEnbergH
          HISEnberg @Chazrox
          last edited by

          @Chazrox Try a Global Cable instead! There's a few posts on this, I know I shared one very recently which I believe will answer your question.

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

            @Christoph-Hart I found one of your examples in docs, I've been trying this but getting an error I cant figure out.

            Screenshot 2025-10-14 at 7.08.57 AM.png

            const var globalRouting = Engine.getGlobalRoutingManager();
            const var SlotFxDelayLeft = globalRouting.getCable("Slot.DelayLeft");
            Console.print(SlotFxDelayLeft.getValue());
            
            
            // Register the callback
            SlotFxDelayLeft.registerDataCallback(function(data)
            {
            	Console.print("DATA: " + trace(data));
            });
            
            
            1 Reply Last reply Reply Quote 0
            • ChazroxC
              Chazrox
              last edited by

              UPDATE:

              I figured it out...

              const var globalRouting = Engine.getGlobalRoutingManager();
              const var SlotFxDelayLeft = globalRouting.getCable("Slot.DelayLeft");
              Console.print(SlotFxDelayLeft.getValue());
              
              
              // Register the callback
              SlotFxDelayLeft.registerCallback(function(value)
              {
              	Console.print(value);
              }, AsyncNotification);
              
              // Values print =)
              

              @Christoph-Hart @HISEnberg Thank You! 🙏

              1 Reply Last reply Reply Quote 0
              • ChazroxC Chazrox has marked this topic as solved
              • First post
                Last post

              19

              Online

              2.0k

              Users

              12.7k

              Topics

              110.1k

              Posts