Help with ButtonPack example
-
Hey, folks. I'm trying to get my head around the ButtonPack example in the docs, but this is far beyond my scripting level. I'm trying to change the number of buttons on the fly, but without resetting the values, i previously set. I guess i'd need to set a maximum number for the array length somewhere, which will not change, but i'm a bit lost figuring out, where and how to do that.
Maybe someone can push me in the right direction?HiseSnippet 2412.3ocsYs0baiaElxwZmZ05N61oOzoOg5G5H4HKK4j31ZE20w1wcca8kIxIa53wiWXRHQzPAxRBYaso9+79On8b.3EPJR4KSVMYxXBbte9N.G.bZnuMKJxOzp1RmMMfYU6WUevTgzcOWJWXc39V09M0Gv9OSXBaV3kmwhjqsg0tSCnQQLGqZ0d1eCoq1RKZo98Se6tTOJPa1PVVevmay9m7wbY1nmty+f64c.0gcFerA0ubmCs8E6464OAromUuqU.09SzQrioHYKT2p1W8VGtzObfjJYQV0VbWemoCb8uQno+C7H9UdL7idVC.AoG9.eOGzhwQs1yk64bZhuGYAR4zrHwyzQhea8i3N7zwyhHesZBRFGlwiZKj27dVNyqmo400v7JwjpYXRKpMouo9.6PdfLaFzd9k0OTHYgCoPX2zTzzZsve42Ue4F64CzHjcFS+D6fP3iTdZtY2tsIa7pts5ubikar9pqRNykQ1chT5KNEh9DdDgRhXRh+PhqeH+GA1oddSITO9HAygbkh1HxMtba2FqRHDapfbEiH8GMxCIXJwIjNZDWLh3eMKjHcYi6zXUEsuOBxuaQh+pWGxdgLH3gzXZEShPtyFnishrrAZJ.LRaxssISa0WIqM5PF.lMJHwjwWA5E7fDiUQA7q4A9gf+4GH4iodDZP.iFhX31fJYvL2vcjtHm+.HDs5hV8XxyI89gVJg7xL0XqPtQyZrP3Sipa1hPENJhGwulIhYgb39QJg8pNjCEpow5.gLz2aOHXeEHj1PX0yyTpSBbfPPy.pf4cl+6Ue0Bh5jP1vPVjKJmD+zgGE3Qmp9byNpbbpFTBFUA3rfFrwDLWaE5vEIRgmIT3eggzoPta8FX7NBpOMSSM9bCTYquNYuT+ZK0Pp+CjbjjbMMjrKP7nP+IBGMgG5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dISZMlZG5eostJEeXzegZDvlDp2Ddo5GgeSRKNqWuamtVi4N7KssQ2eMX8lx4Yim.Ou3IvyKeB77pm.Oa9D34O8D34OOWdvmG+MSj9i0kCv.m9V0hj0p8VAEPVJTn0+Wrp.TF
-
Okay, already found out, how to do it! :-) I'm getting further!
-
@toxonic Cool you found it! Since I was trying, here's my version:
HiseSnippet 2660.3ocsZs9baiaDmxw5lZ0lN20oep8Kn5CojNzxRNOtarhShe131yNdN4jlNYx3ilDRDMTfrjPwVWq+e99OncW.9.jhz1wMGG+AQvcWr6u8AV.3ShCcoIIgwFsV4z4QTiV+l1ilyE9656v3FGtmQqeW6Qz+0LJ2kFe1ozDwZaXry7HmjDpmQqV26ufz0ZkkMjO+7K1wIvAnsXHCi2FxboeOaJSTL5Iu7uwBBNvwidJapF0O9kG5Fx2MLHbFnS2qceiHG2O5LgdrCR1RsMZ8U66wDgwiDNBZhQqk2Iza9H+vK3J5eKKgcd.EeYfwHPPpgOHLvC0XbTic8YAdmjY6IFfTNo.ItmBI98sOh4wxGu.Q9Z4GHEbniGsVpr5cuRp2.c0qul5UiJ0RSkVVoReS6QtwrHQwWP84W29PtfFO1AfccUQQqwRa9GauaHOILf1yMf5DaZM79cfQDTtn2TmOROHFdIWFlOseeaxFOoOR186r9pqRN0mR1YlPDxOA7FDVBwgjPEjvwD+vX1OAr6DDLm3DvlvodjykzlPtvm452YUBg35vImSIhvISBPBlS7hclLgwmPB+DMlH7oS60YUIsuIA72aRReaPOxtwT.LQZz0hYIH2ECzyURVw.lbHlwlboMYt0Por1nGYDn1nf3yldNLufEjorRJfGyCBiA6KLRvl5DPbhh.LCiosgojBe4BlmvG47GAgnltjUOl7PxfezRJjGWLMtxH4jEUV.9TQ4lVDGtmj3IrOQ4orPNbuDovdROxgb4mw7BtHNLXW.rOGDhM.qAA5RcVjG.AlQNbZvoguQ9lEf5jX53XZhOJmL6zikDE3LW95S6I8w4yfTv3T.FKLCtnClozBEbQRjw2DG3u3Xm4fua8NH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uo6fzHEkMLZsTpVAjJjW728yt3ObMbClGdoe4NKCoNazZba7z2eeeah9eCV3G8adja9uOnzSck62lpbJGtT6Vocp2OS2JtMXi2b3dPJJdAmoFbwMH.isG8SLWp55NWo8dzjOJBijHRZbGL7sAStD7Us5.S27reHuDBf6up0RJEQc+C3HjTUS+VDP1ZAiot6.IeoTU9FJLZ8GZ2zMTfXUtZu7s.stLGo94nWNu.19GuzXwaC9qaeDTgJvQT9xowajO8CPHdoaDFWMkmvDy0uw9uX2X8sUE+l1mfs2WuNtTM5HlQ7KfNldO+2u89iGScEEJ3xsO3c+xbo9Fp6.ZBz2PLCCQgJ0ift8co31pf3XrDiL9L88936HBLhx8ju7egmzONHKFE+3frOZL0wMN7LWUVJ9eRvuRNBnSb4+DEqz9H7cRdxY618602XJyiclqKZ9qA0mpmmMtC77n6.OO9NvyStC77z6.Oe6cfmu6Z4A++IY6YhvopzAXfS1WVjrUq84NPjkLJz3+sDEcTF
-
@ustk Great, thank you much! :-)
-
@ustk Hey again! :-) Although i thought, my solution works, i still have a problem:
When i decrease the stepsize and afterward, i change the values of some steps, the array gets overwritten and truncated on the current number of steps. What i want is, to keep all of the 64 values in the array and only store changes, that i made. Is this possible?
Here is, what i got so far, actually reduced to a small snippet.HiseSnippet 2331.3ocsYs9aaibDmxw75I0FfbEEn.E4Ca8GJnbjkkrcbCrpu3Ww8b64G3TtbAvvvXM4JwslhKK4Ja4lXf9mb+O35rOH4JJR+5xQDDKN6772L6r6x8jXlKIIgEaUq96uIhXU62Y2+lPt+t9XZn0A6YU62a2m7uGSBcIwm+dRBeoUr14lHbRBwypVsm82E7Uq97Vxm+2a2AGfAdyIYY8AF0k78zQTdN0S15eRCB1G6QdOcjA2qs0AtrvcYArwfO8L6NVQX2KwCIGgErMmsUsu5cdTNKtOGyIIV0leGl2M88YWGp3+CzD5EADwKcs5CJRQdeVfmviETs10mF3cRZrmXAZ4jbj3YJj3OXeH0ilQOGQdgb.TtDl3Qs4l18d1TtWWS2qig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YUaNsWArxkWVvySur.wFTrndhKJHKyXI8Yws6H99ym1U9UPf+04LkNMUzKzJBRYWv1gMQpqF1ookTUkeGPV+3A6AMsE2gg1+x+j2.s8HWQcIpaznt8djjK4rHY.nKI.xOjPXB.s0DV7lzeH+p4fze0GmS4KpOXtfBReYTle1agXB4TeraAW0zbM8mT2p1extpOot.txb6u9gAXSx.KT7V2j8x+8xsFgkAkM7FmLAz3uwVIBkSFA9QK60z8xdi9ucWW+iUWQ+i00rHkQs82UDw1Ke4K+Y0cuMy8J8B6CYdiCv7oulKwc6oG.J7m5tkDafHLgxuwLu+E6tudnt32XehnGa493bk3ih4I+J3i5aL741uav.hKO2Am2d+O9qy0CZotajgvVkhohhFnwbeHU6RDmjDltHZ7TSLMP+dmzII8IgdxW9Y3QOX2zoBhA6lNn0HraL6bWU+.wcR90RJfOEJuN151GJdG0MsGfscm1crFQ8nm65JB+kftVkKyJOAYV8IHyZOAYd8SPl0eBx7WeBx7l6TFwMSu8XNajZ5.P3j2I6EWq16BwPkkrJz5+yuVXOK�
Would be nice, if someone could give me a hint. I just don't know, where in the script it happens, that the array gets overwritten.
-
@toxonic Yes I wondered that too when making my snippet and it was my choice to truncate the value when downsizing the pack. But if you want to to keep the previous values above, yes it is possible. I will rework my snippet but I don't have much time to study yours (assuming you took another path...)
-
@ustk That's ok, maybe you could just point me to the line, where the magic happens and what would be needed to preserve the values above the number of steps.
-
@toxonic probably not just one line, I think the approach have to be a bit different, let me see...
-
@ustk Wait...
-
@toxonic ... I got it! :-) I will post my solution in a moment
-
@toxonic I changed the following lines....
// Sets the array as Control Value and repaints the panel inline function _updateInternal(p) { p.setValue(p.data.buttonValues); p.repaint(); p.changed(); }
to...
// Sets the array as Control Value and repaints the panel inline function _updateInternal(p) { local pGet = p.getValue(); for (i=0;i<p.data.buttonValues.length;i++) pGet[i] = p.data.buttonValues[i]; p.setValue(pGet); p.repaint(); p.changed(); }
I loaded the value of the panel into a local array, write the changes of the button data array to the local array and save the panel value again with
p.setValue()
This works to me, when i set the maximum amount of steps (64) at compile time.Nevertheless, thank you much for your effort! :-)