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.