Cannot get SliderPack value using getSliderValueAt
-
always returns 0.
HiseSnippet 785.3ocsU0sSaCCE1ozHMxFSio8.DwESsBVUJkeFBMMnEXqaszpET0XbAy3315gqckiCrvzdm2avlcRCILxPDjVtvxmuy4374yetufiv99bAv3wGENECLdhoaHSNt0XHgAZuGv3olcg9RrvNFpY3TnuO1CXXL26z.FyWFD88q21DRgLDNEB.FvIHbGxDhLE8q67QBkd.zCeDYRFqWam1HNqEmxCT7YNSGvTH5b3H7gPsYkLAWPvW5CLbLarZMw40O6pcqo+ZpWF9A0xdQxrHfHvHC.n.g.yjCTtCLLM9s5yvbeOhjKbkPIVclkax8BcGyujE+qGP7ImQwZg5.WEmhgOfS8zWd8dPqwDpW+jPnOPcJ8SCnyEGPegYWhG4Z7z.6yhTXm5Q1PqQo6hd0efzyHC8JGSuEMcQBxTYpFM2d9Lz+A6hUBJ8RCSKUJyWZeATX6RIdXQeUNy9M1s3LoJjWC54khWYoz8Kshci0arh8lU21ZAqDy8wx2iIiFKqzvwo51KDqxmSw0lJHLYkzCn1HrLVZ.jFf2UVwoZ0sGFvPRBmYyYGxk3drJUs9g07V+z5u0LbXdpzDQvoTrHOs5BVwc3VEVvjyvhUTwCEkRrSkOtY1z59kMQwAkLFxYsYDYuo3qkiujIHNfqubYgRuTYQitL4XVJzsKg.yRT5hoYlqJkjQkRIEMooH.wKZhRJPTbI6.BOnDBLNwbi0h5WW9pNgcV0MrS3250UstkFcyVpkK5o2tbjrVun2WnGS2hcL830isOUln1wikqA.2tnW05w8BnP4M6G0yyloPkUuQEea8s1mHCyNuq.MoN41jVOuH78jtKZ1mHQiymukxgupT1+a9Naj2Bl6ObHFISIaYyC97Cc9VAnxm3ARBaTWnTP9tZR+gASbUOlfvJlvXXpud5eIcUbrriVVGYbwLOmjmFlortV1Xlx5IJASfHA+TTbsudn5ihPTbhE8L07p2KUx10Sp007dhZR+oHjNP7JEyy2iUKrGMJrGqUXOVuvdrQg8XyB6wquCOzOqtafjOIts..9CTbtskG
-
You need to read it in the onControl callback
-
I don't understand why that would be a requirement... should I keep a separate array just to hold the values of SliderPack so I can access it in any callback? I'm trying to access it on timer.
What if the user never triggers the on control callback?
-
The values of controls will be restored after the onInit callback and after compilation, every onControl callback gets executed automatically, so this is the place to handle the values.
-
ok so we have these functions:
ScriptSliderPack.getSliderValueAt(int index)
ScriptSliderPack.getValue()I don't see a way to know what slider was changed.
-
HiseSnippet 849.3ocsU01SaCCD1ozHs18hFS6GfU+TQv5Z3cMDZ.EXqZTnZAgFaefYRbZsv0txwoPAwuj8mb+C1rcRVRGADcRyUMI2ycm8iOe9ttBtGNLjK.VO83wCw.qmY6NlI62pOhv.s2EX8B6NnPIV.ig1Y7PTXH1GXYMyGz.VUJCLie99cPTDyCmAA.mvId3CHCHxLzuu0mHT59He7wjA4rd4sZ6wYs3TdjhOyX2DLD4cApG9Pj1rR1fQD7kg.ql1KsXCwENme81MzicZjN1U+XDB2wAYjG4bt5IvKRHvL4IJ2AV1V+RMrr2ymH4BWIRhUy4L6v8G61meIKdoOgDRNmh0BN.WEmhgAs5Sn9cSCag.fU4tYAwYhChu1tCwm7G7rf4KMJfYdjObZUZRJUdBJ4beTZeN0WOA2C8rxQuxwzaVaWOAYnLSilauJA8dXWrRPoeXY2hyjpvYiPr7iXRu9x5K1r4baTUc5EJgiPBnKk3iEcUGevMgoli78yvqWK66ZK.WZkkV.t7JpIIHh4IIbFjyNjKwGwpOW0apVo5s2QSPPQpzqlfSoXQQZ0YbhGvs5rnAmiEKn1EzHrwNR.LAEt4l41Yy87pUtQ8uhx0PNE2Xnfvj0q0l4iu5cvZv4imD06ZItAOQCDqKahZzCKikLp2VVOdwmaC3aeqAB1iLBGBGyifx9XHQuBPdfQHz3Y0J2p1OpjfISgp93Rg7hOgxYHm0lQjGMDmbcH8v3NHAA4gxB94QMA8BLKExof7VPRViNCNwbU9qzj+llolEBADeSoqL.SHLewIejDAr9l8pK23qzS2ed1ozSWiPOkd4QcFef675xEqM9.0uiL5uV845tJwqi0+2xF6aYpxDKC.28ll59N2OhhjSVDPW3LQgJ6ahqYs065PhbbdtOEUFZVXkgBivOR5NqcWhzqew7sTA7Ucj8+luI0Yet8dAAXOYFYKau+W9WKpNET4y7HIg0qCRJHWoZobXz.WUWKOrhILFlFpayTRmEGK2TKqiLtXleyzdPIJczxVIJcRUBFf7D7y7hy80UxehAQwIloeXEUiYkLzIMWWy6Ap1Km44oCDuQw7h8Xwo1iklZOVdp8Xko1iUmZOVap8X8GvCcu7sij7AwWK.feCsQJ4y
-
Thanks d.healey!
I think it would still be a lot easier to be able to get the value of a given slider at index not relying on On Control. This means I will have to create an array dedicated to storing the values of the slider pack. Several slider packs will require an array of arrays. I'm trying to create an arpeggiator.
This means more boiler plate code.
I have to have, in onControl callback, a function to get all sliderpacks, all values of all sliders. I guess I'll have to have a bool "if not done yet, get slider values"
-
I think that you can get the value using the index, just not in the onInit callback