An ABC primer

by John Chambers <>

This is a brief intro to the ABC music notation system. This notation was originally invented by ~Chris Walshaw <>, who produced the first ~abc2mtex <> program that converts ABC notation to mtex (Musix Tex). Other people have since produced a variety of other software for ABC <ABCsoftware.html>, most of which is free.

The main advantages of ABC are: It's simple ASCII, easy to type and read, and easy to email. There's a lot of good software that understands it. ABC files are small, so downloading is fast.

The main disadvantages of ABC are:

It's not a full music notation yet. It's best for single-line instruments. The software isn't from a single source, and there are inconsistencies.

OK, enough of that. On to the notation...


Each tune starts with some header lines. A header lines starts with a letter and a colon (:), plus some info. There are lots of different header lines. The most useful are:

X: 1

T: Tune Title

N: Notes about the tune

M: 3/4

L: 1/8

K: G

The X: line gives a sequence number, useful for selecting one tune out of a file full of tunes.

The T: line gives the title, and may be repeated if you want to give several titles.

The M: line is the meter; M:C and M:C| have the obvious meanings.

The N: line is a kind of comment, ignored by music programs.

The L: line is the default note length; here it's an eighth note (semiquaver).

The K: gives the key. K:Em would mean E minor. Most abc software also now recognizes the classical "modal" keys, using 3 (or more) letters of the mode, so K:EDor means E Dorian (two sharps) and K:AMix means A Mixolydian (two sharps).

The X: and T: lines should be the first two lines, and the K: line should be the last header line. Some software is liberal about these, but some is fairly picky, so its best to always use these three main header lines in this order. The K: line is followed by music, with a blank line to end the tune.


The bottom half of the staff, from C below the staff to B in the middle, are represented by the capital letters CDEFGAB. The top half of the staff, from the C in the middle to the B above, are represented by lower-case letters cdefgab. So the notes on the treble staff are EFGABcdef. The lines are EGBdf, and the spaces are FAce.

You can represent the octaves below and above these by putting a comma (,) after the capital letters, or an apostrophe (') after the lower-case letters. This is sort of a pictorial mark: The "lower comma" means go down an octave, while the "upper comma" means to go up an octave.

Here's a summary of notes:







-c'- ----


-a- --- ---- ----












---- ---- ---- -C-


---- -A,-



Bar lines

A simple bar line is |; a double bar is || You can get the thick+thin double bars by using [|, and a thin+thick double bar is |]. It's a good idea to include spaces around bar lines, for human readability, but abc syntax doesn't require this.


A note by itself stands for whatever length note is in the L: header line. You can add a multiplier after the note. A simple fraction is the basic notation. So A3/2 means a note 1.5 times as long as the basic length (a dotted quarter in the above example). You can omit /1, so d4 means a note four times as long as the basic length (a half note here). And you can say just / for 1/2, so F/ is a 16th-note F.

Since all notes are in terms of the L: length, you can quickly change the meter of a tune by merely modifying the M: and L: lines in the header.

There is a shorthand notation for dotting: The characters < and > transfer half the value of the note on one side to the other side. The < is a "snap", with a short first note, A<B is shorthand for A1/2B3/2. The > is a long-short, so A>B is shorthand for A3/2B1/2. You can double these symbols to get a double dot.


Within a measure, spaces are used to separate groups of notes that are to be beamed together (if possible). So |DFA dAF| is a bar with two groups of three notes (probably a jig), while |DF Ad AF| is a bar with three groups of two notes (probably a waltz).


Normally, abc uses one staff per line, and end end-of-line represents the end of a staff. This can lead to very long lines, so the backslach (\) is used to mean "continued on next line". This is similar to the use in a lot of programming languages.

"Guitar" chords

This refers to the names of chords, to be placed above or below the staff (there's no standard here). They go in double quotes, just before the note. So "G"dBAG would be a G chord above/below the d note. You can actually put any text inside the double quotes, so long chord names are possible. People also use this for other musical directions, but that isn't really correct.


You have enough knowledge now to understand the tune Balance the Straw:

X: 1

T: Balance the Straw

R: jig

N: This tune goes with one of the best-known Morris dances. It is also a good jig

N: for other dances, usually in AABB form. The B phrase bears a strong resemblance

N: to a certain Christmas carol, and at Morris dances you will hear words like:

N: __ Hark! the herald angels sing, __

N: __ Glory to the Morris Ring. __

N: Sometimes assorted other things are praised by the angels.


M: 6/8

L: 1/8

K: G

D \

|: "G"G2B B>AB | "C"c2A A>ce | "D7"d>ed cAc | "G"G2B B2D \

| "G"G2B B>AB | "C"c2A A>ce | "D7"d>ed cEF | "G"G6 :|

B/c/ \

|: "G"dz d dz G | "(D7)"c2B "D7"B2A | "G"dz d dz G | "D7"B2A A2D \

| "G"G2B B>AB | "C"c2A A>ce | "D7"d>ed cEF | "G"G6 :|


Repeats and endings

Well, I lied a bit just there. Did you notice the |: and :| symbols in that tune? You probably understood them. They mean exactly what you think they mean: Repeat the phrase. There's also a shorthand :: notation for a bar in the middle of a line with repeat symbols on both sides.

There is a simple multi-ending notation:

|: ... |1 ... :|2 ... |]

This represents a phrase with two different endings. You can use :| at the end to indicate four times through. But this notation is still not well developed in abc. You'd think that you could also say something like |::: ... |1,3 ... :|2 ... |4 ... |] But this isn't recognized by (very much) abc software yet, and isn't part of the official standard. It may be eventually.


The notation for accidentals is:


A flat.


B natural.


c sharp.

The usual rule should be followed: An accidental applies to that note for the rest of the measure, unless changed by another accidental. However, it is common to use occasional unnecessary accidentals for emphasis.

In "guitar" chords, the characters # and b are used for sharps and flats, so "Bb" means a B-flat chord, and "F#m7" means an F-sharp minor 7th chord.


You can produces chords, that is, multiple notes on a single stem, by putting them within square brackets [...]. So [GBdg] is a 4-note G chord. The order doesn't much matter, so [gdBG] comes out the same on paper. But there is some music-playing software that will treat the first note as the "melody" note, so if this is important, you should put the main note first.

ABC notation allows each note in the chord to have its own length. You can say things like [D4F3A2d3/2]. Music-playing software can honor such things with ease. But standard music notation can't represent all of this, and on paper you'll get something much simpler. Much music-printing software will just use the length of the first note for the entire chord, and the above example will come out the same as [D4FAd].

Slurs and ties

Parentheses are used for slurs. AB(cd) means to draw a slur from the c to the d. Slurs can be drawn between arbitrary notes (though there may be problems with slurs that go from one staff to another).

A tie is indicated by a hyphen (-) after the first note. So A4- A is two A's tied together.

Most music notation doesn't really distinguish slurs and ties, and abc is no exception. You'll see A-B, which should really be (AB). This probably isn't a big deal.


ABC has a several notations for ornaments. If you put notes in curly braces {} they will be treated as grace notes. When printed, they will be tiny notes just before the note that follows. You can use this to write out rather complex ornaments. {gded^c}d will give a d with all five little notes before it.

There are also some special symbols that can be put before a note. A dot produces the usual staccato: .d means a d with a dot above it. You can use ~ to indicate a turn, so ~D means a turned D. Some software has options to say how to draw such ornaments. There are also some ornaments that some programs recognize and others don't. Thus T is recognized by some to produce the usual italic tr symbol above the next note. M (for "emphasis") is recognized by some to produce a little horizontal line above or below the note. Most software recognizes H as a "hold" (fermata). And so on.

This is an area for future development.


The treble clef is the default. But you can specify the cleff in the K: header line.

K:Gm bass

means the key is G minor, and the cleff is bass. Unless you say otherwise, K:C treble is assumed. (Some software will give a warning if there is no K: line, and will then use this default.)


More header lines

C: Composer

O: Origin

R: Rhythm

B: Books

D: Discography

H: History

Q: Tempo

Z: Transcription notes

For more details, here are a couple of documents about abc notation:


Chris Walshaw's introduction to abc notation.


Chris Walshaw's detailed document for abc notation.


Description of abc2ps (version 1.2)


Chris Walshaw's description of abc2mtex.


James Allwright description of his programs that translate between ABC and MIDI.

Web warning

It turns out to be a bad idea to include abc notation inside HTML web pages. I've done it here, true, but it's really tricky. I don't recommend it. The proble is that abc uses <> and inside a .html file, most software will interpret these as HTML tags. The result is often disastrous. It's best to put your tunes in files with .abc on the end of their names, and put links to them into your HTML file.

Also, there is an official MIME type for abc. Your webmaster should tell the server that .abc files are to be sent as "Content-Type: text/". Then browser helpers and extensions will be able to recognize your abc files as music and treat them appropriately.

Visit the ~abc home page <> for more information.













Lists of Tunes

Please read the copyright notice <copyrite.txt>.

The Collections

All the tunes in one big list the Original Collection the Winder manuscript Aird's Airs Tunes made by friends Tunes from S.E. Europe (and beyond) John of the Greeny Cheshire Way Ukrainian tunes Tunes sent by Lennart Sohlmann (from central Sweden) French tunes Tunes sent in by various contributors the Fiddler of Helperby

Or, alternatively

New ! (ie, experimental) Search <> the collection for all tunes containing a particular sequence of notes. Use The Search form <search/searchform.html> to build you a list of the tunes that you are interested in. People have been complaining to me that the lists are too big for machines with small amounts of memory - so use this to list only the ones you want (this form is now part of the downloadable package misc.tgz, but you must be online to get answers from it).

I have now revised the search scheme to accept GET commands - this makes it possible to bypass the form and compose your own queries directly, generate them from scripts, and so on; see here <queries.html> for the details.

Other Details

Techy comments on the downloadable packages Getting hold of some of these tunes on paper

All the tunes in one big list

These lists are now generated on-the-fly, since it was getting to be just too much of a nuisance keeping them up to date. Thus, they are no longer available as a compressed package for download, and they can't be accessed when you're offline.

The Original Collection

Most of the original tunebook collection :- "This is a collection of traditional tunes from Ireland, England, Scotland and the Northern Isles, Scandinavia and further afield :- jigs and reels, polskas and schottisches, waltzes, bourrees, and more." - note that most of the 'further afield' stuff has now migrated to a file of its own for organisational reasons, so this is now the more 'mainstream' stuff (from my point of view, anyway) - tunes from the instrumental traditions of northwest europe.

To make this lot easier to download, I've broken it up into smaller chunks :-



The Winder Collection

These tunes come from a collection kept by the Winder family of Wyresdale, Lancashire, England. The collection spans several generations of musicians, and contains a large amount of material, much of which I haven't seen. This selection has been passed to me by Andy Hornby <addresses.html> of Lancaster. According to his notes, the tunes here were written down by John Winder (1789), HSJ Jackson (1823), and Edward + John Winder (1835 - 1841). Thanks to Bernie Stocks for his notes on alternative titles.

Aird's Airs

A Selection of Scotch, English, Irish, and Foreign Airs, adapted for the Fife, Violin or German Flute; printed and sold by I.A. Aird, Glasgow (?1780?)
Andy Hornby found this recently in the museum of the King's Own Regiment, in Lancaster. Thanks to them for their permission to put it here, and to Andy (again !) for copying it and passing it on to me.

This is a big collection - 3 volumes, of around 200 tunes each - so I have packaged the 3 volumes separately for download.
Temporary Note :- Transcription is still in progress; Volumes 1 and 3 will appear here when they're done.

Some modern tunes

A collection of recently-made 'traditional' tunes from various friends of mine, mainly from Leeds and Lancaster. A surprising number of them are in strange times, but it's not my fault. Apart from the ones I made, anyway.

Tunes from other places - south-eastern Europe and beyond.

This was the 'horos and more' section of the original tunebook, but then it grew.

John of the Greeny Cheshire Way

This is the first portion of John Offord's book of the same name, a collection of many 3-time hornpipes :- transcribed by Steve Bliven and made available to the 'net by permission of Mr Offord. The book is now, sadly, out of print. (I haven't merged this info into the search database yet, since I'm putting it up in a bit of a hurry, so none of this material can be found through the search form yet).

Ukrainian tunes

A collection of Ukrainian folk dance tunes typed up and sent by Orest Lechnowsky <>

Lennart's Tunes

A collection of Scandinavian tunes (mostly Swedish) typed up and sent by ~Lennart Sohlman <>.

A bundle of French tunes.

Thanks to Chris Walshaw for the title and composer information.

Some tunes sent in by other contributors

Not many yet ... contributions welcome, see the front page <tunebook.html> for details.

Lawrence Leadley, the Fiddler of Helperby

The life and music of a Yorkshire fiddler, by James Merryweather and Matt Seattle.
Published by Dragonfly Music ISBN 1-872277-18-7
Copyright <copyrite.txt> James Merryweather and Matt Seattle 1994

This is an excerpt of 10 tunes from the book, which the authors / publishers have given their permission to make public here on the 'net. They were typed up by Warren Armstrong, whose brainchild this project is; thanks to him, and to James & Matt, for making it possible. The "Web version" only shows the 10 tunes that are present; but the abc file includes "dummy" entries for all the others as well, containing all the header info, title, key, time signature, etc, but no "dots" - if you want to get those you have to buy them, I'm afraid. Follow this link <addresses.html> for the publisher's contact details.


These collections are now compressed separately, to make downloading slightly less tedious. Each sub-collection is small enough to fit onto a floppy disk, in case you want to pass them on to someone without a net connection

Each collection can be had in 2 forms - either as an 'abc' file (if you don't know what this is, have a look on the tunebook front page for links to information and software on this) or as a .tgz file, which is a compressed collection of html files and .gifs that will unpack to give a collection in the same form as they are seen here. You can view this offline with your W3 browser. (A .tgz file is packed using tar and gzip :- Click here <tgz.txt> for a bit of help on how to unpack these). Each .tgz bundle is a self-contained collection, equivalent to the sections below - make yourself a top-level 'tunebook' directory on your local hard disk, copy whichever of these files you download into it and unpack them there, and [I hope] they should all work together in your browser, so that you can have a longer look at them without needing to keep your internet connection running, or pass them on to friends who don't have a connection. Use the browsers' "Open file" command.

Paper Stuff

Some of the material in this collection can also be bought in paper copies. Follow these links for the details.
Andy Hornby <addresses.html> has provided many of his own tunes, and also the Winder material. Dragonfly music <addresses.html> have provided the Fiddler of Helperby excerpt.