[yoshimi] Re: Undo

  • From: Lorenzo Sutton <lorenzofsutton@xxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Tue, 9 Apr 2019 09:47:24 +0200

My two cents (wall a bit more, as usual :)

Undo is always nice to have given that you are often tweaking and listening, etc.

A doubt is.. how is this handled with MIDI learn? Maybe it would make sense to ignore (if this is possible) modifications made through MIDI learn, as I'd expect that to be some sort of 'live'/'performance' context.

In this context if people want to save ('record') midi automation etc. I think they should do it e.g. in a sequencer connected to yoshimi and use that to do the midi editing (and its undo functionality), then save as midi file or sim.

Another idea: if this is text and could be limited to N last changes (ideally also configurable), would it make sense to actually save this in a state file? If the format is what you suggest I guess 256 saved changes one per line might take something around 7 to 8 Kb so not so much overhead?

Now going a bit more on the usual 'crazy ideas' route... Undo could possibly pave the way for auto-save state files? This could actually be *very* useful in certain tweak frenzy situations...

Finally, all of the above, if ever implemented should IMHO always be as configurable as possible :)

Lorenzo.

On 08/04/19 22:29, Will Godfrey wrote:

I'm currently going though the user guide to bring it up to date, and just saw
mention of this... which got me thinking (dangerous I know).

With everything now using a central command block it would be possible to create
undo files. Is there actually any interest in that?


It might slow down editing operations a bit, but whether it would be noticeable
is a moot point.

The information would be written direct to disk, most likely in Yoshimi's
config directory.

Each instance would have it's own file and keep a pointer to its current file
position, advancing for write, and retarding after undo (allowing redo).

The data would be stored as text, with one line per command having the current
value of the parameter the command was about to change as well as the full
command. Getting the current value is remarkably easy - you just call a read
with exactly the same command block as the one you intend to write :)

If both were the same, then the line would be discarded.

To aid backtracing I think at the end of a session the undo files should be
closed but not deleted, but when starting an new session these should be looked
for and first deleted if they exist.

Finally, is this a project that would interest any of
'Yoshimi's Little Band of Helpers'? :@)


Yoshimi source code is available from either: 
https://sourceforge.net/projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

Other related posts: