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!