David Barnert wrote:
>Just a little earlier in this thread, it occurred to me that what
>I would like to see in BarFly is a "Save as standard abc" menu
>command. A text file would be saved (and displayed) that preserves
>as much of the active file as possible without using any features
>not found in the current standard. V: lines and whatever else
>would either be stripped or "commented out" (%). What would remain
>would be readable by any program that adhered to the standard, and
>would therefore be suitable for posting publicly.
>
It's an interesting idea. To guarantee* acceptability to all the other
programs you need to go back to version 1.6. In order to reduce an abc to
v1.6 the program would have to:
* Remove any macro definitions from the tune headers.
* Convert any notes with multiple slashes e.g. a// -> a/4
* Change M: none to M:4/4 (even if it's wrong).
* Remove any clef specifications from the K: fields, and if that
leaves a K: field in the tune empty, remove the field itself.
* Convert any inline fields in the tune, placing them on a separate line.
* Convert any w: lines to W:, removing any asterisks or underlines.
* Remove any annotation text written as "^text" or "_text".
* In multi voice abc, remove any V: fields in the header, strip out
all voices other than V:1 and remove the V:1 field identifier from
that.
* Remove (or %comment out) any text between the tunes. (Well, the
abc 1.6 definition doesn't mention that, but it does cause trouble
for some programs.)
Have I forgotten anything? The trouble is that if a file was
made using all those features it probably really needed them, and
stripping them out will result in a travesty of the original.
I think the real trouble is not with the traditional dance tunes for
which abc was invented, but with more complex music for which abc v1.6
is simply inadequate.
* Actually not even v1.6 guarantees acceptability, since there are
several ambiguities in it. I have a test file of 45 tunes which all
conform to v1.6 AFAICS, but includes many examples of complex and
difficult abcs. None of the programs I have tested (including BarFly)
gets them all right.
Phil Taylor
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html