Unsolved LAF SliderPack Bug
-
So, in the latest commit (and basically most of them I think since about May) my sliderpack which is linked to my arpeggiator looks like this (-24 / + 24 values):
It should look like this: -
@DanH ok so it turns out that just calling
const var laf = Engine.createGlobalScriptLookAndFeel();
Makes the SliderPacks go funky.... Could someone test for me please? Just take the snippet below which has a coloured SliderPack, and then add const var laf = Engine.createGlobalScriptLookAndFeel(); into the script and hit compile
HiseSnippet 833.3ocsUstSSDDEdFfgXAgHFe.5Og.1zxkBD+g0VZ0hbo5hfW9AY5tSaGY2YV2c1BqFeC7IvmAeGDdLLwWAS7M.OytKcKRCBMw4GM87cNmc9NWmFdRSluuzCgyrWnKCguKwHTn5ToCkKP02.gmlrM0Ww7xFCUNzk56yrPX7nOUCfyLFJ576GWlZSElrTHDZeI2jsE2gqRQaT54ba6ZTK1dbm9rd4R0MkhJRaY.vmQI4QtTyinsY6P0lMBAgGupEWI8LTTEyGrorzJzni7XQr86y84MsYZgBHC3CECipzgaa03hX0Ggvi0HMxGMNxe.YatEuGdZF3dQJxl5Q+4.7HWGkJbKnDtOJMVLklgXX5wcUoZz7YRRcATPZQgTc+TI1VD9TREIXfPkygdDqlGHzygYKlO+BYgel6QsBDlJtTjUJ1QpX6JlctI9zDYl3ySj8uU0p0.0ouFOosMyafp0UWuqywYEANMYdKjsK0Nf0yPH7ubNc7aVN0LNp6yPontfq10kkHWSZaoyU5+e0J.JIsoqEILDnhJpRb+jJggM2h40.5KQb3CMEIEn.JJLR6myUxhpnH76HEWN21gaYr9G4kOXYZ3VgcC.4JyuYUk0Jen7A6tYvlMW6YqK5lmuTHXzAA4fy7VqI5VrH.5Foe0kV4EsWrBX96Cdq8apsdND5U02PeIITFXODQtLOEWm3vav5ByewMSYHav7ORIcir0wUJzwJdxaQ.dRZvsWovdBmZW5XtkpCBSveEiPcX71cTZoeBZctzRhuyULmKlwyL92P+5bMdJ5hZXD57i0vJ1IpTiO6ryhLtY6Tre7koOOdqxUldf4VoUfMUc4gY8VqDEP23klfziIBetJr+sZ2hI77W6D9MkhyPZvUlcFLGGY.bDp9+O3XxdwoHUa0hYpRI3XjZudXWB9Ot9WJCTbQ6soJONzsQ1Ivw.pzlL31EBlsutqZD8rZrbdsrNCXvDVQBmCmDkEzx3DkEtPIxgZ5IOzLdBWu48NQH.mDQOzjAdwCjy1aflPxmKOzGawOzzTG9ODVeLXeVbH7YogvmkGBeVYH7o3P3ypCgOqcs9ne+8IAJoS73..znZzZOLtpfBcVQcgn+DcWdoE
-
-
@DanH a little more testing, using local laf seems to help, but it still won't go bi-polar...
HiseSnippet 1175.3ocsVstaaaCElJIpn1acXcXO.D4OSYwUwtI0MAAEyI9Rf2bR7hxRKPQQAsDkMWjHUnnRh5PQ6STdE1qxdD1aP2gR9hbpawVvp+gMNW424Pd9NtuT3RiiERjQoSSinHiu1zIkqF0bDgwQcagL9FSm93N60pM9z1Nmh1OMhDGS8PFFKef1GiRqfx972+z9j.B2kNSEBclf4R6wBYpYZ623WXAAcHdzSYgE7dqFccE7lh.QBfmkMqhhHtmSFROhncaISjw8Z6wTBoihnnwHiU1W3k5LRbEO2+yXwrAATsPMjCjnb0cDAdZDq0hZNhE30eRcGifrzeVWX47tv2adHyiMU+rtw2lY.OKhh8CiklGdKOG7pUDdUK.uE.IiBPZkbH8PSGWIKRMyhFOekYWthJ8IPauHTx8Esz6V1ro.7fqrCImS6HAgoQXUuZ0JX3q01sbYn0GqvWRj3.hO9Y317gLN01URgh4f.w.RPdR6IDmuG2qCkFXMefNALOprOboUCRvjycHU0TDFI3ff0pE7Y0aEc+d60oPb4mbOgKI31GYlq1R5PVLTJcR3tJlfaspmjbUO.0DY9wrZEr+DiCqfEC980J+GkKswF3tsvrXrZDEySBGPkXgelTbVbkKUtTVmHCN52iw1QL946lqVVP8ffD5tZ+gjFjczXlt+FIB.zioD2QSSJ3RB2WHUIbvVPJNUjfGQtjhUB3WomqviV.FXRnHgqxBzh4iYpeHF6kxIgL2J3jXpthriHRncomQzowmpfSTmib8SRkdTZsb36V.9grqsBpfkUztGSgmFV5bx7VCuAtVccytzP6X8UnN.K20xJVsOP5Iur1qvq+L7TwMeE9GwV0rqheTlxKIP64HgLjDvdC0SGbIcB8ABfSfZCFKOg5pH7gATqIYoBdKvw2lcQO60hFDezigrGBfiStkwB9QBE8XtU1Ec42VFeaS99Kzl9UmTDDPkKzrloR94BzJ+cTEbVIO0QX7cdNAyOMmPQJK27gfBNJ3c4L0wQT9mhHCMdxQyeLFUvwqxXO9twrGyZnHFPT7.yBcXTFzmwGa2vinHHiWZVeK6AaysW+M8R6U24mGr8KRNLsW5Na9jecX8l15OhKq1b8q8NcyMuX+me7IG274GGsyICu3fmdwEGz1S6uyNYd1GhRj.es2N1Hzu0sk9PFCY.8PEEQkJltYYzhdIr+Hm.rjYKZ74JQTluiITPF2++PAd8rhqUizoBumz3JlmZzTE+06ZLhxFNZ1Rq2eViv4V18mJ50pI6pJcuat4lOjub6iHtgUFBuDfMX98H5kmiM.Ojli7VSPyiYpzhKW+ea4x+VH9Py9LfKYwXboEfQ3R7KAFGuR9Als88AthY.bEyNu3Ky9WDvMoX7gGRTRF7nw7njPG3l1kBmNmSCzCxFKoG4xkqpk0c.GJ2KS3CvmwFqokMFar1DinPhqT7Z27AU8R+6moAvDO6+6Tx7PsLd5booYU6pnP3+e7ZWWc4+HfEXww736PLadGhYq6PLO4NDS86PLO8NDy1e1Xz+0u8RThv7wAPQ+1YrWFFs4D3kU1qPz+.vQsvHC
-
@DanH @ustk Did some work on this but it hasn't been merged https://github.com/christophhart/HISE/pull/327
https://forum.hise.audio/topic/5852/unmatched-bipolar-sliderpacks-broken?_=1664562880466
This particular bug though was only affecting bipolar sliderpacks that had different value ranges on each side of the centre, so it might be different to your issue.
-
@d-healey Thanks Dave, @Christoph-Hart is this fixable soon do you think?! :)
-
@DanH Did you try ustk's pull request
-
@d-healey No, I'll try tomorrow
-
@d-healey the changes in the pull request haven't changed anything here. @Christoph-Hart am I doing something wrong?
-
Just a little bit of maths
HiseSnippet 1271.3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CexU1Pu1JWYiwJQQDOo3MdYir5207YFI.l3lmzUw9P8ZbwDpcc25nH3IVuwySm9q.8ay1m0d.9r9CvmMd.9r4Cvmsd.97cO.e99OpO5W2tSpRDkMN.B511vkYY0lSfNKSWH5e.3K8WIA
-
@DanH Oh yeah, my maths is bad. I'll leave that to you for homework :)
-
@d-healey ha thanks! Either way it's still a bug that needs fixing right? What's the method for bug reporting these days?
-
@DanH I'm not sure it is a bug. Once you're in the world of LAF you're in control and you may want it to be mono-polar even if the range is bi-polar.
Bug reporting is through github issues after the bug has been confirmed in a forum thread.
-
@d-healey Ok thanks, @Christoph-Hart is this a bug? If so will report :)
-
@d-healey ok sorted the scaling but now my sliders above zero are kinda oblong
HiseSnippet 1637.3ocuX8+SaaDE2FvcKoi1RWk1udheXyzlllPYrNU00DHgRJAHpIkUMDp5v9bxMruyy9bfzIj5eQ8Ogs8mT+On6cmShcBATZFcQnfde897d28du6Ri.tEILjGnomoUOehl92XzrGSzYyNXJSqVEM8rFMafZUsYKj1F87wggDaMc84egTtdlEzTe93y2.6hYVjDVZZGvoVj5TOpHgaiR6Pcc2BaSZQ8Ro8ZkpYwYaxc4Q.Vl2nflO15DbaxdXoZyYnoeip1TAOno.KHgZ5KrA2tWyN7SYw5e.MjdrKQRTTqI3nX1awcskHVxUayNTW6FCh4PMvKMRx.yGmAtmwtTa5P9IYh6nDfRrHc9PetQg27i.uhogWgTvaBPZtTPZgXHsjQSq.puHQhDO2znFSPBbvPZOMTh0Uat+ZAiM4fFLQdO7IjsB.hgVXtdgB4PvWq7zrYgTen.0EGfbwNnmgpxZSYj7VADHXdgK+XrarSqy4mTlYuEg3ZNpgMco1jfFvlVQvACV21DwlbOeNCHLWNkNKOl0MpWdqT1Eux04VX2wWRkp4CHsogPnrUDyRP4LyksCvmVGPMNHdYVNGxYfv14P7i+8Ux9mYy7nGgpUAQCQhNDDKx6XR.h6nnBU1kMiDPX.LfI4w.PdZLqt8Y0E6FQ1iG3gcouiX2WpqB8xiug48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Zrd.wkaQE8tHVGF4+8H304Aa.q+OuCfmGG035gdpw6cMpSXsEcldzdhb0N3kvp8FdiqGZsoqrXIC3AULFwsIwEtrCeZJymni9Ni8iD9QhqI2sjwtMpB8+CF3vKTqLk082V5npL6KwMWQyzTkb2vXa3cqSnb8huMDdUJ2NxUNTK8SUkuOuu.3xViLsS9FPVHb5NcV5Z68qSKDWxnAEdxvjw3bS.ixmF+E.iCuuPUGG3DTB.WvXq27k4I9Zvs8ETV6cwh.JbIG03W3FQvnh3CMxK6pOmr6bLcAIsLCzjvrUDeB9zWXQIsdegEGHTyCaEveqU7YM4uqvWq3.Xho9IUxXrqjFkb2UiB4Kn4Qsou0xRF9ODtX0jsY0YvlGOC1r1LXyONC1r9LXyOMC17jqzF4utT4HA2Ktb.Xznp5V955wCfUmB09WHLefwJ
-
Could some one help me with this little bit of code pls? I'm not sure how to get the parent name into this - perhaps I've misunderstood...
// linear interpolate each slider // unfortunately you have to hardcode the slider amount // (if it's dynamic, use obj.parentName to fetch the parent slider pack) var c = Colours.mix(l, r, parseInt(obj.Arpeggiator1) / 16); // this is normally parseInt(obj.id) g.setColour(c);
HiseSnippet 1637.3ocuX8+SaaDE2FvcKoi1RWk1udheXyzlllPYrNU00DHgRJAHpIkUMDp5v9bxMruyy9bfzIj5eQ8Ogs8mT+On6cmShcBATZFcQnfde897d28du6Ri.tEILjGnomoUOehl92XzrGSzYyNXJSqVEM8rFMafZUsYKj1F87wggDaMc84egTtdlEzTe93y2.6hYVjDVZZGvoVj5TOpHgaiR6Pcc2BaSZQ8Ro8ZkpYwYaxc4Q.Vl2nflO15DbaxdXoZyYnoeip1TAOno.KHgZ5KrA2tWyN7SYw5e.MjdrKQRTTqI3nX1awcskHVxUayNTW6FCh4PMvKMRx.yGmAtmwtTa5P9IYh6nDfRrHc9PetQg27i.uhogWgTvaBPZtTPZgXHsjQSq.puHQhDO2znFSPBbvPZOMTh0Uat+ZAiM4fFLQdO7IjsB.hgVXtdgB4PvWq7zrYgTen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COGMebp9V8S0aDIDblJMeKiXTzmU+CQI2fRaJ7whFuh.02e1tHdCV4haarWjWS4VPLuwbRgRSiStogzCJrLan3NJGz7D5k.iO97oIc.dAFzsCoW3+kLBDL9Dh8NL9wi6fu+hYi6z2AP40w7M3mobATYQ9iHBbm3grm9.JETVzXeXlPWxqf4BjYKZxXzrSjiiKY1NgcSipLLb7uEkbUgvU2t7dP5vi1B59jRv+2cMmZrd.wkaQE8tHVGF4+8H304Aa.q+OuCfmGG035gdpw6cMpSXsEcldzdhb0N3kvp8FdiqGZsoqrXIC3AULFwsIwEtrCeZJymni9Ni8iD9QhqI2sjwtMpB8+CF3vKTqLk082V5npL6KwMWQyzTkb2vXa3cqSnb8huMDdUJ2NxUNTK8SUkuOuu.3xViLsS9FPVHb5NcV5Z68qSKDWxnAEdxvjw3bS.ixmF+E.iCuuPUGG3DTB.WvXq27k4I9Zvs8ETV6cwh.JbIG03W3FQvnh3CMxK6pOmr6bLcAIsLCzjvrUDeB9zWXQIsdegEGHTyCaEveqU7YM4uqvWq3.Xho9IUxXrqjFkb2UiB4Kn4Qsou0xRF9ODtX0jsY0YvlGOC1r1LXyONC1r9LXyOMC17jqzF4utT4HA2Ktb.Xznp5V955wCfUmB09WHLefwJ
-
@DanH The parent name is "obj.parentName"
if you want the number of sliders you can use this:// This is the amount of sliders var sliders = Content.getComponent(obj.parentName).getNumSliders();
However I'm not sure it's a good idea to use "Content.getComponent" from inside a LAF, someone else have to respond to that.
-
@ulrik ah ok, I think I get it now, thanks
-
@ulrik Use Content.getAllComponents instead. This will return an array, just use the first element. -
However I'm not sure it's a good idea to use "Content.getComponent" from inside a LAF, someone else have to respond to that.
Nope, bad idea. The paint call should be as fast as possible and
getComponent()
and especiallygetAllComponents()
should be avoided as it has to iterate over all components and find the one with the matching id. If you have less than 50-100 components this might be OK, but for bigger projects it's recommend to create a reference on init and then use this instead. If you have multiple sliderpacks, you can create a JSON object with the id as key:const var SliderPacks = { "SliderPack1": Content.getComponent("SliderPack1"), "SliderPack2": Content.getComponent("SliderPack2") }; function drawRotarySlider(g, obj) { var numSliders = SliderPacks[obj.parentName].getNumSliders(); }