In these examples it is easy to extract the tempo - but only because the non-tempo part has been restricted to a single word followed by a space. I can scan for a space in lots of simple ways (I gave two in an earlier mail). What can not be done so easily is to extract a tempo string from somewhere in a line of text that may or may not actually contain one. e.g. Q:Allegro ma non troppo 1/4 = 120 Q: Like movement 1 (1/4=110) but slightly slower Q:Like the first 1/2 1/2=120 Q: Like the first 1/21/2=120 Q:Like the 1/4=120 part but a but in 6/8 time 3/8=120 Q: Like the first 1/2 Q: Slow then getting quicker the first 1/2 about 80 but by the last 1/4 about 140 Q: Slow then quicker, 1st 1/2 = 80, last 1/4 = 140 Q: Parts A and B =120, C=140 and so on and so on.
The reason I proposed having the formal bit first and the free format bit last was to eliminate the problem of having to parse inside the free format stuff. Instead we can just scan for line-end. Incidentally I do still do the odd magic trick. Making a pack of cards all (seem to) change colour is one of my favourites. :-) Laurie ----- Original Message ----- From: Frank Nordberg <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 12, 2001 11:58 AM Subject: Re: [abcusers] something really simple > Simon Wascher wrote: > > > > my *exemplary* proposal for a separator was not % but %%display or > > %display (the second can be ruled out by reason of keeping the standards > > syntax stringent). > > OK, now have a look at this: > > Example 1 > Displayed tempo: Allegro 1/4=120 > Playback tempo: 1/4=120 > > Q:Allegro 1/4=120 > or: > Q:1/4=120 %%display Allegro 1/4=120 > > ------- > > Example 2 > Displayed tempo: Allegro > Playback tempo: 1/4=120 > > Q:Allegro [1/4=120] > or: > Q:1/4=120 %%display Allegro > > -------- > > Example 3 > Displayed tempo: Allegro > Playback tempo: determined by an external definition of "Allegro" > > Q:Allegro > or: > Q:Allegro %%display Allegro > > ------- > > Now, tell me exactly ow much more difficult it would be for a playback > program to interpret the first alternative (the one without the > "%%display"). > Remember that the first alternative has a few minor advantages: > *It's more human-readable. > *It's easier to understand for a non-programmer. > *It'll require a shorter text string - sometimes far shorter. > *It retains the connection between displayed and played tempo. > *It is completely backwards compatible on file level, that is > files that are written according to the old abc standard are > played and displayed exactly the same way they as they were. > > I know I sometimes expect too much from the programmers. Like so many > non-programmers I tend to view them as some kind of magicians always > ready to pull a handful of miracles out of their sleeve. > If you tell me you can't do it this time, I guess I just have to accept > that. But at least give it a serious try! > > Please! :-) > > > Frank Nordberg > http://www.musicaviva.com > > > To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html > To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
