Home   Old-Time Jam page   Tunes 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:

X: 1
T: Mary Had a Little Lamb
C: Traditional
M: C|
L: 1/4
K: G
  "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:

Image: music notation, Mary Had a Little Lamb

From the same ABC file, a related program called abc2midi can create a listenable “MIDI” file like this. Notice the automatic chordal/rhythm backup, which is based on the chord-names shown. 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.

ABC Basics

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:

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:

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 “Making 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.

This page is maintained by Pete Showman, image: jaminfo2 at showman dot org.