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EwAPIO5+Fg73cUzl8+03v3xKUF0EdMzyssUIBeG3gGuL2eJjY4oPlUlBYdvTHypSgLObJj4QSTF0CQWKTJ5FWjDXXUONvxnd+.qbn+FP0tlvS

    I downloaded this snippet from ulrik. It works very well.
    However, I would like to set the value of the button by script.
    And this does not work. The SliderPack updates itself only after recompiling.
    Otherwise it does not react.

    Is this a bug?
    I have read all the articles about this and have been trying for hours.
    If this is a bug in the end then I'm freaking out :-))



  • @MikeB I don't really understand what is not working here... The slider sets the first slider in the pack and vice versa successfully according to the script. What do you want to achieve? set all sliders at once with the same value?



  • Sorry - Wrong snippet here the right one!
    You can't create a second slider that controls the first slider.
    So that the first slider changes the values of the SliderPack per script.
    That does not work.

    HiseSnippet 1863.3oc4Y0uaSbDDeu3rArACDJRsRUU5JpB4HQC17YkPHrc9flRBwxNDQ6+.atas81bd2q2sWHon7N0mfJdf5evaP6r6cm85KNlKt.sp0HBY1clY+MyN67goUfvgFFJBPVE24HeJx5h3NGwk8WoOgwQarJx5F3mxE6Y6zmv6QsIdd1GP7hng1BtcGOlKMvm3rOp4Q9jvPpKxxpvSTxZUbdj9y6dbShGg6PGsDBsqf4P2jMfIGsZq5Ok44sNwktCafA22s9FNB9JBOQDfyB3pH0IR5QeFQw1bXj0Bq4xjhfNRhjFhrluov8nN8EulGy+trP1ddTEQMTGPQwKutvyUgX0pnU5y7bak5OBQHKbqQdmBwdmqg2h4xFt9HuzUzaXORBS+g0bSCd0LgW07COKC3MeL7VD2wIf4KGsiBaW.uAWRC5Rfq.SXEyKZteu.dEAvAWt7.x9z0C.hgRT49UqdS66Us5ROrboxkfKhPIDADX+rmU09Q1oB1iJWQLvWvAhJWG165J9Gwci.+ZmJ6pMudV8qh5NcQz6lHi5OLtGiSs6FwcjLHxTvALnDMP3UwIUtaFG6tT4RuobIa3SQVW6JoqYm74MveU5rnh3V2RgtkCox3f8FfqwkdXEvojH3ROz9Lv6niIk2Fdd6peQkviAKGWtzw.4TbxJEjXlq.uM2CdXTw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potVhtX0kvwnHYoSzxDJG5nLtspH5YVEFcEbYL7Joipha7ZYTxUpmGkbArRCZrLan3JZEzYe1o.CcC.uW2AnEQf7oziB+63Q.iwmRc08.kQA23jdiqjn.n+j8DMEGpUAjtm9KQTHm8vkyuAY.kx3scjP2RsUMnLaVSQbm9PZcO5rEgcA7ZbUZgcXzoYBSepfqAtiArcf12L138LiPqkWA9YiMger5Awzn7ed6B02bf1Nx+4MwYRx44cU7lTdOY+7eZ9MfSiuNbZc+oVwzn7EZsHNojVGpGzaiHOOUlnh9b71QR+H4GH0sHdqVqA4PCRU3IbA47sykUJZMt6onlp0ySX6B3uGpvMgP9OYMg+gofVwTL1gopeuF+.HvFVQgwqBiAqGvJc0wqqskfK76K3LmwaSBZ6oWOZfI1mnA0PJUAxCW4Z0aCgHjPC+42TeSFmRBFu6uyjunV98ES695Kvwv0V04q8+MFdpv+6GdZZttKkL5jsNmy+xumuHV2rusZ1r+ofZaQjDl4JctGcaev.gPKJFiHMmpqfX5pJZEf5P4tZh+D9jrYsz4oTaVKcSjSpp.aK420eodVEn5tHzem.dvjZdlgzgP+IJHAy77IAkCHNAhW5DWEQg0yqWAPIW+eOUQ7VJZ6geOlXb0kqhF.Sy7RGG0CguE7vSVlaOCxbmYPl6NCxbuYPl6OCx7fYPluapxnFjrQjTLHNIIrPq0hCrrVaXfUAzeQQ6O7x



  • @MikeB please put your snippets inside <code> tags...



  • This post is deleted!


  • HiseSnippet 1863.3oc4Y0uaSbDDeu3rArACDJRsRUU5JpB4HQC17YkPHrc9flRBwxNDQ6+.atas81bd2q2sWHon7N0mfJdf5evaP6r6cm85KNlKt.sp0HBY1clY+MyN67goUfvgFFJBPVE24HeJx5h3NGwk8WoOgwQarJx5F3mxE6Y6zmv6QsIdd1GP7hng1BtcGOlKMvm3rOp4Q9jvPpKxxpvSTxZUbdj9y6dbShGg6PGsDBsqf4P2jMfIGsZq5Ok44sNwktCafA22s9FNB9JBOQDfyB3pH0IR5QeFQw1bXj0Bq4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YPl6OCx7fYPluapxnFjrQjTLHNIIrPq0hCrrVaXfUAzeQQ6O7x
    


  • @Lindon said in Sliderpack issues:

    @MikeB please put your snippets inside <code> tags...

    I have been looking for this function all the time - thanks



  • @MikeB ok well:

    inline function onNN0Control(component, value)
    {
        	if (value)
            {   
    
    	    //Arp1.setSliderAtIndex(0, (value)); 
    	    //Arp1.setSliderAtIndex(0, (value));
            Arp1.setAllValues(value);
            }
    };
    Content.getComponent("NN0").setControlCallback(onNN0Control);
    
    

    So you use the slider (knob1) to change the value of NN0....and then retrigger NN0
    which executes the code above....

    look at the code above and see when it will execute... hint it in the line:

    if (value)



  • oh what the:

    Content.makeFrontInterface(600, 500);
    
    const var NN0 = Content.getComponent("NN0");
    const var Arp1 = Content.getComponent("Arp1");
    
    const var Knob1 = Content.getComponent("Knob1");
    
    
    
    inline function onNN0Control(component, value)
    {
    
    	    //Arp1.setSliderAtIndex(0, (value)); 
    	    //Arp1.setSliderAtIndex(0, (value));
            Arp1.setAllValues(value);
    
    };
    Content.getComponent("NN0").setControlCallback(onNN0Control);
    
    
    inline function onArp1Control(component, value)
    {
    	NN0.setValue(Arp1.getSliderValueAt(0));
    };
    
    Content.getComponent("Arp1").setControlCallback(onArp1Control);
    
    
    
    
    inline function onKnob1Control(component, value)
    {
    	NN0.setValue(value);
    	NN0.changed();
    };
    
    Content.getComponent("Knob1").setControlCallback(onKnob1Control);
    
    


  • I've been there - does it work for you?
    Not for me!



  • Sorry - works - Typo 🙂



  • @MikeB really I have no idea what you are trying to do....but for me with ALL the code above replacing ALL your code then moving the bottom slider changes NN0 and all the values in the sliderpack...



  • Thanks ✌



  • @MikeB no problem so a couple of things from your script:

    its important to understand widgets and their callbacks.

    Each widget can have a callback and each widget has a value, BUT:::::

    changing the value of a widget like this:

    mywidget.setValue(55);
    

    changes the value of the widget --but, but but but...does NOT execute the callback, if you want the callback executing your need to do this:

    mywidget.setValue(55);
    mywidget.changed();
    

    Your original callback for knob1 - set the value of NNO, but...didnt then call .changed() for it...



  • I have seen - thank you very much.


Log in to reply
 

11
Online

1.3k
Users

4.2k
Topics

38.3k
Posts