Old-Time Jam page
Tune Lists page
Music Theory page
A few notes on ABC notation — Pete Showman
What is ABC? ABC notation is a text-only way to represent music.
Because the files are just text they’re easy to share using email
or via postings on the Web. You can easily find thousands of tunes in ABC
notation, on many different websites.
It’s also popular because there are many programs (often inexpensive
or even free) and web services that can display sheet music and/or play
tunes from ABC.
Here’s a complete ABC file for “Mary Had a Little Lamb” in the key of G:
T: Mary Had a Little Lamb
"G"BAGA | BBB2 | "D"AAA2 | "G"Bdd2 |
"G"BAGA | BBBB | "D"AABA | "G"G4 ||
Here’s the output from the (free, but command-line) display program
I use, abcm2ps:
From the same ABC file, a related program called abc2midi
can create a listenable “MIDI” file like
Notice the automatic chordal/rhythm backup, which is based on the
The default tempo is rather slow but you can change it with the Q:
(Quickness) information field, explained below—e.g.
Q:1/4=120 for 120 quarter notes per minute.
Each tune comprises a header plus a tune body.
One file can contain multiple tunes, separated by blank lines.
Anywhere in the file, a single percent-sign '%' starts a comment;
all the following characters in that line are ignored.
(Two percent signs '%%' introduce a non-standard command understood
by some software but ignored as a comment by other software.)
The Tune Header: The header consists of lines of text
(called “information fields”) that define overall (initial)
characteristics of the tune. Each starts with a capital letter
and a colon (:) followed by the field’s contents.
The most important header field types are:
- X: 1 — or any indeX number that’s unique in this file.
Must be the first line of a tune.
- T: My Tune’s Title — the Title of the tune.
You can add more T: lines for subtitles.
- C: Composer’s Name —
or phrases like “Traditional”,“Arr. by ...” etc.
Multiples are OK.
- M: 3/4 — the Meter, e.g. 3/4 for a waltz, 4/4
or C for four beats per measure,
2/2 or C| for “cut time” (two beats per measure), 6/8 for a regular
jig, etc. Aside from waltzes and jigs, I do most old-time music in cut time
(C| or 2/2: each beat is a half note; two beats per measure).
- Q: 1/2=90 — specify the playback speed
for MIDI output (here, 90 half notes per minute). Also adds a tempo notation to
the generated sheet music: a picture of the note followed by a notation like
- L: 1/8 — the Length of the basic note
you’re using — usually 1/8 or 1/4.
Other notes are scaled from this length. Use whatever seems most convenient.
For the kinds of folk tunes I do,
I usually use L:1/8—or sometimes L:1/4 for waltzes.
- K: Em, — the (initial) Key and mode:
A-G plus suffixes 'b' for flat and '#' for sharp, if needed, then the mode,
if not major: “m” (or “min”) for minor, “Mix”
for mixolydian, “Dor” for Dorian, e.g. “K: EDor”.
Major is the default, but can be explicitly added as “Maj”.
K: must be the last line of the header; the next line starts the tune.
There are lots of other fields that can be in a header, but these are the
most important. M: and K: often change in the middle of a tune, so they
(and several other header fields) can also occur in the tune body.
The Tune Body: The most important symbols for simple tunes are:
- Letters A-G and a-g are note-names:
- Lower case (c-g a b) are for the octave starting at the c
above middle C. On a fiddle or mandolin that “c” is on the A string;
“e” is the open e string, and “b” is the highest note in
first position (all the instrument examples assume standard tunings).
- Capital letters (C-G A B) specify notes in the next-lower octave.
Capital “C” is “middle C”. Capital “D”
is the open D string on a fiddle or mandolin.
- Still-lower notes are formed by adding one or more commas.
For example the lowest notes on a fiddle in standard tuning are
“G,” “A,” “B,” (one comma) and then “C” (no comma).
The low E string on a guitar would be “E,,” (2 commas),
and the low E on a bass is “E,,,” (3 commas).
- For the octave above the lower-case letters add an
apostrophe: the three notes above e f g a b are c' d' and e'.
So on a standard-tuned fiddle or mandolin the first few notes
on each string (ignoring accidentals) are:
|G string:||G, ||A, ||B, ||C||D
|D string:||D ||E ||F ||G||A
|A string:||A ||B ||c ||d||e
|E string:||e ||f ||g ||a||b
||[ c' d' e' ...]
- Accidentals are (not very intuitively) shown using the prefixes ^ for
sharp, _ for flat and = for natural. So ^F is F# and _B is Bb.
As in standard music notation, once an accidental is used it
applies to any following instances of that note in that measure.
(If a note with an accidental is tied across a bar-line (i.e. spanning two
bars or measures), the note’s continuation retains the accidental, too.)
- Note durations are indicated by a suffix: no suffix means the note's
duration is the amount set by the L: field in
the header; a “2” suffix means to double that default duration,
while “/2” (or simply “/”) means to halve it.
Similarly, “3/2” means to ‘dot’ the basic note, and so on.
So assuming the basic length is an eighth note, “EFG2A” means two
eighth notes on E and F, then a quarter note on G and finally an eighth note on A.
(Since most of the tunes I do in cut time (2/2) have lots of eighth notes,
I usually choose that as the base value, defined by
L:1/8 in the tune's header.)
Broken rhythms, e.g. a dotted quarter plus an eighth note,
can be also be represented like this: A>B
means the same as “A3/2 B/2”
(without the space) — so with L:1/4
it's a dotted quarter plus an eighth.
(Of course with L:1/8 you can just write
A3B to get the same thing.)
- A hyphen '-' after a note means to tie it to the next note
(which must be the same note-name). Ties are mainly used for notes that
stretch past a bar-line, or that span note-groups.
For examples see the first few measures of the low-part-first version of
Damon’s Winder (PDF) on my Tunes page.
- Triplets are indicated by a preface “(3” [there is no closing ')' !].
So for example Cuckoo’s Nest begins “(3ABc ||d2” [...]
meaning a triplet pickup ABc (3 notes in a quarter-note’s time)
leading up to the tune’s first “real” note, a “d” quarter-note.
- Slurs are indicated by enclosing the slurred notes in ( ).
I have used this only rarely in these tunes and lists.
- To group eighth and shorter notes (combine them with a
common “beam” replacing their individual
flags) you simply run them together with no intervening spaces.
A space between notes ends one group and starts another.
Each group should represent one beat (a convention often ignored in tune books),
so in 4/4 time a group might have 2 eighth notes, or 4 sixteenth
notes, or any combination adding up to that duration.
In 2/2 time each group would be twice as long—4 eighth notes,
etc., with two groups (beats) per measure.
- '|' is a measure bar (surprise!) and || is a double bar (phrase separator).
You can also make special measure bars like repeats |: and :|,
starts of numbered endings like |1 and :|2, and the thick bar at
the end of the final measure in a tune: |].
A chord name (to be displayed above note) is specified by putting the
desired name in double quotes immediately before that note.
(See the Mary Had a Little Lamb sample above for some simple examples.)
Here sharps and flats are more intuitive: “#” or
“b” immediately following the letter—for example
“F#m” or “Gbdim”.
Generally the printed-music tools will display almost any suffix,
surrounding parentheses, etc.,
while the ABC to MIDI converters know how to play only the more
common chord types (but can be taught new ones).
- P: introduces a Part, e.g. P:A or
P:B. The part labels can be shown
or hidden. (Even if hidden, part names can be used to control
the order in which parts are played in MIDI output. But for
simple old-time tunes with sequences like AA BB or AA B CC,
the default MIDI playback sequence is usually all you need.)
There’s lots more to know about using ABC, but this overview
should get you started.
For more information on standard ABC (and tools to use it without installing software),
see How to Get Started with ABC Notation
by Chris Walshaw, the inventor of ABC.
For an exhaustive, and maybe exhausting, description of the new (2013+)
proposed ABC standard see
The DRAFT abc music notation standard 2.2.
There's a lot to digest there, so to get started slowly see section 1.2
, “How to avoid reading this document”.
For much more on the extended version of ABC that abcm2ps understands,
see Guido Gonzato's excellent
Music with ABC Plus” at SourceForge.
(The free abcm2ps software is also available there, as are some free programs
that provide graphical front-ends, such as EasyABC and MC Musiceditor.)
Jef Moine, the keeper of abcm2ps, also has a
useful page that describes the differences between what the revised ABC
2.2 specification says (link above) and what the
current version of abcm2ps (8.13) does.