ABC Music Notation: Note Lengths
by John Chambers
(Back to main text)
Note Lengths
In addition to saying what note to play, you need to say how long the note is.
ABC does this by simply putting a number after the note. The number can be
an integer or a fraction, and means to multiply the default length by that much.
You can't combine an integer and a fraction;
you must use a simple fraction.
So 1-1/2 would be written as 3/2.
For example, A2 is an A played twice as long as just A,
and A3/2 is an A played 50% longer than A.
In fractions, a numerator of 1 and a denominator of 2 can be ommitted.
So A1/2, A/2 and A/ all mean the same thing,
an A half as long as just A.
There is a useful length abbreviation: The characters < and >
between two notes mean to take away half of one note's length and give it to
the other, with < meaning "short+long" and > meaning "long+short".
Thus c>d means the same as c3/2d1/2 (or c3/d/).
You can also repeat these characters, using << and >>
for double-dotted note pairs.
Warning: This dotted-note notation is only defined between two notes of equal length.
If you use it between notes with different lengths, the result is not defined, and
ABC programs may misinterpret your intent.
Here is a simple test case, which is not very musical, but illustrates various
ways to indicate unit note lengths.
X: 5
T:
K: C
[| D D2 D3 D4 D6 | d d/ d3/ d3/4 d7/8 | EF/G//A// BA1/2G1/4F/4 \
| E>D C<D E>>F G>>A| B2>c2 d2>>c2 |]
This comes out on paper as:
Some things to notice about ABC's note-length notation:
-
Once again, I was too lazy to type the M: and L: lines,
so they defaulted to M:4/4 and L:1/8,
and all the note lengths are multiples of 1/8.
I've violated my own advice that it's always better to give these
explicitly and not trust the software to guess right.
-
The first bars don't add up to 4/4.
Most ABC software doesn't care.
Some programs have an option for checking measure lengths.
A few programs won't accept this at all, but they will probably
be fixed in future releases, as the authors learn about free-rhythm
music and understand that they have to support it.
-
ABC can represent "funny" note lengths,
and G5/7 is a valid note in ABC.
Programs that convert ABC to sound (such as
playabc
and
abcMIDI)
will accept it.
But standard notation can't handle them,
so it's not a good idea to do such things.
Notes like D5 and D5/4 would get error messages from
any program trying to show the music in standard notation.
-
I snuck in another bit of ABC: The final backslash (\),
meaning "continued on next line". ABC normally treats each line as
the start of a new staff, but if a line gets long, this is a simple
way of breaking it into several short lines.
-
This example also illustrates why it's usually a very bad idea to
try to embed ABC inside HTML. If you look behind the scenes at the
source to this page, you will find that all the < and >
characters are encoded as "HTML entities". They probably look fine
your screen, but any ABC program that tries to read this file is
likely to get very confused by the second line of music above.
So don't try to mix ABC and HTML. Put the music in a separate file
(with .abc as the suffix), and link to it from inside the HTML.
-
The < and > shorthands only make sense between notes of equal
length, so don't try to use them between unequal notes. Most ABC
software will do something with them if you do, but I wouldn't want
to predict what.
Forward to Repeats
Back to main text
Copyright 2001, 2002 by John Chambers