Randomizer on 3 Grouped buttons, How?
-
@DanH What do you expect this to give you (keep in mind that this is in the sliderpack callback)?
local idx = btnRandom.indexOf(component);
-
@d-healey Well, one of the things I'm unclear on sliderpack callabacks
I have no idea how they are supposed to look!
-
@DanH Same as any other control. But your slider pack isn't in the buttons array so looking for it in there will return -1.
The
value
parameter of the callback will give you the number of the slider that was moved. -
@d-healey Oh right, so then I don't even need to get the value of the 'btnRandom' array then I guess, will give a go tonight
-
@DanH Yeah, like I said, you can do the whole thing without the buttons. The buttons are only needed to provide a nice interface for the user.
-
@d-healey So two issues now, firstly the random button doesn't trigger the SliderPack callback. Should
SliderPack.changed();
work? Doesn't seem to be.
Secondly using the value parameter inside the SliderPack callback sets the filters every time a slider is engaged - probably better to have it only when it's value is 1.
HiseSnippet 1941.3oc0Ys0babaEdWYuogJQoIY7zY5an7IpXZIRJRcopdJuHxD1nKzhztsiGMtP6BRhwKAn2ETVpd7Ltu0m5ug9Sw+e5K4eP6A.K2E7lBEyXO03AMD3bN37gC9vYO.pU.2kDFxCrrS04lgDK6uzo8MLQ+Z8wTlUyirrefCFZAxVeY62AMqp2LDGFR7rrsu22K0zN08sTse5OVE6iYtjjgrrdFm5RNlNfJRFsU4ej562.6Q5PGXncwxMc4rZbe9H.U2yIm0Pr6Kw8Hmhkpslik8mU2iJ3AsEXAIzx99U4d2ztO+0Ls9OiFRuzmH6j2pMLQ5gav88jHVNpUs9TeuViW8gVvrzJIVbOcr3ANmP8nwimDS9Zk.ThElwC60tM3k2Dd4Vd3Ya.u6qg223z1MfNTjHQhsuvoISPB5hgs.SXo00Zs+UJmZbPClXqA3WRZD.chsHyt4xkEsetbad3FqCaCgBzU3.TCpOnPdziQJxwV8Hh5c6RbEYRGIJ8jFbL9RhuT+wtBrnFevPNC5jIsV7T1z1m5QBZAa1K1PCcTVuw5aCMzI+UT0m1oyYm1FkgAzDOT.l4wGf5xCPLNJffC4rMM81kB14ZcdL54y2YmW4ziN6DvQY2Xcz7a2lgEVUC2YUMr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2mTOyM74XAk0qCEV1RG7qcLGZB+bloettbzQH84EvLUt5ingC8w2XcYuwWa9KcJVX+7kJVpTgcrnBx.SAGT7fc2qvAkLDTPJoP9h6Ub+c1s3dVpSr1EbTovSGmCooW5eOJ9Jep6ZjVkXFF9Q4gTsya+aoxrjrh+IgwJ9c+ox5B+qLfOhY75AOnbnfLrM8uSLe5g6F2sjgWsbM7Ztvewb2u3NsialAwpfAR92uq7qodh9wC7O+Gk6Sn85mDJdOaZRgFfUC3uNjDLIoH+t41q3Ak1c+YHE6u2tGTXuB4mlTnnKkxmOeIMoXsGYGwJje5oMDQzQVfAHBf6dDKp90CwrP3SfgUBg4az.oJcwPsBI5ndyifELAxOFGN6zBerTavrxZfuhG.3W9.RSH7zQCzPPZSA8X5A9yxn64vFAGj7bcUC41ZmoZYuyBjieg5.wruayW6.UjMxGKl7IkjuiVj.HpMwa2HeeFHVJtwjr+A4clVV39MNsnB29yGuqMG7Be++CMdid0tMbzuMUBXuuSi+xG4mnK50T+VmVb+aF1mynt5zlJ.kJJwc9E8Ppu6+7jGVtQ.4UiHL2wQwx675WU9IlT.Yk8I8QkexHr+TQ8pzgbebvRsibukqzyelGO81nM+Fm3EE5SHttbm4SG79ach1zQxf8mN39qbdx+G.1y4ijeV9DLbOZ3qxNv2NZCeLzk..kwf65Ju+yZxKSo6ma78gZSXdpN+WnEILurucjv7iEZM.6Fvegq9JXxyOetZD.SL0+jiTNmH6iRtwkStsxYM.JG4EttxDZOBv97sovJXyNqfMEWAaJsB1r6JXydqfM6eq1HqDrxHAeflaBCzpttHY65pREUzTq+22uxk9
-
@DanH said in Randomizer on 3 Grouped buttons, How?:
the random button doesn't trigger the SliderPack callback
Sure it does. Put a Console.print in your sliderpack callback and then click the button.
probably better to have it only when it's value is 1.
I agree.
-
Sure it does. Put a Console.print in your sliderpack callback and then click the button.
I just get 'Interface: [Array]'
The sliders move when clicking the random button but the filter and label don't.
-
@DanH Interesting. Let me play with it for a while...
-
@d-healey :folded_hands_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SAMMMgeuz6dJDH3.mmoaZHWlhyLReiYHoel5.w7Omy8rgFxF6gES+RSxmWKjA30l5IcjOaC3KEWYlr+d44mVU39U1soBmAKFuqs.7Be5+8MdCeLuMs0OYULXuqcy+vG3WtK7QV+Z61buqFMfynN5xlJ.sdXg67K68Ue6+4wOnRSexKGSXNS7hUJ9pWV4wlo.xF6im+qp73wXuXu9+5e+O+GUqQGw8v9qTD4NqVmm+Huo50k17ysi1TnOhx0kQlOdv6uvNLnijN6Odv8WX+3+O.rmxGK+r7QX3ZzvWksguczA9XnCA.JiAW0EnkXM4cozyyImqtkAg4pl7egQHy7x4IBYleBSqgXGe9ycz2.Sd94SUT.LwT+uOV29H4bTzEtrsykIm0Pncjm63HKn8P.6KVmB2BcJdKzozsPmx2Bc19VnyN2Bc18Z0Q1IX0wB9PctIPncCcSxIZnZUTklZ8+HWVnAK
-
@d-healey Well that was easy :face_with_tears_of_joy:
Thank you :)
-
@d-healey oh hang on, now the sliders don't perform the callbacks when moved on their own....!
-
@DanH What about this
HiseSnippet 1969.3oc0Ys0babaEdWYuogJQoIY7zI8MT9PGpXZw65RT8TRJQlvFcgVj1sc7nwEbWPRLdI.8tfxR0imw8s7yH+T7z+F8k9deI+CZO.XIWvaJTJi8TuOng3bAmObNGbvAPMC3tjvPdfkch1WMjXY+oNsthI5ePeLkY03PK664fgu.4We42uC9rpd0PbXHwyx19NeqTR6D20R88S+wpXeLykDSxx5IbpK4H5.pHlZyxeO02uN1izlNvP5hka3xYGv84i.TcGmrVCwtOG2ibBVJ1ZNV1eTMOpfGzRfEjPK66Vk6cUq97Wxzx+DZHsiOQNHmUKXhzjqy88jHVR05f9TeuliW8gVvrzL1WbGsu3dNGS8nSnG6S9bECTrFl9C60tN3kyDdYWc3Ya.u6pg2W3zxMfNTDyQhsOwoASPB5hgPfIrzxZs1+LgyAbPBlXqA3mSpG.ClnQpsylMMZ2rY2b+MVGBCgBzE3.TcpOHPNzCQpjis5QD051k3JRkLhUxoU3HbGhuT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isn't that what you want?
-
@d-healey No, the random button generates the randomness. The sliderpack is there to store the value of the buttons (and filter modes etc) so they can be saved in presets (hence the tabbed interface button script).
So each slider should control the corresponding filter mode
-
@DanH Just for clarity, what should happen when slider one is moved?
-
@d-healey the first filter mode in the filter array is selected (and he second for slider 2 etc).
At least I think this is what's required for it all the work when making presets - the preset loads the sliderpack settings and the correct filter mode is restored.
Thanks and apologies for any confusion
-
@DanH I get it now, leave it with me