Sliderpack: how to access single slider values



  • 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?



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



  • thank you much, that did the trick! 🙂


Log in to reply
 

10
Online

556
Users

2.1k
Topics

16.5k
Posts