@Christoph-Hart Well, cannot get it working. Any simple example you can share?
Content.makeFrontInterface(800, 700);
const var Panel1 = Content.getComponent("Panel1");
const var SimpleGain1 = Synth.getEffect("Simple Gain1");
const var uh = Engine.createUserPresetHandler();
Panel1.setMouseCallback(function(event)
{
if (event.clicked) // mouse down: start gesture
{
uh.sendParameterGesture(2, 0, true); // 1 = Custom Automation, index 0
}
if (event.drag) // during drag: update value
{
var dragValue = event.dragX / Panel1.getWidth();
uh.setAutomationValue(0, dragValue); // set custom automation parameter
Console.print("Drag Value: " + dragValue);
}
if (event.mouseUp) // mouse up: end gesture
{
uh.sendParameterGesture(1, 0, false);
}
});