free-audio / clap

Audio Plugin API
https://cleveraudio.org/
MIT License
1.78k stars 100 forks source link

undo/redo extension #311

Closed Trinitou closed 1 week ago

Trinitou commented 1 year ago

already discussed in #161 and #223

Now I found time to do a first draft. I tried to (hopefully) integrate suggestions the came from different people in those threads.

Some questions I already have:

abique commented 1 year ago

Maybe the change related to the stream notes could go in a separate PR?

baconpaul commented 1 year ago

left some thoughts

Trinitou commented 1 year ago

Another aspect might still be missing: The host can only apply the undo/redo objects one by one via apply_event_object ATM. But what if it want's to perform multiple undo/redo actions in a row (e.g. when clicking a node in an undo history or pressing undo/redo key command really quick). Even worse, if those undo/redo steps contain a lot of preset changes, the plugin jumps between different presets.

Therefore, the plugin would want to first get all objects at once and then can decide to skip some updates (if there is a complete state change in a later object)

Trinitou commented 1 year ago

Added a begin and end method as an approach for the issue described in my comment above.

Trinitou commented 1 week ago

I think this is now resolved with #419