How to interpret abc music notation
A tutorial by Steve Mansfield
Last revised : 14th August 2016
Notes of different lengths
Sharps, flats and naturals
Time signatures and rhythm
Mid-tune changes of key, time etc.
Barlines and spaces
Titles and the indexfield
More optional fields
Putting it all together
Abc notation is a simple but powerful ASCII musical notation format. Devised by Chris Walshaw, abc is widely used for the notating and distribution of tunes, particularly on the internet. Very popular in traditional music circles, it is also gaining in popularity in early music.
A tune notated in abc can be played directly from the notation, or many software packages exist which can convert abc notation into MIDI, produce sheet music, play the file through the computer speaker, etc.
Abc is not reliant on the user even having a computer, or on a computer having any specific music hardware and software. It is platform and OS independent, and is a very efficient way of storing and distributing tunes and collections of tunes. John Adams of the Village Music Project, at the end of a talk at Sidmouth Festival in 1999, distributed over 1000 tunes on a single floppy disk.
This tutorial does not claim to be authoritative or even complete in its coverage of the abc standard. It is intended to be an introduction (albeit a reasonably comprehensive one), and sufficiently detailed to enable you to read and write abc files.
I would of course be extremely indebted to anyone who points out any errors of fact or interpretation in this tutorial.
The tutorial assumes you possess basic knowledge of how 'standard' Western musical notation works in terms of note names and lengths, the concept of a tune having a key, etc.
For further information on abc, the various software packages available, and links to other abc sites and tune collections, go to the abc home page at http://www.abcnotation.org.uk .
Middle C is notated as
The D immediately above middle C is notated as
The E above that is notated as
And so on up the scale.
Starting at middle C, the notes in that octave are shown as
The next note up is a C again but to
show it is in the higher octave, that C is shown in lowercase as
So a full one-octave C major scale from middle C is
So going from middle C to the B one octave and seven notes above that is
And were back at yet another C note.
The next octave up is shown by an apostrophe immediately after
the note name, like
So our scale now runs two octaves from middle C:
And using the apostrophe to denote the upper octave we can extend our scale further :
But what about the B immediately below
middle C? That octave is shown by a comma immediately following
the note name, eg
We now have four octaves at our disposal, which is more than enough for our purposes of notating traditional music:
but note that the range can be extended further by adding more commas or apostrophes. A picture paints a thousand words, so click here for an explanatory illustration .
Abc allows you to set the default note length for each tune. This is set (as a fraction) in the tune header in the L: field.
The following table shows the most common default note lengths for traditional music, with the equivalent terms from standard music notation. This will hopefully give you the idea.
|Default note length||English terminology||American terminology|
So a tune where the default note length is a quaver, or eighth note, would have
in its header.
Why is this important?
Because the notes in tunes arent always all the same length. By setting a default note length you are setting the value of the most common note length in your tune.
So to return to our C major scale
If this had a default note length of 1/8,
eg the L: field was shown as L:1/8, our scale as shown is a scale
. If the default length was ¼, eg L:1/4,
the same notation of the same scale is now a scale of
But, as mentioned a bit earlier, the notes in tunes arent always all the same length.
What happens if notes are shorter than the default note length?
If the particular note you are notating
(which, for the sake of brevity, I will from now on call
) is half the length of the default note length,
it is shown with a forward slash immediately after it, eg
This can also be written as C/2 if you wish.
If the current note is a quarter of the default note length, it is shown like so : C/4
If the current note is an eighth of the default note length, it is shown like so : C/8
Other fractions (/3, /5, /7, /16 etc.) are also legal.
What happens if notes are longer than the default note length?
If the current note is twice the default note length, it is shown like so : C2
If the current note is four times the default note length, it is shown like so : C4
Other multiples (3, 5, 7, 8 etc.) are also legal.
The length of any particular note is always calculated according to the default note length of the tune.
A quick word about hornpipes
The hornpipe rhythm is useful to illustrate one more way abc allows the notation of notes of differing length.
A hornpipe could be notated with a default note length of 1/16 like so :
An easier way is to set the default note length to 1/8 and use the greater than > symbol :
The greater than (and less than) sign can be used wherever groups of dotted notes are found.
The < symbol has the same effect in the other direction, eg shortening the first note and lengthening the second, as found in strathspeys etc.
One last thing about default note lengths
Some standard default note lengths for common types of tunes
However according to the particular tune there is nothing to stop you using a different default note length if it makes the notation easier to read.
An L: field can be placed in the middle of a tune to denote a change of default note length - see the Mid-tune changes selection below.
Rests are indicated by the (lower case)
letter z. The length of rest is set exactly the same way as the
length of note is, eg
So far all examples have been in the key of C. Not every tune is in C however, and some tunes confuse matters even further by having accidentals in them.
To sharpen a note precede it with the
circumflex or caret ^
To flatten a note precede it with an
Double sharps are shown as ^^ and double flats as __
To naturalise (?) a note precede it with an
equals sign =
So a scale of G major could be notated as
And a scale of G minor as
However : just as standard Western musical notation has the key signature, so that the player automatically knows to (for example) play all Fs as F# in the key of G : the same thing exists in abc, with the K: field.
The key signature is specified by the K:
So our G major scale can now be written as
And our G minor scale as
Major keys are assumed, but can be
specified by maj eg
Minor keys are shown by m or min, eg
In the key signature field sharps are noted by the hash character # and flats by the letter b, eg
|B flat :||K:Bb|
|C sharp :||K:C#|
Modal keys (the Lydian, Ionian, Mixolydian,
Dorian, Aeolian, Phrygian and Locrian modes) can be specified by either name in full or
by the first 3 letters of the mode: the space, and capitalisation, is optional.
K: G mix
K: G mixolydian
and, indeed, K: G miXoLYdiAn
are all correct.
Highland Bagpipe notation is also catered
puts no key signature on the music but implies the bagpipe scale, while
puts F sharp, C sharp and G natural.
More complex key signatures can also be expressed by global accidentals : as
one example, where would the abc notation of Swedish and Macedonian tunes be
without such signatures as
(eg A major with C natural, or to put it another way, a key signature of F sharp and G sharp).
A K: field can be placed in the middle of a tune to denote a change of key - see the Mid-tune changes selection below.
G major scale in quavers :
Time signatures, or meters, like default note lengths, are shown as fractions in the M: field, eg:
And so forth. Common time is shown as C, and cut time as C| (the letter C followed by the pipe symbol).
Abc also includes a rhythm field, R:, which is used for cataloguing and sorting collections of abc tunes: this is entirely free text (although there are obvious standard entries eg R:reel, R:jig, R:schottische).
An M: field can be placed in the middle of a tune to denote a change of meter - see the Mid-tune changes selection below.
G major scale in jig time in quavers:
The L: note length field, the M: meter field, the K: key signature field and the Q: tempo field can all be inserted in the middle of a tune to indicate a key change. Strictly speaking this should be on a new line eg to play a G major scale up and a G minor scale down again,
but most software packages will allow the use of [ ] square brackets eg
GABcdefg [K:Gm] gfedcBAG.
If you want to change two fields at once, either put them on two new lines like this -
gfe dcB | AGB FED |
or put them both in the square brackets in the middle of the line like so :
GABcdefg | [M:6/8 K:Gm] gfe dcB | AGB FED |
Barlines are denoted by the pipe symbol |. Our G major scale in jig time immediately becomes more readable :
A double bar is shown by ||, and by using the square bracket symbol as |] (thin-thick) and [| (thick-thin). Repeats are dealt with soon.
To make the notation even more readable spaces can be inserted to separate groups of notes :
GAB cde|fgf edc|BAG
Spaces are also used within the melody, and by the various software packages which convert abc into standard notation, to group notes. The spacing of abc notation will tend to mirror the grouping which would be used in standard notation. Spaces may also be inserted at the start and / or end of bars to make the abc more readable. As an example, I find something like
G | GAG GAG | c2G EFG | A2F DEF | GEC C2E |
easier on the eye than
G|GAG GAG|c2G EFG|A2F DEF|GEC C2E|
Repeats bring the colon : into action. The
start of a repeated section is shown by
and the end of a repeated section by
Where the end of one repeated section, and
the beginning of the next, coincide,
is technically correct, but this is usually shown without the pipe symbols eg
Numbered and alternate repeats are indicated by [1 and [2 (etc.). Where the start of a section co-incides with a barline the [ symbol may be omitted, eg
DE FF |[1 GA Bc :|[2 GA BG ||
can also be written as
DE FF |1 GA Bc :|2 GA BG ||
However if a repeat section does not coincide with a barline, always use the [ symbol instead of inserting an extra | .
Note that there can be no blank space between the barline and the number - eg [1 and |1 are acceptable, whereas [ 1 and | 1 are not.
Nearly every tune has a title, and one should always be included for identification purposes in tune lists, even if the exact title is not known. The title is indicated by the T: field eg
A tune may have more than one title - in this case just add a second, third, etc. T: field (each on a new line) and enter the alternative title(s) in there.
There is one more field to introduce at this stage : the X: index field.
The X: field is primarily for computers' benefit, as they (computers) have much more trouble than human beings in telling where one tune stops and the next starts. Many software packages therefore rely on the X: field to signify the start of a tune, even if there's only one tune in a file, and a blank line, followed by an X: field, delimits one tune from the next. It is therefore good practise to include an X: field at the head of your abc tune(s).
The X: field is put on the first line of the notation of a tune, and takes the form
It is good practise (but not absolutely essential) for the X: field to be incremental, eg the first tune in a file is X:1, the second tune in the file is X:2, etc.
The tempo of a tune is shown in the Q:
field, giving either the human or software musician a speed
indicates the tempo as 120 notes of the default note length per minute.
Q:1/8 = 120
can also be used, to specify in this example that the tune goes at the rate of 120 1/8 notes per minute, regardless of the default note length.
A Q: field can be placed in the middle of a tune to denote a change of tempo - see the Mid-tune changes selection above.
The composer of a tune is recorded in the C: field, eg
The source of a tune is recorded in the S: field, eg
S:Dave Collinge, at Preston EuroJam November 1998
The geographical origin is recorded in the O: field, eg
Textual notes on the tune are stored in the N: field, eg
N:Long rambling note about this tune going
into great detail, which can
N: be split across several lines using multiple N: fields
The identity of the transcriber or source of the transcription is recorded in the Z: field, eg
Z:Steve Mansfield 12/11/1999
The above are the most common fields encountered in abc files, but there are many more (W: for song words, B: for book, etc.) See things I've not mentioned for full details.
An abc notation of a tune has two sections, the header and the body.
The header contains the various information fields (index, title, rhythm, key, meter, etc.). A few important rules :
- The first field of a tune is always the X: field
- Each field in the header occurs on a new line
- The last field in the header, immediately before the notation of the melody itself, is always the K: field
- The X: index, T: title, M: meter, L: default note length, and K: key field are obligatory : the others are optional.
- The fields usually occur in the following order:
As stated, immediately following the K: field on the next line is the body of the tune, eg the representation of the notes of the melody.
If there is a subsequent tune in the abc file there will be at least one blank line after the end of the first melody, then the start of the second tune is denoted by the X: field of the next tune. There should be no blank lines within a tune - whilst human abc readers can cope with this, computers cannot.
X:1 T:Speed The Plough M:4/4 L:1/8 N:Simple version Z:Steve Mansfield 1/2/2000 K:G GABc dedB | dedB dedB | c2ec B2dB | A2A2 A2 BA| GABc dedB | dedB dedB | c2ec B2dB | A2A2 G4 :: g2g2 g4 | g2fe dBGB | c2ec B2dB | A2A2 A4 | g2g2 g4 | g2fe dBGB | c2ec B2dB | A2A2 G4 :|
Abc notation allows for many other nuances of melodies to be recorded:
Ornaments and grace notes, slurs, ties, triplets and other ets, chords and unisons, guitar chords, line ends and line breaks, fiddle bowing marks, accents, more information fields in the tune header, parts, song words, and comments in an abc file.
These topics, and quite possibly more, are now all covered in ... part two of this tutorial .
This tutorial is © Steve Mansfield 2000 - present. You are welcome to download
these pages to study off-line - I would however advise that you occasionally
check back to this page via the LeSession home page at
for any updates and/or clarifications.
Please be aware that apart from the above permission to download, no permission is given or implied to redistribute or repackage this tutorial in any form whatsoever other than by (a) circulating the Internet URL of the pages or (b) quoting small portions of this tutorial for the purpose or reference or review - please contact me for discussion of permission and conditions before commencing any other form of redistribution. I'm very open to and interested in hearing any proposal or suggestion, but I do ask you to ask me first. Please note this tutorial is NOT released under any form of Creative Commons license.
I welcome comments, good and bad, on the usefulness, clarity, and accuracy of these tutorial pages. Please email me . Whilst every effort has been made to ensure that the tutorial is an accurate and useful document, I accept no responsibility if the abc you produce as a result of this tutorial is illegible, inaccurate, or does not comply with the peculiarities of the particular piece of software you are using.
For such a small project the pages have been written in a ludicrous variety of HTML editors, starting life as a Microsoft Word 97 document before progressing through three flavours of FrontPage, TextPad, DreamWeaver, and Notepad++. The images of standard notation were generated in abc2win and EasyAbc.
Thank you to everyone who road-tested and commented on this document, particularly Phil Taylor, Jim Vint and Laurie Griffiths (RIP) - part of the credit for the accuracy of this tutorial lies with them, while all errors or omissions are mine alone.
This tutorial © Steve Mansfield 2000 - present.