Button to cycle through array



  • Struggling with creating this... Any advice very welcome! 🙂

    HiseSnippet 1054.3oc0W0saaTDEdVmLE7BthVUgD2sxWfrgPXcraAI.gwN1HKhSbvoQTppplr633QY7Lamc11tJJR8QgWJtm64FdCfY1e7tI013rzVQ1HEsybNem8aNy4OORvcv99bAvn7QgdXfwGBGGxjS6NEQXfA6BLdOX2G0cudfNgdHeerKvvXieTKzn7lfnm+566fnHlCNaK.3XNwAuGYFQls6n1+DgR6ibwGQlkS6VsG3vYc4TdfhHa.sAdHmyPmh2GoUqDDXbqdtDIWLVhjXefwlc3tgimxeAKV+iI9jSnX8hFfwJCEuceN0UyX8tftSIT2QoGXefxJixN9aDe7uGbHwkLe+L2vGEIvJCQd+gQoUQuF4om85SOibzayX5cG3XGAwSlIQysO.NfIwhIH0UPdZEqKnzuWB1kqzfI2dF5LbegZwbD0dfs8VV221t92Twrh4WpdrF9HqNO7niNX+wULU2L9RqmiDVHg.EZ8cVON0Xmhkc4y73L0hZU6DHkbVip02pho0heVEvcJJvlEEXqp0eRzYVe3FFNf4heo530HZOBiRXXqIALGIgyr3rSjrnLAsIEbZMmT6skx6PCv0qXddLOh+OYhUsTq9swNusoX1oxo0iU374rNR3iST9Ia6ikGqsXsF56jDctxKWD8V526hHNu3CaJuqVWa3D12EQomnRxp8Zmq3vfr+x4A1mKwGvpU27byxlWXZcUQSlrPYIFlhEKTrtVfXU.qwBlcBVj5lSUTkTb4rN3xy5xWTvI1KkSQNa.iHOvCyVVtHHw0pxJgIrRopLJm71I4jwAU.hJ0qLLIY.DQ47kJAWC36LG9sLRqqdMf27pe8qG7VECtILMfZA3e3fcQRjt1VhCU4j8vBIQe+YrK94plFwU5JC2E6elj6E4wSBlUuuF97Wl8I+r1gyW7p9swLjJfPWHeOLRjz6.bsL+NK07+5aBy2bYl+ObeSX9VKy7+F8+h4ycmmy9eZN6CrVh8e8dbpNsb2.JRd41u5YNRDnpNbo9b5dYLehLLeh1akdxqKcuCbDQ5Lcw7szB3qJk3sMeSlvoBr2jIXGYFY2D1+WdGONSxvl2ENhSC8lxYDm9DpZhjHBUFFunwxF57U+4ged69B7yBvLmTuX6lu3YsOLeHfx8mq7S01GFfnWwq2g3woHwZcirw50e4eYPyUE17wv4GJqaPw55alaN78SfIW5VZm8MGdea3g+Ofr+LOPRXmNDIEDUsd39AyFq9YaNXEQYLLUOGlQI8nBwqs0q0DZLl4Fs3uUOIBanWajHrQpPvLjif+Tm3YMz4OuezNJNwh9AgkgC0qslOdEDZusMXlp0xScbzEz9BE2WLlcJ.llE.SqBf49E.yCJ.lup.X95UhQ2U+GBj7YwwlpMF0KZROCidQs8iBSA+CKNeSIC
    


  • MyIndex is always set to 1



  • @d-healey I know, I basically tried a million things and gave up on that snippet



  • You should try something and post that, then we'll have something to work with.



  • @DanH The ingredients are:

    • a momentary button (not your actual toggle one)
    • an increment variable
    • a statement when the increment is greater than the number of buttons so you can reset the counter (but a modulo is way more elegant)
    • set all buttons to zero, then set to active only the one that corresponds to the current counter


  • @ustk Thanks, I'm going to put this idea on hold for the mo and come back to it in a few weeks


Log in to reply
 

7
Online

1.2k
Users

3.9k
Topics

34.1k
Posts