Help Me Understand Range Slider Logic
-
I'm having trouble connecting a Range Slider to two different parameters of the same effect module.
I've added debug prints and found some inconsistent behavior:
- Using .getMinValue and .getMaxValue returns min: 0 and max: 1, but these values don't affect the module parameters
- Using .getValue always returns 20, but this value isn't being applied to the plugin parameters
- After pressing F5, the range slider resets to 20 - 20, and one of the parameters gets triggered (but only on startup)
Here's my current code:
const var knbDriveRange = Content.getComponent("knbDriveRange"); const var DriveFX = Synth.getEffect("DriveFX"); inline function onknbDriveRangeControl(component, value) { local minValue = component.getMinValue(); local maxValue = component.getMaxValue(); Console.print("Min Value: " + minValue); Console.print("Max Value: " + maxValue); DriveFX.setAttribute(DriveFX.driveBand1, minValue); DriveFX.setAttribute(DriveFX.driveBand2, maxValue); } knbDriveRange.setControlCallback(onknbDriveRangeControl);
Any help would be greatly appreciated!
-
I'm adding a snippet as a bump attempt:
HiseSnippet 2277.3oc6Zs7bibTFuGK21qUh2hEBTbfCS4hCZItbrjriShAr7KEbwZuBKGSnnJ1zdlVR85Y5dxLsrsBDHU3RtAWnJxINwMtyId7OvRQU4D23J21abL70yCodjFaqcheTTwZqcqc596q6e82ie82Lc2vWXQCBD9HihGzyihLdYbydbYmM6PXbzNagLtOdWRfj5aF0zF87HAATajgQg2V0fwLShB+8701f3P3VzAMgPGJXVzGwbYxAs1n1Oj43TmXSOf4pI8R01wRv2T3H5B3o.dQjGw5XRa5dDkXSfQ+.RPGjw2A+lKubYhcqUZUtZ427H6VVzpqr3quzJUHK+FsZsxhkWpp8JsVB.4TaayjB+lRhjFfLlbCgculcDmxilfCYAribnpGJiZBybTy0EN1pknpUzlcXN1MRLTAHjAtw.yVgHy1qf2kYy529.y2WIrCyAZna.MlHM7JjBdk0g2hZvKCHYnAoIifzCvMs7YdxA8nvyKg2gCdyVDvOoCkHYQSrcA7lBPBtbAWxwz59vC80nzxKt37lv+7vUmsXQvYEHMOg3atOg2lV+cM+dlgAOKzlJ2tUKpkrzbwcM2CWcUMENleTXGfFIyFnylBWOAGd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TkNrM+DpCjjDhwuJjUzhz0QlzZ5f7cEbQxozNHBXepzm0tMM8FKYsfVWJUuvW+VdkZ6ScnD8n4ucsGAQgD+cC27MW1hxuv2VfL8WeSbDbMUYlleQ7a2ngYW3EAovXcQPtxwa9uTHWMP4l31PbSLGtDKewSrhtDIpX46E1Brt4we4qcUOCElbxvab6BrhOwxJ8PMhhUxqhUyqhKkWEWNuJ954UwUxqhuwkqnZSq3W7QkxBEZ0X6nWQyXaNAh3idan+2oA7xW
-
@Mighty23 I have the same problem, I assume this slider in range mode doesn't work at all.
-
@madredeuz said in Help Me Understand Range Slider Logic:
@Mighty23 I have the same problem, I assume this slider in range mode doesn't work at all.
Yes you're right, it has not worked for a couple of years
-
I think the only solution is to make it with (maybe 3?) panels. Can someone direct me, even just in a descriptive way, on how to do it?
-
@Mighty23 You can do it with 1 panel, something like this
HiseSnippet 1517.3ocsWssaaaCFlJIZa1acnEXWsqH7.FjaRTrcNY6trlysYKGLh655PQQAsDsDQjoLjncRPadV106sauAa+jTxhNG5BBVMRSJ4+oO9ef7ycRh8noowIHqxu5xgTj02X28RtHbmPBiiNXWj02ZeJgGPwciX9zDz1WNjjlR8QVVy9BoNVklCo972OeaRDg6QK1BgdcLyidHa.STramM+UVTz9De5qXCLzdkMOvKluSbT7H.OyZWCMj3cFIfdLQp1L1nWRRCQVO0tQ+ddM5u9xMq2pdq0WoU85q1r2J0Z34uZqkWdsk862nIYslfQewd9LQbRWAQPSQVyscr+kcCiOmqCvqYordQT4h5ntPj0auebju7HJ2EsSHKxuSdhJEAdoSQZaVcZ66rOh4ylreQ56wJA3BKLSfVyLM7lcJ3U2Dd0Lf2s.IKCHMmFROwtqWBannPhDOes8AbAMoOApSlPQqKZl+5Ks2IFzfKbGPNiteBrXhENqUq1BX3WUeV4xKsToS253WrGt6gGr6dmh6r0w6cXoEueeJCU5TAV0Z04T7F39i3dBVL2InZ4OTtzXRBl.aKBYotATwgwdjnsiGw8ScjQujVkALtgRNUf0UjRUxHWL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CU7FgjC9JMZsRq0VuQqUUBjdUw0pc6AoHHmMANa9mahtI0OfzYr+nHhXZlnR95YBfFron+Io3wSYhKM4y++F8z6KDehcGlvK71w3L2BFgNkOGXLiT+ir2qeefxSA.myd+274gAOReeZ.bqeBCpu1GOZPWnaviBQmCcwxAbqYjih500jqkYftTtuZw+.exDVWt1JSX8bgPmiWR768zCvxu1vWo1AvDW8UrJYejbMtd9PaQdd.7sXdum2zt5FF13gZ3xOTCW4gZ3pOTCW6gZ35OTCa9ean7KYt0HfxndrAgNpydpqRsr1iSfNPU2J5eQXsZNA
-
@ulrik useful example, thank you for sharing this!
-
@ulrik
Thank you so much! I don’t think I could have figured this out on my own. Frontend development is really challenging for me. -
Your awesome panel example is not working now. It throws
undefined parameter
Am I missing something?HiseSnippet 1494.3ocsW0sTaaDEVhfZqca5zLSupWowWzQN.BaigXHMM.1PBSAhKNMMyjISl0Rqk1A4Udzt1Xll7Hzmgdce65aP64rqjkLPHDOS8vOd2yee64mUepaRrGUHhSLLK+xKGQML+FqdWxkgsCILtwQcLL+VqSHBIMwVu09WNhHDTeCSy68LbCyRKan97OOceRDg6Qy2xv3UwLO5wrgLY9tc28WXQQGR7oujMrf1M28HuXd63n3w.dtmUMiQDuyIAzSInZKYY7bhHzv7gVd862m1XfmOoFYP8MZQa1n4lMqsw10525QM2zq0Vdn3lFlewA9LYbROIQREfS2O1+xdgwWv0A3ULAqeDEWT2nGDY81FsCYQ9cyRNBCCyk6lmptmNU88Vmv7Yy1OOk8cJA14VTLoYtzsAo5eFPxr.jVVCoGX0yKgMRlKAwyWacDGpfCHPsoHTz5Zrze+kVsiAM3R2gjyoGl.KlYgyV0pspM7mpOtL7Y80Kc1dm9rCr6c7QcN3L6t6c5AGWZs61mxP8UHsOivCncOy9I1CFy8jrXtSP0x+Q4RSHI1DXaYHS3FPkGG6Qh1OdL2W3fwujVkgLdAkbp.qqfRUxHSmWFYpRVpoSJH7UjnwTmLCSPPARQGrFFhhg60f.xaZ710UZ8P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Ha7TAPqzbD8PxbbASdYQ15eFDQqcqDQuqP7AVcYRuvaFiKcCXD5P9+.ioz2uu0ACF.TaxA3xVG95Ekq9mH756MCfa2SXXa4oiG1CZb7nPz4P2q.6PWBGzzqqgqwLPOJ2Ws3egOoBqiqMSEVOSHzj4kD+NO83I9BBekZG.Sb0KPUBdSNXsc8qORNDdek244MuqtlgMVTC2XQMr4hZ3lKpgasnF9nE0vVeZCwWmbuw.0P8XigwIcOPcEpo4AbBzAp5VM9OPmSJYX
-
@JulesV Try this, I only inserted this lines to make sure the RangeSlider.getValue() is an object
if (typeof RangeSlider.getValue() != "object") RangeSlider.setValue({"min": 0.0, "max": 1.0});
HiseSnippet 1553.3ocsWstaaaCElJIZn1acXEX+Z+RyCXPtIww14lc5xpy01rkjZDm0UfhhBZIJItHSZHQ6jf17rr8Ht2fsCIkrnyktffUiDmPdt8ctQdX2DtGIMkmfrJe5kCIHquxt2kLQzNQXJCcvtHqu19DLKj3zKl5SRPae4PbZJwGYYM6Kj7XUZNj5ye+7swwXlGoXKD50bpG4P5.pnX2tc9UZb79XexozAFbuRmC73rc3w7Q.dl0tNZH16LbH4XrjsYrQuDmFgrdpcyf9dMCVe4VMZ2n85qztQiUa0ek5M87Ws8xKu1x9AMagWqEHzWrmOUvS5IvBRJxZts49W1KheNSafWSSo8iIxEMP8.Kq2dedruzEk6h1IhF62MOPkh.szsHrMqNr8s1GQ8oS1uH78MJBNERXF.slYZ3M6TvqgI7pa.uaARVFPZNMjdhcOuD5PQAEId9R6CXBRR.FxSlPQyKZlROxdGNvASTa.9Lx9IvhIR3tV85K3.eU8YkgOKsToS153WrmSuCOX28Nwo6VGu2gkV798oLjqSENphqtm3roSvHlmfxYtgUK+gxkFiSbvv1hHZZsPh3PtGNda9Hlepqz9kzrLfxLXxsBrthjphF9hooguPQKSzwFDeMNdDwMWvDUE+lJErnzDll6M.A7aa9tkTb8T2w0fMWD90vr2BO3Kx3obovZoDgtN2s.c8C0aUopTQg0BfljSj9Kw+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