[yoshimi] Re: Still not decided - need opinions

  • From: Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Mon, 8 Apr 2019 18:59:21 +0100

On Sat, 23 Jun 2018 18:40:51 +0100
Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx> wrote:

On Sat, 23 Jun 2018 17:16:30 +0500
"Nikita Zlobin" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "cook60020tmp"
for DMARC) wrote:
i looked some xiz files from latest zyn - and it seems to be compressed
xml. Is not it possible yoshimi-spec data in special block, like extension,
which would not break zyn?   

This shouldn't be a problem. Last time I checked, both Yoshi and Zyn simply
ignored entries in the files that they didn't recognise. When Yoshi saves
a .xiz file it is completely Zyn compatible. Also, Zyn simply won't see .xiy
files at all.

Wait... what if xiz file is saved from zyn, and than you need to load
to yoshimi again? It could just check, what version is newer, and
update older - may be ask about user choice in this case. As fariant,
load yoshimi version anyway, but if xiz appeared newer, than ask,
wether to update it (only after loading).  

Now that is something I didn't think of :(
However, date/time stamps might not be very reliable as an indicator. Possibly
better would be reading the info tags. Ones saved by Zyn won't have the Yoshi
version numbers. It does rather slow things down though.

It's a completely valid point, but I don't know how far we should go in
protecting users.

Will.


Coming back to this after a loooong time. I think I have an answer.

First of all, always save both formats - these days disk space is not exactly
tight.

Keep in mind that an instrument can't be shown in a bank if it doesn't
actually exist in either form.

When loading an instrument, first look to see if there is an 'xiy' file. If not
simply load the 'xiz' one.

If there is an 'xiy' one, then look for the 'xiz' one. Again, if it doesn't
exist simply load the 'xiy' one.

If there is an 'xiz' one, look at the header. If there is a 'Yoshimi-author'
field then it must have been saved by Yoshi so load the 'xiy' one.

If that field is missing, it's been saved by Zyn, so at that point notify the
user and offer a choice.


The only time this fails, is if a program change is called via MIDI, in which
case I think we simply prefer the 'xiy' one.

-- 
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
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: