Randomizer on 3 Grouped buttons, How?
-
FiltModes contains numbers
[6, 7, 12, 4]
why would you try to get the index of a component from there? -
@d-healey Ah I see, so it needs to be .indexOf(whatIneedittobe...)?!
-
@DanH I don't know what you're trying to do so I don't know :P
-
I'm trying to change filter modes
-
I see, so use the index of the button (which you have in
idx
) to get the number of the mode you want, i.e.filtModes[idx]
-
@d-healey Genius
-
@d-healey Here Is A Quick Questions Sir
How To Show The Name Of Filters On Below Example:( It Sames As Above But I Gave It The Filter Names, So By Pressing The Buttons Label1 Updates)
HiseSnippet 1505.3oc0X01aZbDD9NaeVAZIpospR8aq3CIfhCuXSRqDIp7hgXTMXrgj1pHqzk6VfU9XWxcKNFYYo7SK+j5+f1Y26U6fwNjDolyR12ty7L6yNyb6Lq65vMIttbGM8D8mOkno+sF8lyDiqOFSYZs1US+NFGUsytGzVq17oXWWhklt95OWJUOwFZpm+42pgswLSRzTZZujSMI6SmPEQy1sxuSssahsH8oShocoJsL4r5ba9LfIqaTPaJ17D7HRGrTs0Lzz2rgEUvc5IvBhql9F03Vy6Ml+Vlm9uj5RGXSjCJp0CLj2zM41VRFKmUq9XpsU2fcrqFXktQ6+081++nQapEMb9H+v2oDfhPD2enu1xnWw3zqvsmd5wn2Fdz6dF8LcnSEQRjb6aLZwDDmgXHDDmVd5ps162znNGzfIxMAeBooCLHDQlmTnvVnGWnP1xoRBgAWA5TrCpI0FTnH5YHUBQtQDQigCIlhLo8EkVBHO7fZ+WnZune+C5zCkgAgLKjClYwmfFxcPLNxgfc4rrwM+.A6HOcdF5UAjCVi57IS4LXPlzd4cvxrUpjnE+rLfaup.2YUAVJc1iWfOTlD6J2loqQeyLrEZ+to2J388juuO+sndiI1CQMNDFtGcz3XiONvM2oZ+pfK1aw783oRlJIkYSYDzvYLSAkyPbkqsUeIWc31YLCH5V.qrmQxl77jp8mM2Da6GqdoTBvx1XHXKmBRPx.IFkxVNo+F2kaSxM0gBBhgIaYPpm8nCQYN0yNOCULqZtyC7jgQ7WEC7w4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ZSvlN7Wa50Xi76m6nlA3DS8OZJgQa4XTXubFFExUPaBTK60llxCzdDv8EiY6U.yNq.lRq.lGuBXdxJf4WVAL+5RwHain5LAehWtILQ2FpFK00an5yPklp8eLsrL9E
-
@d-healey said in Randomizer on 3 Grouped buttons, How?:
I see, so use the index of the button (which you have in
idx
) to get the number of the mode you want, i.e.filtModes[idx]
How to Do This?
-
HiseSnippet 1586.3oc0XE0aZbDD9NaetAZcRSUUk5aq3gpCEhCXbRSqaTwfgDTMXrgD0pHqzk6VfU9XWxcKNFYY07Oq4+Seo+CRmc2i6NrwNNjDolyOD1Y2uY+1Ylc1YRKetCIHf6aXlpyjQDCyuxp8DlXPkAXJyn9NFl2v5fsatydMLJOYDNHf3ZXZt7ikyZlZEC02+9qkwdXlCIVjgwy3TGxtzgTQrzVk9MpmWMrKoCcXhUuYo5NbVEtGeLvjksxaLB6bDtOoIVtrkrLLWspKUv8aKvBRfg4Jk4tSZOf+Jld8OiFP65QjCJXzFTjVbMtmqjwRoFUFP8baM8DGX.ZoU74eY84+asZPcoQxisCesZBTLhj1CyktJ5UHI8xe8omYB5shld21psiOcjHdFI29Rq5LAwuGFbAIokdsFK82qZUgCqfIVeH9HRMeXPDB6GjOeNz8ymO6VqkFbCABzwXeTMpGrfBnGgTADq2mHp1qGwQXmIbpLyBXWbWhmb8S2J.QE9vQbFLvNidZEF4e2C9PM9CT4m1oydMairYfq1E4iYt7gndbeDii7I3.NKaxcoqfcfdMOB874uS53UXqxsVZz7+tJfarn.Ktn.2LS1CmisWF7GHOlYJSe4XrKZ2VYxM82OQ96c4uB0d.wqGp59vvmP6OHd77TYCtqVkOLG5mxgJ.N9BENbqHGRys6rM3LzzJz2Hmjx7nLBp2XlifxYHtxITui7T4y8rcldjxAal2XR1zmlVYI73NXuPu5yjy.adCLDNIEAgf1.C1L6VoCMQAbOx5i7ovDIvjcKXVs9n8P1Gq0yiPExpjc5TadTrwyS.9v0CHB0urKHC9t505L.y5SbsCozY5EKMAx+M8Y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.GBPTFCJnGjAuPJgpFmWNVUUCg4pFHeJIbxBxwlgSVX5jFCwN97W3nqfSd+4FJI.mXp+C0RY0PNFEUzpkU90yaLDdz9ENNxDZ2E397wrwBfo3BfYyE.y8W.LOXAv7iK.lGdkXj0Ks8XAenN1DDzpptl.yppBpTgoF+GnfSLqN
This works, but the problem here is that every time you compile the last button in the array is selected, even when saving presets. @d-healey Do you know a way around this? I know in the Tabbed Interface video you can select which button to default to if none are selected but here it would be preferable to be able to save the state of the buttons.
-
@DanH Sir Thing Happens Here, Also I Made A Video In Other Thread, It Acts Crazy In Scriptnode And Instead Of Allowing One Node, It Unbasses All The Nodes.
Still Waiting For A Little Help Over This, Since This Kind Of Scripting Needs More Experience Or I Will Break My Laptop -
@DanH said in Randomizer on 3 Grouped buttons, How?:
This works, but the problem here is that every time you compile the last button in the array is selected, even when saving presets. @d-healey Do you know a way around this?
What about disabling save in preset and then enabling the one you want as default manually in on init?
-
@d-healey Then the buttons will never be able to be saved in presets... :/
-
@d-healey Not A Good Idea.
But I Guess It Can Possible To Trigger The Buttons Using A Hidden Knob Which Is Saved In Project
Or Vise Versa? -
I think in that case you'd need to use a sliderpack to save their values and restore them in the sliderpack's callback.
-
@d-healey Hmmmm.... sounds a bit much - I might go for a button that cycles through the array instead. I assume that's achievable - no doubt be in touch soon
-
HiseSnippet 1070.3ocsV8taaaCDmJwpHVatXcn66D4SxvYtxIscEHKXNwNYvXKIFycYCnnnfQhJlKRjBRTdwqHuB6YbXOA6MX6nnjkriZWhGF+h88+eGuSGuwwBWZRhHFYz70yinHiO0bxbtb5foDFGMZHx3wlmRRjzXrl0QyiHIITOjgwleqhgQyFnrye8MGQBHbWZIKD5BAyk98rPlrj639eGKH3DhG80rvJZ+79ibE7Ah.QJfmMMcPQD2qIWQOinTaCSjwiN1iIEwSjDIMAz4Hg27ISE+JWq+ErD1kATEQOzDvQZ1nASYAdiKx0DDxnw3xLeScl+TySYdrE7KuA9rLA3RKpdGXrwxPpwRPp2GBRm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
@d-healey Thanks :) Is it possible to combine this with the random snippet above?
-
@DanH Sure, just edit the button callback
-
@d-healey Thanks, I'm thinking cycling through the array may work better for me. Been searching through JS forums but finding it hard to translate into HISE script!
-
@d-healey Had a bash at this and I don't think I'm approaching it in the right way. The sliderpack stores the correct values, but the sliderpack itself doesn't trigger the button callbacks needed to make presets work. In order for this to work the sliderpack itself needs to be controlling the callback functions (I think)...
HiseSnippet 1962.3oc0YssaajaFdjSlh0dWuM61EEn2QnqjPTr0nC9PcCpNXocUiOnXojtKBLRomgxhHiHUlgxGZfAbuaeD5k8QYutuJ8l8Mn8mjilg5jWaglhlI.Fh7+zG+OP9Sl1AbWRXHOvJ0pcudHwJ0WX24Zlne89XJyp09Vo9M1sahNo5Q6e7gnZupa2iOpiUsqGhCCIdVoR8nuUxXpUerk56m+i0v9XlKIYJKqWyotjCnCnhjYaW4ETe+lXORW5.CtKUokKmUm6yGAf5Q14sFhceG9bxQXIaqXak5W0viJ3AcDXAIzJ0iqw8ttSe9kLM+ulFROymHG3X0ATjd5lbeOIhkyZUuO02q83EenEnk1IthGocEei8gTOZ77ItjmnHfRjvzejZk6BdNlvK+8GdoLf2i0v6qr63FPGJRnHw1ma2hIHA8vPHvDVZdsV4EqZWmCbvDaL.+NRy.XPrDY1Je9bncxmO6dquFDFBEnKvAnlTefAGzyQpbiMNmHZzqGwUjIcDozSJvA3yH9R9GaJPh57AC4LXPlzZxJYj+aS3Cc3OLN6BkgAgZOT.l4wGf5wCPLNJffC4rrlV4LA6DMOOG8l4aIcdKXpbquFZ9e2kfEVVAKtrBVZYErb5rmt2Bkb1norbJT53RWi99QXOzAsSmK820BU+UcgebvwQ+ncipuHcNjjRmuqwAMSe5bRMNj6oU1N4P6lC4.IQNN4PEOcu336QU6VEhsSrQhjHk4SYDTuQLWAkyPbULsUW4ZMf6mwc7BMGXO+QDHC3CR4jqJetK1OJO40Rh.DNDCInxofj5L.NJmMxq.JLj6S1XX.EnXHT18TNHT7eiyqdiAWmtQHQn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