Phil Taylor wrote:
>
> John Chambers wrote:
>
> >So, are there any good ideas out there for how to correct for damaged
> >ABC like the above?
> >
>
> First idea : remove _all_ linebreaks and put them back in the right
> places.
>
> 1. Locate the first line of the tune.
> 2. Remove all newlines from there on.
> 3. Replace newlines on every fourth bar line, unless it's a :|2, in which
> case the newline goes on the next bar line.
> 4. Locate any in-tune fields and fix them, either by inlining or
> by putting newlines before and after.
> 5. Remove any backslashes at the start of lines.
If anybody is writing a per script like that: would it be possible to
get a copy?
>
> Problems:
>
> It's going to screw up some carefully-composited abc, especially
> abcs with more or less than 4 bars per line.
That's a major problem, closely related to the "convert to standard ABC"
suggestion that was proposed recently. There are two possible reason why
a tune is written in more or less unusual ABC: sloppiness/typos or the
tune *needs* to be notated that way.
>
> It's not going to be easy to make this water-tight. In fact,
> considering that it only takes four mouse clicks and four keystrokes
> to fix the original manually, is it really worth writing all the
> code necessary to fix it automatically?
I think John's idea was to include it in the tune finder.
Frank
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html