Does automating push buttons work (in all hosts)?

We have a button that takes a specific action when pressed. Some users are apparently asking for that to be automatable. But that seems totally wrong to me. We’ve never automated push buttons before, only buttons that toggle state.

Part of the reason is that a push button can issue a 1 and then a 0 state change, and BOTH those state changes could be seen in a single process buffer, leaving only the latest value as being seen by the plugin (since we don’t have sample-accurate parameter automation). To me, even making it a parameter seems wrong. It’s not a state, it’s an action. So what does its value even matter? It’s the user action they want to somehow automate, but to me it seems that parameter automation is not the right way to do that, just a convenience method that might lead to problems of one or the other of the button states getting lost.

Even if the changes are seen in different buffers, since our action involves writing to a file, we can’t do that while processing, so the Editor needs to know the change happened. Will a push button attached to a bool parameter ever call buttonClicked() in the Editor code when reading back the automation?

Is automating push buttons even a thing? Does it automat properly in all hosts/conditions?

1 Like

I don’t have an answer to you first question, but I fail to see why automating a push button would be more wrong than automating a piano sustain pedal, which at least to me is a kind of push button, albeit a bit more physical than your editor buttons.

I don’t see why that shouldn’t work, if it is desirable for the user. Not sure if triggering via automation is the most reasonable choice, it could also be a note.

You could use a ParameterAttachment to listen to parameter changes (on the message thread), and then trigger your action from there. The button can be attached to the same parameter et voilà. To avoid double triggering, only trigger the action on the rising slope (0->1) and ignore it on the falling slope (1->0).

1 Like