@djalexx1 if you insist on using the button component, you need to add logic to its callback that prevents it from flipping to 0.
this would be something like
if (!value) component.setValue(true);
this way if you click on it while its on, the callback value will be 0 and it will automatically set itself back to 1.
however, if you're saving the component in preset ,the callback will trigger on init, and if your button is at 0, it will automatically flip to 1.
so now you need to prevent this from happening on init.
you can define a simple flag that gets set to 1 some time after init and check against that
var postInit = 0;
Content.callWithDelay(250, function()
{
postInit = 1;
});
in your callback, the check is now
if (!value && postInit) component.setValue(true);
@Christoph-Hart
Do you think you could add a simple method that checks for this? I.e. Engine.isPostInit() so we don't have to do this hacky thing of setting a flag with a delay? I'm not sure this is 100% reliable. You could internally set a variable after processing the init part of the MIDI processor, and the method would simply get that.