Button automations

Hi guys,

I always had issues with writing automations for parameters linked to buttons (either momentary or toggle). Basically, while on knobs and sliders the automation starts with the current value and, then, the new values are written according to the parameter changes, that’s not happening with buttons even if I send a beginChangeGesture, followed by a setValueNotifyingHost ending with a endChangeGesture.

So far, the workaround is to send the current value BEFORE updating the parameter with the new button state. I don’t like this way and I’m wondering if there’s a better way to deal with this.

Thanks,
Luca