This is an attempt to roll this up and include all the fixes suggested by
others, clarifications etc.  Here we go.

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
multiple 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:150=>C2=140 -- ILLEGAL!! The string must not look like an old Q:
-- otherwise "Q:C2=140" is totally ambiguous.
-- The restriction is that the name of the tempo must start with a letter
and the next non-space character must not be 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 (the defined meaning of "sorta quickish" 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
Q:3/8=140=>A bit quicker -- changes beat to 140 AND defines 140 to be "a bit
quicker"
Q:1/4 -- beat is now 1/4 so now 1/4=140
Q:A bit slower -- slow down to 110
Q:A bit quicker -- speed up to 140.  Note that "A bit quicker" means 140 -
it does NOT mean "3/8=140".  In fact we now have "1/4=140".
Q:1/8=A bit quicker -- This is poor style because we have just dropped to
half speed since now 1/8=140, so 1/4=70 and "A bit quicker" is a very poor
description.  A human reader who knows English will be upset.  A computer
player program won't realise what the problem  is.

WHAT PROGRAMS *MIGHT* DO with this.
Q:120  -- print .|=120 and set the tempo appropriately (it might not be .|)
-- possible warn if the beat has not been explicitly set (deprecation)

Q:C2=120 -- similar, depending on how long C2 is according to L: etc.
-- more possible deprecation

Q:1/4=120 -- print .|=120 and set the tempo, remember beat is 1/4

Q:140 => sorta quickish -- Just remember the definition

Q:120=>Allegro -- Just 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
-- Exactly what a display/print program displays/prints is up to the program
but note that it KNOWS WHAT THE OLD beat was and the new beat is now set.
If the two are different then it should will probably show that in an
appropriate style, conforming to the general style of output that it is
generating.

Q:1/4=sorta quickish -- print "sort quickish"
                    -- set tempo to 1/4=140
                    -- set current beat to be 1/4.
Q:1/4=100=>Slower -- print "Slower"
         -- set tempo to 1/4=100
         -- remember that Slower means 100

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.
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:
<top> ::= <noteletter> | <numerator> | <noteletter><numerator>

<beat> ::= <top> [/ denominator>
-- e.g. <beat> is C or C2 or 1 or 1/4 or c3/8

<rate> ::= <speed> | <string>
-- string must have been previously defined

<QLine> ::= Q: <beat>
<QLine> ::= Q: <speed>
<QLine> ::= Q: <beat> = <speed>
<QLine> ::= Q: <speed> => <string>
 -- this defines string
<QLine> ::= Q: <beat> = <speed> => <string>

<noteletter> ::= A|B|C|D|E|F|G|a|b|c|d|e|f|g
-- (or L???)

<numerator> is a natural number (a string of digits, not 0)
<speed>  is a natural number (a string of digits, not 0)
<denominator>  is a power of two 1, 2, 4, 8, 16, etc.
<string> is a string of characters that does not include newline, which
starts with a letter, is at least two characters long, and whose second
non-blank character is not a number.

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
L: Q:1/4=120=>Allegro -- sets the beat, the tempo and defines Allegro to be
120
-- NOTE it does not define any relationship between Allegro and 1/4

A and K are in effect the same thing.  The old Q:120 becomes rehabilitated
SO LONG AS 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.

The restriction on a tempo name not looking like another Q: line is actually
overkill, but I think it keeps things simple.  It would be possible to allow
it unrestricted, then
Q:73=>C4=170
...
Q:C4=170
would have the effect of setting the tempo to 73.  I think this is too
confusing.  One could allow it on the grounds that nobody in their right
mind would ever use it.

It is orthogonal to this proposal whether tempo string definitions are
allowed in separate files.  It is also orthogonal to this whether tempo
definitions are allowed in file headers, between tunes etc.

It is really orthogonal also to the relation of Q: to repeats, but that
needs clarification.  In what follows, a b c... are used as labels for
pieces of music.  Q1, Q2, Q3 etc are places where one might put a Q:
command.
|:  a. Q1 b [1 c  Q2 d  :|[2  e Q3  f ||  g Q4 h

Q1 applies to b c and e
Q2 applies to d ONLY
Q3 applies to f and g
Q4 applies to h
a is played at the default tempo on both repeats.

There is no way to specify that the a repeated section is to be played at a
different pace for the two repeats other than writing it out twice.  This is
an interesting topic, which is also separate (it applies to the current Q:
commands with or without these extensions).  If it needs to be discussed
(damnit, I think it does!) can we spin of a separate thread, perhaps called
"tempo changes in repeated music" so that we can try to get the lid on this
"really simple" one first!!

Laurie


To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to