Jack Campin writes: | | But there are thousands of tunes out there using ! as a line terminator; | like it or not, that is one feature of ABC2WIN's syntax that caught on. | They matter more than any one application.
I've had to face this with my tune finder's scripts. What I did was to add some rather simple code to abc2ps to try to spot these abc2win bangs and ignore them, while accepting the !...! terms that "look like" musical annotations. The heuristic when a ! is encountered is to scan for another and count any special characters. If any bar-line chars ("[|:]") are spotted, it's immediately taken as an abc2win ! and dropped. If no matching ! is found, it's also dropped. This is somewhat crude, but it seems to work. So if we look at an example like an earlier one: | abc abc |!fff!fff!def def | The first ! would be taken as the start of !fff!, which is a valid annotation. The third ! fails on both tests, so it's an abc2win !. This gives: | abc abc |!fff!fffdef def | This was probably not what was intended, but it's valid abc notation. Of course, abc2win output doesn't contain !...! annotations. We should note that abc2win's ! does not found only at the end of a line. I've seen them in the middle of lines. And I've seen lines with two of them (one near the beginning and one near or at the end of the line). When ! is inside a line, there is almost always a | somewhere to the right. Possibly we could just add a warning about this problem to the standard (perhaps in an "Implementation Suggestions" section), and suggest this approach for dealing with it. To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html