-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undo v2.0 #402
Undo v2.0 #402
Conversation
One thing that I didn't add yet is the implicit changes. |
So as I said on discord I think the requirement to have the binary deltas be stable across versions and instances is a mistake. We should revert e4c7447
I think the api should include a way for the plugin to advertise whether its undo redo stack is valid per instance or across instances. Implementing this api without that constraint is easy in surge. Adding that constraint means I wouldn’t bother or maybe would do something that just makes apply delta fail across instances always. |
@baconpaul the delta are currently optional. So you can have an implementation of the undo that doesn't require to provide any delta. We could have a flag to express the forward compatibility of those deltas, at least that'd be a step to make the plugin developers aware of this. The host, or at least Bitwig needs some strong properties on the deltas, and if the plugin's provided deltas don't honor those then it is better for the host to collect the plugin state (which is forward compatible). |
so I have a large state. A parameter change i have a small undo. But if I don't send you that undo you cache the entire state? That seems really wasteful no? There's, I bet, a lot of plugins out there with undo implementations (including surge) where
|
The host can workout a binary diff of the state. Most plugins have a relatively small state. |
but then the redo is setting the entire state! that's terrible! We turn off and restart our audio engine on a state reset. but don't on a parameter change. |
Please avoid hyperbolic figures of speech. As I've written above, we also have to discuss a different path for the parameter changes as those changes are well understood by the host and the undo steps can be created by the host without the plugin calling Yes, a state reset is an heavy operation and the host could keep both the state and the delta and pick the delta if its life time and version format permits it and fallback to state otherwise. I'll add the life time info. |
I've added the delta lifetime. I think it allows for the host to choose the best path according to the current options. |
I added implicit changes to the extension. |
Yes thank you Alex! That exactly addresses ny concern my “that’s terrible” was indeed mis worded. What I meant was “that would make host undo way worse for our users than internal undo (which I think would be a terrible experience for them)” but with the suggested changes I can definitely code to this!! appreciate you listening |
No description provided.