I would like to propose the following. I will give the syntax first as
examples with explanations and then some more formal stuff to try to
eliminate ambiguities and assist implementation.
Text to the right of and including -- is a meta-comment, that is to say it
is part of this discussion and not part of the syntax in question, not even
as a comment.
Q:120 -- as before, backwards compatible
Q:C2=120 -- as before
Q:1/4=120 -- as before
-- in fact ALL currently legal Q: lines are still legal and have exactly the
same meaning as before. This is essential so that we do not break existing
ABC. Some of these forms are still deprecated.
Q:140 = sorta quickish -- Defines "sorta quickish"
-- this can be later used as "Sorta Quickish", "SORTA QUICKISH", "SorTa
QuICKiSh" and so on but NOT as "sortaquickish". "sorta quickish" (with
mulktiple spaces) and so on.
Q:120=Allegro -- the popular example. Same idea
Q:160=2fast -- ILLEGAL!! the string must not start with a number.
Q:3/8 -- defines or redefines the beat as being a dotted crotchet
-- in particular if the beat was 1/4 then Q:3/8 means that 3/8 will now take
the time that 1/4 used to.
Q:1/4=sorta quickish
-- sets the tempo to 1/4=140 AND defines the beat to be 1/4.
Q:Allegro -- uses Allegro which must have been already defined.
-- There are now to be 120 of the current beat per minute
-- the next examples are to be read together:
Q:120=Allegro
Q:110=a bit slower
Q:1/4=Allegro -- beat is 1/4 and there are 120 of them per minute
Q:3/8 -- beat is 3/8 and there are 120 of *them* per minute
Q:A Bit Slower -- beat is now 3/8=110
WHAT PROGRAMS *MIGHT* DO with this.
Q:120 -- print .|=120 and set the tempo appropriately (it might not be .|)
Q:C2=120 -- similar, depending on how long C2 is according to L: etc.
Q:1/4=120 -- print .|=120 and set the tempo, remember beat is 1/4
Q:140 = sorta quickish -- Remember the definition
Q:120=Allegro -- Remember the definition
Q:160=2fast -- Complain!
Q:3/8 -- possibly print .|=.|. or some such if the beat has changed
-- adjust playback tempo if the beat has changed
-- remember the beat is now 3/8
Q:1/4=sorta quickish -- print "sort quickish"
-- set tempo to 1/4=140
-- set current beat to be 1/4.
Q:Allegro -- print Allegro, set tempo to 120 of current beat per minute
Naturally all the printing would probably be in the style which that program
used for displaying tempi.
ADVANTAGES
1. 100% compatible with all existing ABC
2. Allows definition of musical terms by people who want to do that
3. Concise syntax for setting tempo, changing tempo
4. Allows printing programs to know that this text is a tempo
5. Because "name" always occurs on the end of a line lots of escape
questions don't arise. There are two restrictions to be lived with - tempo
names must not start with a number and they must have more than one
character.
6. The syntax is small, not a lot of extra stuff for something "really
simple" and it (almost) parses left-to-right with no surprises.
More formal syntax:
A QLine ::= Q: <number>
B QLine ::= Q: <letter> = <speed>
C QLine ::= Q: <letter><num> = <speed>
D QLine ::= Q: <letter>/[denom>] = <speed>
E QLine ::= Q: <letter>/ = <speed>
F QLine ::= Q: <letter><num>/<denom> = <speed>
G QLine ::= Q: <num> / <denom> = <speed>
H Line ::= Q: <num> / <denom> = <name>
I QLine ::= Q: <num> / <denom>
J QLine ::= Q: <num> = <name>
K QLine ::= Q: <name>
<num> (the numerator), <denom> (the denominator) and <speed> (the speed) are
all unsigned integers, i.e. strings of digits.
zero or more spaces are allowed wherever I have shown a space.
Discussion (though by now I think you've got it!)
A Q:120 -- old style, possibly no longer deprecated (see below)
B Q:C=120 -- old style, deprecated
C Q:L3=90 -- old style, deprecated
D Q:C/4=480 -- old style, deprecated
E Q:C/=240 -- old style, deprecated
F Q:C3/8=120 -- old style, deprecated (the C is needless)
G Q:3/8=120 -- valid, current style
H Q:3/8=Allegro -- new, uses Allegro (must be defined)
I Q:3/8 -- new, defines or redefines the current beat
J Q:120=Allegro -- new, defines (or redefines) Allegro
K Q:Allegro -- new, sets current beat to Allegro
A and K are in effect the same thing. The old Q:120 becomes rehabilitated
if there has been a preceding Q:1/4 or Q:1/4=220 to define the beat.
Q:Allegro WITHOUT any previous setting of the beat has to be deprecated
because it is as peculiar as the old Q:120 was, so the first tempo setting
for a tune should use form G or H. After that forms I or K can be
convenient shorthand if the time signature or feel of the piece changes or
the tempo changes.
Almost none of this is new. I'd like us to get to a vote, and fairly soon.
Laurie
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html