Randomizer on 3 Grouped buttons, How?
-
@d-healey Thanks for the help, You're a great guy :)
-
@d-healey Just trying this out. What if I wanted only one of the buttons to be on at a time? Like a radio group. I can get them to go on and off randomly, but not like a radio group...
-
@DanH Check out my tabbed interfaces video.
-
@d-healey ah yes of course :) I'm already using it!
-
@d-healey Ok I am failing miserably at trying to combine these two scripts
-
@DanH Post a minimal snippet
-
HiseSnippet 1196.3ocuW8tahbCD2aR1SGaKU8j5CfU9vIPWJAR3tVI5oF96ITCDDPhZ0oSQlcMfU10FsqIMnnH0OUo9BzGo97z2f1wdWX2P1jlPSq+Bq8L+F+yyL1yPOegMMHP3iLxLbwLJx3yMGrfKmVeJgwQsafLdoY+pcabRGTsEyHAATGjgw1ePI0HyNH83O+9ZDWB2lFuDBclfYSOl4wjwq16nef451h3PGx7Rnc4iZaK30Eth4.S11rHZFw9BxDZWhRssLQFunoCSJ7GHIRZ.xXmZBmEClJ9Ydn9mwBXibopIkPC.CEtbKgqihwpUQ0mxbc5s7DGf.qzK97uc34+qL6vbXqVO1O7kZA3XDI8GFa8PzqTR5ULU5ULM5Yjfd6DRuWYNv1mMSFKQwsOyrMWR8GSfPPRZEpKZqe0zrt.zfKK3Qtf1xGlrBQt2Ur3d32VrX9JYsxZsOLvc9IbsSGN7jtCv43PLvA6S3NBO7XgOlKv9TRffmOqED1Bj3KI93QRd+PcdO9iK2sITYcg2LAGlja2vDoR6leurV3zGODvC1TfGto.Kua9OE6T5VcXUvgDJJx+nDx3tLNEOdN2VxDbrP6HZOTYYegaN6klcOvQ4Nml25ZKMabE1D2HO6YJIfqqCQNsfZIH9jChKGluhUDMCDtzBy7YffDXxWAjFZO1XbtKCsy6wkxqW65km6UwmOl.7mJDPk5uxUJZitIT8rIXHy4JfYqLPAF2gd0IiiOXpLGMJU5QNFnbwJXF96RfwkxmHmBq9l2jOT4qiCIwbikfQL0wPs2u90QNtns4lvertohk08D9zAfcyqLVTXnNw0cD7pRt0BOIx5GVsVslMvs6NrY+VUq2DOnd+18FpjGmm28zNmCJN.Njk0PW+LuTgkm0ny45mw0ok8TBeBcHYjhP2DxIXFdzboDRprizaUZ1cy6VYg6lwshE6u+GnRrN.hEiw1tL6Kfa2gaxlEyWkr.7ULYhKMxZAgq9+VJQjWCBHwWD6JjzS34T23xXciEdcQiGmprnXiK0OUwphW9ODvb74din9ItuqUDdE+1kILu+xDIqhYGlimPQAuMmIOYFkee01PQWLfxHlQrBTUpKh7EQEQpoiSHFTqHSTU9RHMkUEOPOAXGrB1VOEXGtY6V4mFLnCF8E9knh6QAcZ6FDIQUpMxcAtvYTeISEcLZPuD5gIrvaFyFzfKjhYZ+Yzc.36GgG8JPMieG1sEpONF9fxIPXV0OwwThOeYC.OEydvZl82ddL6gqY1+34wrkWyr6X7HL6K9minWsJZ9KsNZQbnsxQoZcVPGgGXah+Bcp5c6uB5xS3L2kHucqep9ciD.WzuUOVp9n3AL4hj8C+utevTuR+Ho6qL6wj1SSmuakBeg7++q4aT20YMaNdL0VFS1cLa8iOusRmJU5KlKY7IP2U9LUpX24dCf+rgMEXBmScUOFCIDJn54EUyUdlATtidxeAiHgkTyMhDVZoPjGw1Wbtc3CRp92eodEfSb8eiIiYG0b7p2XMMKVnHxCxQO21V4J9Zf6oi4fM.yga.lxa.l2tAXd2Ff4a1.Le6ChQ87P04RgW30DXgdM0EDLLZpe+PmQh9abY+UfD
:folded_hands_medium-light_skin_tone:
PS - Just looking back at the tabbed interface script and realising that I actually understand what is does, as opposed to not having a clue a few weeks back :face_with_tears_of_joy: Thanks for the help on that score....
-
@DanH said in Randomizer on 3 Grouped buttons, How?:
HiseSnippet 1196.3ocuW8tahbCD2aR1SGaKU8j5CfU9vIPWJAR3tVI5oF96ITCDDPhZ0oSQlcMfU10FsqIMnnH0OUo9BzGo97z2f1wdWX2P1jlPSq+Bq8L+F+yyL1yPOegMMHP3iLxLbwLJx3yMGrfKmVeJgwQsafLdoY+pcabRGTsEyHAATGjgw1ePI0HyNH83O+9ZDWB2lFuDBclfYSO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0HddCgC412KZkpHbPkpUaTG2pyfF8ZVoVCb+Z8Z0cfReRYWmSaeAXXeHzURCUUgZyfkEJiY3eI1.X0qeMTwdSHaS1hryWEsB2qCHCUD51PNAqvCmKkPN1Ixt3r9CKCh8vCK.hYwAG7dpDy3tzqwhQXGOlykvgsvWR1TEIL2qgsTLoyqgbxnDWmJ6gW56Ahwi8nQdKHT58COItzixGKmrLLoqcRb4AGb+.VXUCSUpoH2qdUzdKEOT0iKMHWh3at6YwU63hQEY5BMpW.8IgpPZTg.z4N8efZijincDR5Iba0YwLV2ZguupQiVotnxDOp+JUqZq4+X.s4ymNj5m5l.sgv862sAh45afjt+lS3wsTFJ3s3L4Iyn700VAEcFEZvXFwJvTot8x2E0doptjAwftHYh5+WDooLHX2ks3QeAvO7+G7iRfarAvKsYucX1G8cSwnimtAcZq5DIQ0jNJbBg3YTeISk8LpSuBl9IrkcFy5zfKkhY53czwU32OgH90wuxOM73EIu+9GS4DnbPMQxGnD+ngfPeQt+v04dL4qg6OZct+SS9Z39Rqy8GO6y69c+7Y7Du+WMSG5KuZuyBZKlB9l3C1ZrE5gStAyOJbm6Qj2cnR0jzQJfKJtyzapIz3AL4hzSZ+rLo4SktuzrKS5LY07cqUvW37wyMeilaOqYiQinNxDxtiYye+4eHcTOwbIiOFlaymAEMlclOsO7YLNTfIbNz4BjAEDJn50ETq0GhobW8h+EdhTVTs1HRYwkJQSIN9hKbBuvR8kAuPKA3DW+ARYLaqViiui1zrP9BnoPM5ENNpPwOBbe0XNbCvbzFfozFf4Ma.l2tAX9oM.yO+nXTWOTYtTLM7XBHnaCcCCCiF56OzUjn+yfTygo
-
plus this small change to your random number generator
local randomValue = Math.randInt(0, 4);
-
@Lindon YES! :clapping_hands_medium-light_skin_tone:
Thanks, and yes just noticed that 3-4 change :)
Thanks mate
-
@DanH Sooooo.... As ever when trying to implement it in my existing project it tends to go out the window! :grinning_squinting_face:
I'm trying to add in a line to switch filter modes by storing the filter mode values in an array and referring to it in the callback. HISE hangs when I try to do this... I've commented in the script where this happens. Would be super appreciative for any help :)
HiseSnippet 1433.3oc0X8taSbDD+tjbHraCpTUUoJ0OrJe.NKLN1IFnRAD9OwlZUriI1PaEJBs9t01qx4cM2sFvJJR8QnOR7HwaP6r6smuKINNFCTUtHExty7a1e6LyMybz1m6PBB39Flo5NcLwv7as5LkIFVcHlxLZrug40sNrbq8OnoQkoiwAADWCSy0ehTpYpMLTOe3wUvdXlCIdKCiWvoNjmRGQEw61tzuQ87picIcoiRncwRMb3rpbO9DfIqak2XL14X7.RKrTs0rLLuVMWpf62QfEj.CyMpvcm1YH+srP8eAMf1yiHWTvnCXnvsqy8bkLVtqQ0gTO21Q23.CvJsiu+qGd++AqlTW5r8i8CemR.JFQR+g4ZKhdERRu7KO8LSPuMBo2Ms533SGKhkH412X0fIH98wPHHIsB00Xs+9ZVU4fFLQtQ3iI08gEyPXe+74yhtW97Y1ayzPXHPfdC1GUm5AJT.8HjJgH2.hnV+9DGg8VZQaIArM7fZ9mnJOua2CZ0AYyfPlKxGyb4iP849HFG4SvAbVljlumfcXnNOB8xHxAmQU9nwbFrvdqv7N3XxtYZz7eVDvcVUf6tp.KtUlitfOrI2kDHuj2OK5AYQE1IKp3QQNtVk6VFbZgv09vMSuYZJyixHn9SXNBJmg3JmUitxS2m6Y6DczYgywaBIS5SRqXrG2A6o89uPJAN4lXH7I2BB41PntXl8RquJAbORtw9TPPBLY1CjFZOZej8aBsyiPExn16jHeyrX3KS.9nbADg5urKHSPVrtNCwrADWaMkNMTYoKP9uoOcuzouDOtxerUF4oo8JUwdd8f5F1myaIYg1e2sbkJ01G0nU2ZGVub0ZnNUOrQ6tR4wQsVOu4q.E6.tthJnxrXaJrL+dHJ5gyT.Vcm6.Y0mDx13qH8n4Qqv6ZWbOIgNMjSvJTuIBADicz5MKpewzfYV3hI.yXw1a+Dh.QYtj2g38QNdTmigWHCOjMSjjPceGbklQ5bJHGzO1zQQuH06eUpCm8Cuq7A86CILTCjveJBzVyajXHM.I3naGZqYucbazu1nSMjTofb4xEcO5xGLvinYdP3tmOTDyGOBafXXTHQkmF+R71ae9fSXFJUlVKcD25VZ+XbFqJ2ORgLwaexYqMLeCmL0W8nqYJ0nrP3SgaEwd2rR2pN2Wk+S7BHK0AjOIpP.pTJ0uh9IQ8iVbA4.lsrPQpzmlFcdQ86OWY5bXOh+bEKai6uHf1rIi5Q7STlRoHzO6rMLst7FlI6m6DVKHghbVCFUbvXB6xZiZnKf.MTszrBTUnZmdCc6zJpbLCJz0LkddmBFJJmbjFiOB367oAe2OM3EOO7O73kANLqmpv4bN7m2Xer.KGJQ6NAW7XhufJidl6SdCLsW3HJor1mDbrfOV4u0EGf+dI73ua1Q99dklFe9cJQXXHcPNA1SIXe8PeFeTlemKy7H7mCyu6kY92O7yg4KdYluz3q17W6pi3wV+upmz0u27sNMnIeDXarOnq4ZFWbRUXdYt6DOr3rCQK+xAs.nPwYlVUNQJKfJllLs8Kxj0KKcuoUapvY3746Zyguv6Geo4q96T1zJbZ7XxtgU8+3+3OJQ+MieuUat2zwC4LpSXeNEgRYoa5sfOczvntO40SHLmHuXoce6qK8rjo.xYDhW+ykd1Dr2475Uni4dX+kJhr9x0p4J9bwEk17iVytTnuhx0kQlud36OYoC5Hoy9qGdeCqm8+.xdHehfxF.eZnOEJ8a0ZxnN7I9NDfnLFLEJrGTVWBUsNubspULg4pV7OviVXA4ZSsvBQBMFgc74uxIbrC46OWWsCvIl5+VmTVMkqQylzxxJet7FifNMuxwQVP6t.2mOlcVAL6tBXJtBXt2Jf49q.lGrBX9kEhQ1ju7DAeTXtIrQ6Zpw9LMqolBPklZ7uXoUlsA
-
These two lines do exactly the same thing
local idx = btnRandom.indexOf(component); local idf = btnRandom.indexOf(component);
Why are you doing this twice?
-
@d-healey I'm not... HISE hangs when I change it to idf = FiltModes and click on the Main Workspace button... I think it should be:
local idx = btnRandom.indexOf(component); local idf = FiltModes.indexOf(component);
-
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+F2kaSxM0gBBhgIaYPpm8nCQYN0yNOCULqZtyC7jgQ7WEC7w4bIB0aYJJSmVttliwrQDqL9T5BOkkt.4eSdQ4jIul3ixejNqb078J0w11CfSYx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