Repaint panel or sliders on combobox callback
-
@gorangrooves it works in your example as well, you have to have as many created laf objects as panners, and store the 3 functions as separated functions, then it's possible.
May a bit too much workEDIT simplified snippet
HiseSnippet 1996.3oc6Y8zbZjbEeFIMtDrqS7VUNjbqKtXHFg3exdqxI0Bh+XSEDPA3s1TJJNsloA5ngtolowBbpTUNjOD49dOmxGf7EHmy0MmRka62fjW2yLvLR.qDHmjJNTxdn698meuW+5Gu9Mcb3lDWWtildr9ymPzz+TidyYhQUFgoLsFU0z+gFv2YCInl3AHNCUAaaeI17JsSmOA65Rrzz02+URp0icfl5y29EmhswLSxxozz9RN0jzjNlJVNamR+LpsccrEoOcbHpKVpgImUgaymBHaeirZS.MhGRZgkjsmgl9ipYQEbmdBrf3poevobq48Fwul4Q+WRcoWZSjCxo0CDj2z041VRDKmUqxHpsUm.OfqFHkNK8G664O9AFmQsnKleoe4IpEPK4Hr+Peunva+HvKWX3kMD7VAjzCAoC7fzmYzyzgNQrbEId9DiFLAwY.Fb6gghGsZ605IFU3.ELQlw3qH0cfAK3H4yylMMB9uTuLNPkK2ljwzlfcRBSDG1KbEn2gcPUG61Ayf+H1neJJPdCIhJ7wS3LXPxDgnIQTtKaaCSyHNt.ymuZt8faOapEwIWhToiiVymua1yuarWX2Xu3tw9IIRcQDmG34NiaQ.xujeIeFYC9PEMmxmsQ+2FQRfDxuyRnvNKgh6rD78kwO93XEPUaTudst0Z0G0rbcT82zpR+Fsa0K1Qa9i+NgMdP8oLybfye.7TP4rjCSi3W9qSE+2DOlbiBCqAiyfcH3WFOl2jhQTyqfEx+RzwGqFvfitH9.XEBxlxHwiMLiqD9xjdIyNqd8mq9.GgfUF.4I6xmxfrWcIlBHgrMI443yydQZD97BWfNFkGcjmVNNubt7vJpwAOkjjZAftN.QOWhHz0TKwn.3.46srIO0Ec8Hpff3SEd.Tx2n.97EvQdlzZD.kAH1AMg6H8T9RXFvsDenerxO8Nr8TRKtyXrM88DKPhI8TRpUSvQ4TJbFxlahkhMpV8Th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OU+3fl8I6mlRuO1HTG1zlEtGqyCOPUD2hI576KMhPGNJT2W+kkzMBovO8Nef5tpSsV2RmEK4Jlaq5y7q4Nz2C9FLXVBx3ft8F6QGd3eXfjVBCCIPjcYsIj2kIaloKj1PVPhbO.FBYkGVk5PTortgLgevDLqP1WT+l1VX44CY4eyupzGQVdgvV9jOlr7hgr7Ny+XxxOI7d9u6+Er7Cui+x1ZxuUhTZLFVyPeeXjzVfT4+HCUAPnbw8dl2+Yga6iDfAAbaT4zbaArVaxmGNXkeKf0ZyL7vAqBaArV6w1GNXUbKf0ZOS8vAqS.C9VuxvmXbl7VhXQz2fo79i9KHOXE90FJe0fLWpXd3Bidvdsl2UH9YFcnByQqFi6sBLBEb8g.i9uL3GaTav.HKzR.dfQ8u5Cya9UqKepfxFdFV3PkQFslNtGj4zjHee7PpM4ctz2Sd6HuwYkikdfdDlkZv+D93uXN4Xc+EyErn1XroC+s98XP95lOTMCfIl5MsGy3L4Xzhp8MLxlIq1XHW8aMMkl+QPtrUyS9sfmBaAOE2BdNYK344aAOuXK34y2HOxelr7TAer2wAXhN0T2zPWul52QUQgZ+K.bfrkzA
-
@ulrik Yeah, I know I can set each slider separately, but I am looking for a more elegant, scalable option. I know that Dave is a "freak" of that department
-
@gorangrooves said in Repaint panel or sliders on combobox callback:
I know that Dave is a "freak" of that department
Working on it... :)
-
-
@ulrik I appreciate your help very much, regardless of what solution yield most practical results! Thank you.
-
This is the problem
var PanState = PanStates[obj];
obj
is not an index, so you will always getPanStates[0]
.I can see a couple of possible solutions, but the thing that is really confusing me is why the laf function is retriggered when changing the combobox value... I added a button to the UI and pressing that also triggers the slider LAF function. Maybe it's always been this way but it seems weird to me.
Edit: Nope, I just made a test and this is definitely weird behaviour in your snippet. I need to figure out what's going on.
-
@d-healey I am itching. I've been pouring over this for over a day now....
-
@gorangrooves There is something very strange with your snippet and I can't figure it out. I'll make a new snippet.
-
Ok here's a minimal example. I'm just colouring the sliders in a solid colour, you can fill in the blanks in the laf to do what you want.
There are a few ways to achieve the goal but I just discovered that we can now access the component ID in the
obj
within the laf function, I don't know when this was added so if it's not working for you you need to update HISE. But using it I think gives the cleanest approach.HiseSnippet 1187.3ocsW01aZbDDdOaeIkqsQIp4yUm7mNjbH.NMspVsEaroEE+BJjZUojznk6VfsrrKZ2EanU9OT+00+Asyr2AbIFgsox9CV2ryaOyK6rCszpXlwnzDuBuY5HFw6K7aOUZ6WuOkKIMOj38H+SnFKSGldzASGQMFVBwyayeFOvqvVD2e+yOc.UPkwrEGQHmq3wri4C41Em1p1q3BQCZB6M7g4j9E0ZFqj0UB0X.Oa5WlLhFOf1icJEEaCeh2CNJgaU51VpkY.YNPkLsce0kxT4Oma3cDLjnBoMXnziI06yEIslEqFBwaqVKh7MSi7m5eBOgO+7EYfG6XDtPi74.uMVEjpbGfjWNHsUJjdhe6XMejcAGDOeteSITP5RgTcdnjJKYiuZK+5JPBoszP5.VCMPLWinWVt7Ngv+JtWP.jtM1vARUGAsa3ODNSsXMChliUwTwwJ0f8kIMXLQDpRlvkzrdbrsnwXYrkqjQamnoWdLWxn51BdBSu8Ngcmwr2NgpN+Qwf+JnvETcHWlvl.9CMVyDSIG8Yci.YJwS.23jxfoTPpX0vNpCTSXl25D78k5wrmSEiYQECeVXE.UN4iccNfxAELWxsw8CiblnXPAvuEhoFVX4uG9pPpjt.F+v.QSxdHiNPfO.sWpzUVtzc.WuLwqtbw6oYLYd4KbEhwdk5BWC1WHhR0n3dEBtBSwO+4tDiIW4ARRfAe662K2YlbELHg.FptZ3HkDnMQa+JPh28tjsQC1UoCil.Y8T8bkgYo9QiM8ilfFnYRTQL0OojgYuVsOqtCBbEfcDitxRXGrtjgpEEpUBs5Yhcc3sv.EyvAZEsRTmJDcfgAQJ4LYx3fHNfKEPi271svqIEjhy7+NgWfcNtbf.Cx4MiKb979w4Zgdwk6l0AZXxjWyFAiHrm.2LggT3siqxgfSUV1YxHmiBtJH7SY0s6R4kAXASuT13DS8pTLRNdXGlNeXhBBiT934TO31MmJNsJlSPkrojaOaDKitgRjfyevuu9TMRVa.LeayLDBeYcS2db1zsY8CDdBNbaFYEhKDx+.C4NZhp++MwtKwD+ZyCoVJNxNK5fHdDSa4Xh06P1EvadoCvK3eHyLvpFAI74WAHdOL00OJy0oyKcN9g93E2JjIDOeumBta5BO+i0L1oB2az+hRy+Sv2TAAF616Ptl45C9DdF5ErlxVZFbSBegfjCCO3FvP0TL722FLrJ+bSw5to9olmyO9deM3k6g37Fa1ljeQjbQ7uWaH0gvMABtkMzfHuRP0fcI2c+TMmepwt+7yt4iG6s1OWeEDX4GUxXA09waDgq9kw.KG4WCAW0PZ31o4uybGVSp7JWS51Bwm32BWAX4XbikfQ3578AFyVt7K8OpaWn2cA.2xuwustaRdCt+0pwVtr2ITqlik5SGOrMrfQLC7tTxDFr7uANbNktLRiYf1vqZNh+E9KiYEj1KiYkYLICowZ0GhSGlhqu9YtS.LIcaqW.9YC.c37o399kKUlLD1j9CwwX3+L38hkqS00PmcWCcdwZny2rF57x0PmucMz46VoN3OhY+wV0vzqCvAsNx8Nlm2QRJzY45BI+GngGjOC
-
@d-healey thank you very much! I'll investigate that thoroughly and report back (on successful results, i hope).
-
@d-healey @ulrik Thank you both so very much! Both of your solutions work very well.
@ulrik I didn't see your latest simplified version at first. While I was taking a break, I was thinking of a possible solution if I wouldn't be able to iterate through the index within LAF. I thought about creating multiple LAFs within a loop. Then, when I opened your latest script, I saw that you did that
Thank you!
-
@gorangrooves my pleasure