On 03.06.2025 12:25, Will Godfrey wrote:
On Sat, 31 May 2025 10:55:39 +0100
Will Godfrey <willgodf...@musically.me.uk> wrote:
On Sat, 31 May 2025 10:47:21 +0200
Kristian Amlie <krist...@amlie.name> wrote:
On 30.05.2025 20:38, Will Godfrey wrote:
I'm thinking of protecting against losing changed but unsaved instruments with
the following:
Start with a zeroed 64bit integer with one bit per part (we can potentially
have all possible 64 filled. Call it (say) partStatus.
Every time there is a part-level write set the bit for that part.
On a part reset or save of an individual part either externally, or to a bank,
clear the part's bit.
On a master reset, patch set or state load clear all bits.
If partStatus is non zero when wanting to shut down, warn there are changed
instruments and which ones they are, giving the option of abandoning the
shutdown.
Any thoughts?
I think this is a good idea.
Thanks. I hasten to add I won't be attempting to get this in place for LAC!
Well... actually...
I couldn't resist at least having a quick look at this just to see if it was
at least viable and one thing led to another.
There is a branch, 'parts'. This is complete for the GUI but not started yet for
the CLI.
Change an instrument parameter (including the part's effects) and a flag is set.
Try to do a reset or load an instrument (including from banks) and you get a
warning. Ignore this and the flag is cleared as the change is made.
As soon as a part's instrument is stored anywhere the flag is cleared.
Patch sets and states are also covered.
System and Insert effects are not covered.
I gave this a quick spin, and here are my findings:
* It seems to work pretty well in general. As expected, I'd say, nothing
is better than that!
* In particular, loading a patch from the UI produces the warning, but
loading via Program Change does not, which I believe is correct (you
have no way to click yes from your MIDI controller!)
* There is some new, and quite verbose, log output. I assume this will
be removed.
* One thing to fix though: The warning is triggered when closing the LV2
UI window. In this case it shouldn't warn, since closing the window is
not a destructive operation, and the host is expected to save the state
anyway.
--
Kristian
_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel