@aaronventure @Dan-Korneff it did not works because the script is taking the value. And the value in this case is a variable it has two scales, and it usually takes the 0-18 scale which is not the one i need. (im also a true beginner when it comes to these types of scripts)
inline function onSYNC2Control(component, value)
{
GRAINS.setAttribute(GRAINS.Delay_Sync, value);
if(value)
{
// the callAfterDelay script takes this as GRAINS.SpeedL
Knob7.set("mode", "TempoSync");
Knob7.set("min", 0);
Knob7.set("max", 18);
Knob7.set("stepSize", 1);
Knob8.set("mode", "TempoSync");
Knob8.set("min", 0);
Knob8.set("max", 18);
Knob8.set("stepSize", 1);
}
else
{
// but this is needed in this case
Knob7.set("mode", "Time");
Knob7.set("min", 0);
Knob7.set("max", 1000);
Knob7.set("middlePosition", 500);
Knob7.set("stepSize", 1);
Knob8.set("mode", "Time");
Knob8.set("min", 0);
Knob8.set("max", 1000);
Knob8.set("middlePosition", 500);
Knob8.set("stepSize", 1);
}
Knob7.setValue(GRAINS.getAttribute(GRAINS.SpeedL));
Knob8.setValue(GRAINS.getAttribute(GRAINS.SpeedR));
}
Content.getComponent("Buttonsync1").setControlCallback(onSYNC2Control);
is there a way to double click the sync unsync btn: in this case Buttonsync1
twice on loading to refresh the state? i know this is quite bad but this vst has already been sold and i am not able to change this setup into two independent sliders (which has been recommended), i would have to redo all presets and the users could not use the new vst version with their old projects.