HISE Logo Forum
    • Categories
    • Register
    • Login

    Sliderpack: how to access single slider values

    Scheduled Pinned Locked Moved Scripting
    3 Posts 2 Posters 240 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.
    • toxonicT
      toxonic
      last edited by

      sorry, i'm very new to hise and i guess, that's a noob question... hope you can help me.
      i' trying to access the single values of a sliderpack within an oncontrol callback function. these values seem to be stored in an array, so i thought, i can access a single slider value via it's index like this:

      inline function onSliderPack1Control(component, value)
      {
      	Console.print(value[0]);
      };
      
      Content.getComponent("SliderPack1").setControlCallback(onSliderPack1Control);
      
      

      after compiling, the initial value is printed on the console, but when i move the first slider of the pack i get the message "API call with undefined parameter 0":

      Interface: 0.76999998
      Interface: Compiled OK
      Interface:! Line 6, column 18: API call with undefined parameter 0 {SW50ZXJmYWNlfHwxMTl8NnwxOA==}
      Interface:! Line 6, column 18: API call with undefined parameter 0 {SW50ZXJmYWNlfHwxMTl8NnwxOA==}
      Interface:! Line 6, column 18: API call with undefined parameter 0 {SW50ZXJmYWNlfHwxMTl8NnwxOA==}
      Interface:! Line 6, column 18: API call with undefined parameter 0 {SW50ZXJmYWNlfHwxMTl8NnwxOA==}
      Interface:! Line 6, column 18: API call with undefined parameter 0 {SW50ZXJmYWNlfHwxMTl8NnwxOA==}
      

      what does that mean, what am i missing?

      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        Can't remember for sure but I think it's component.getSliderValueAt(); that you need. And you'll need to pass an index into the function.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        1 Reply Last reply Reply Quote 0
        • toxonicT
          toxonic
          last edited by

          thank you much, that did the trick! :-)

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

          20

          Online

          1.8k

          Users

          12.1k

          Topics

          105.4k

          Posts