HISE Logo Forum
    • Categories
    • Register
    • Login

    L+R Channel Volume link button

    Scheduled Pinned Locked Moved Scripting
    4 Posts 3 Posters 131 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.
    • K
      kekient
      last edited by

      Hello friends, I'm trying to make 2 volume sliders to control the volume of L and R channels. I scripted the link button and it works great but as soon as I link the sliders to the dedicated controls in scriptnode the link button stops working. Am I missing something?

      const var Lslider = Content.getComponent("Lslider");
      const var Rslider = Content.getComponent("Rslider");
      const var LRlink = Content.getComponent("LRlink");
      
      inline function onLsliderControl(component, value)
      {
      	if (LRlink.getValue())
      	{
      		Rslider.setValue(value);
      		Rslider.changed();
      	}
      };
      Lslider.setControlCallback(onLsliderControl);
      
      inline function onRsliderControl(component, value)
      {
      	if (LRlink.getValue())
      	{
      		Lslider.setValue(value);
      		Lslider.changed();
      	}
      };
      
      Rslider.setControlCallback(onRsliderControl);
      
      Matt_SFM 1 Reply Last reply Reply Quote 0
      • Matt_SFM
        Matt_SF @kekient
        last edited by

        @kekient Linking the controls using the interface designer take precedence over the scripted callback. You'll have to script the linking of the sliders AND the scriptnode parameters handling.

        Develop branch
        Win10 & VS17 / Ventura & Xcode 14. 3

        K 1 Reply Last reply Reply Quote 0
        • K
          kekient @Matt_SF
          last edited by

          @Matt_SF thank you so much

          O 1 Reply Last reply Reply Quote 0
          • O
            Orvillain @kekient
            last edited by

            @kekient I recommend playing around with broadcasters. They're meant for exactly this sort of situation - controlling multiple things at once from a callback function.

            This is currently my area of exploration too, and making good progress with it.

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

            17

            Online

            1.7k

            Users

            11.8k

            Topics

            102.3k

            Posts