Help with ButtonPack example
-
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.FKLCtnClozBEbQRjw2DG3u3Xm4fua8NHdm.4q5toN+6N3js95jcysqMkCABMQP9jSLYGftIwgy3dJZNzirEo+vpTIk4q4ZzLnAZFOVinMpRTd8L3iYoASP2wznPN7hY2bJ5ZoXNyFNjyPYDLilZ2jjPBLzEg7+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OJBijHRZbGL7sAStD7Us5.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.TtDl3Qs4l18d1TtWWS2qig6UhKUyvklW4Reice2XZDOeDg+7asOHjShGfAX2zUT7ZMW3ez94M1kA7DxaOBeIY+X3kLYbVuSmVnW2oSydOugL421iLfDuKNH3B.7Sb3wiIM60HDRAIP5ff1YLmyBOAF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OjPXB.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! :-)