

In 1993, Chris Walshaw introduced a simple plain-text music notation, together with the abc2mtex program that translated it to the input format that the MusicTeX and TeX programs use. The result was some very nice "sheet music". Soon after, Michael Methfessel started writing a standalone program, abc2ps, which converts ABC to PostScript without requiring a complex package like TeX. Then James Allwright followed with abcMIDI, which converted back and forth between ABC and MIDI notation. Other programs soon appeared for Macintosh and DOS/Windows users.
Chris and most of the early users were folk musicians, and ABC has so far been used mostly to transcribe folk melodies. Slowly features have been added to support new sorts of musical notation. But all along the primary benefits of ABC have been maintained: It is a notation that is easy to type on an ordinary keyboard. The files are small, and can be sent via email or downloaded from web sites very quickly. If properly formatted, ABC notation can be very readable. And it's easy to write code in most common programming languages to parse ABC and do things with it.
There is now a rather large and growing population of software that understands ABC. Some of the commercial music packages now accept ABC as input and will produce it as output. This is not without a lot of grumbling over ABC's missing features. But it's the same phenomenon as the debate about fancy word processors versus plain text. ABC has the typical advantages of plain text: It's easy to read and type on any computer. It can be sent anywhere via email. It is very compact, making for small files and fast downloads. But it lacks most of the fancy features of the more advanced notation systems.
Another dichotomy that is useful in appreciating ABC's role is the difference between "markup" and "formatting" notation. ABC is primarily a "markup" system. It identifies the parts of the music, and provides a way of giving information about the music. But it intentionally includes little information about formatting or other interpretation. This is left for other add-on notation to handle. This has helped in the spread of ABC, because with most other kinds of music software, it can be very difficult to write your own program to extract information like title, author, rhythm, and so on. But with ABC, it's easy, and a number of ABC indexing schemes have appeared.
For a current list of software and other ABC pointers, see Chris' abc home page.
For a simple example of what ABC looks like, here is Chris' transcription of a well-known Irigh jig:
X:1 T:Paddy O'Rafferty C:Trad. M:6/8 L:1/8 K:D dff cee|def gfe|dff cee|dfe dBA|dff cee|def gfe|faf gfe|1 dfe dBA:|2 dfe dcB|| ~A3 B3|gfe fdB|AFA B2c|dfe dcB|~A3 ~B3|efe efg|faf gfe|1 dfe dcB:|2 dfe dBA|| fAA eAA|def gfe|fAA eAA|dfe dBA|fAA eAA|def gfe|faf gfe|dfe dBA:|Here is what it looks like after processing by abc2mtex and conversion to GIF:


So now let's go on to how ABC notation works.
ABC is written in chunks; each chunk is called a "tune". In its simplest form, a tune consists of two parts:
X:1 T:Paddy O'Rafferty C:Trad. M:6/8 L:1/8 K:D
Let's look at these one at a time.
| ABC | key | signature |
|---|---|---|
| K:D | D major | 2 sharps |
| K:Dm | D minor | 1 flat |
| K:Dmin | D minor | 1 flat |
| K:Dminor | D minor | 1 flat |
| K:DDor | D Dorian | No sharps or flats |
| K:DDorian | D Dorian | No sharps or flats |
| K:DMix | D Mixolydian | 1 sharp |
| K:DPhr | D Phrygian | 2 flats |
The important part of the music is the notes, right? OK, here's a scale exercise in ABC:
X:2 T: K:C || G,A,B,C DEFG | ABcd efga | bc'd'e' f'g'g'a' || w: G, A, B, C D E F G A B c d e f g a b c' d' e' f' g' a'Here's how that comes out in standard music notation:

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, so 1-1/2 would be written as 3/2.
For example, A2 is an A played twice as long as just A. For example, 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.
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 |]

Some things to notice about ABC's note-length notation:
There are several ways of indicating repeats in standard music notation, and ABC has counterparts to the most common.
The most common way of indicating repeats is with colon-like symbols next to bar lines. ABC simply uses the colon (:) character for this in the obvious way:
|: CDE FGA | Bcd efg :|
This is a two-bar repeated phrase. Sometimes you see multiple colons:
|:: CDE FGA | Bcd efg ::|
This is not part of the official ABC notation standard yet,
though some programs might understand it.
There is also an abbreviation: :: means the same as :|:, a bar line with repeat indicators on both sides. How it is drawn may be different for different programs.
Repeated phrases frequently have different endings on the repeats. There is a standard way of handling this in ABC:
|: CDE FGA |1 Bcd efg :|2 Bcd eBc :|
The use of a number like this immediately after a bar line indicates
an alternative ending in the obvious manner. However, this notation
currently has a serious limitation. Many ABC programs only recognize
|1 and |2, but won't accept any other numbers. This
is a topic that has led to some discussion, and it may be fixed eventually.
The final decision isn't in, but we can expect something like:
|: CDE FGA |1,3 Bcd efg :|2 Bcd eBc :|4 Bcd c3 :|
Another scheme used by some musicians (especially dance musicians) is to label all the parts of the tune, and then give a repeat pattern at the top of the tune, usually at the upper left. ABC can do this, a most ABC software understands it. For example:
X: 1 T: Country Garden(s) P: A(A2B2C2B2)2 M: C| L: 1/8 K: C P: A [| g2 g>f e2 e2 | d2 d>c B2 B>c | d2 G2 A2 c2 | B3A G4 |] P: B [| g>a g>e f2 d2 | g>a g>e f4 | g2 g>f e2 a2 | f3e d2 B>c | | d2 g>f e2 e2 | d>e d>c B2 B>c | d2 G2 A2 c2 | B3A G4 |] P: C [| G2 c2 c2 e2 | d>e d>c B2 B>c | d2 G2 A2 c2 | B3A G4 |]Here's how this comes out as a PNG file:

Note that the P: lines are being used in two different ways here. Within the header portion of a tune, P: gives the order of the parts. Within the music portion of a tune, P: is used to label each part.
There is an alternative way of labeling the parts that some software (such as abc2ps) now accepts. You can put the label in double quotes before a bar line. This lets you put the label anywhere, not just at the start of a line. Written this way, the above tune would be:
X: 4 T: Country Garden(s) Z: 1997 by John Chambers <jc@trillian.mit.edu> http://trillian.mit.edu/~jc/music/abc/ P: A(A2B2C2B2)2 M: C| L: 1/8 K: C "A" | g2 g>f e2 e2 | d2 d>c B2 B>c | d2 G2 A2 c2 | B3A G4 |] "B"[| g>a g>e f2 d2 | g>a g>e f4 | g2 g>f e2 a2 | f3e d2 B>c | | d2 g>f e2 e2 | d>e d>c B2 B>c | d2 G2 A2 c2 | B3A G4 |] "C"[| G2 c2 c2 e2 | d>e d>c B2 B>c | d2 G2 A2 c2 | B3A G4 |]Here's what this looks like as a PNG file:

There are two fundamentally different way of dealing with chords:
Chords to accompany the melody, i.e., accompaniment chords (termed 'guitar chords' in the previous abc standard) can be included. Depending on the package, accompaniment chords will be displayed either above or below the melody line. Some playback packages can play accompaniment chords.
An accompaniment chord is enclosed in double-quotation marks. It is placed to the left of the note it is sounded with, without an intervening space, e.g., "Am7"A2D2.
The chord has the format <note><accidental><type>/<bass>, where <note> can be A-G, <accidental> can be b, #, or nothing, <type> is the type of chord, and /<bass> is an optional bass note.
Valid chord types are:
| m or min | minor |
| maj | major |
| dim | diminished |
| aug or + | augmented |
| sus | sustained |
| 7, 9 ... | 7th, 9th, etc. |
The chord type can be combined, e.g., Cdim7. And, obviously, maj can be (and usually is) omitted.
A slash after the chord type is used only if the optional bass note is also used, e.g., "C/E". If the bass note is a regular part of the chord, it indicates the inversion, i.e., which note of the chord is lowest in pitch. If the bass note is not a regular part of the chord, it indicates an additional note that should be sounded with the chord, below it in pitch. The bass note can be any letter (A-G or a-g), with or without a trailing accidental sign (b or #). The case of the letter used for the bass note does not affect the pitch.
Alternate chords can be indicated for printing purposes by enclosing them in parentheses inside the double-quotation marks after the regular chord, e.g., "G(Em)". But note that most ABC playback software will simply ignore such alternate chords. Music printing programs will just show the text as-is, of course. Whether transposing will effect alternate chords isn't predictable yet, and probably depends on just which program you are using.
Examples? How about our Country Garden friend, this time with chords:
X: 3 T: Country Garden(s) Z: 1997 by John Chambers <jc@trillian.mit.edu> http://trillian.mit.edu/~jc/music/abc/ P: A(A2B2C2B2)2 M: C| L: 1/8 K: C P: A | "G7"g2 g>f "C"e2 e2 | "D7"d2 d>c "G"B2 B>c | "G"d2 G2 "C"A2 c2 | "D7"B3A "G"G4 |] P: B [| "A7"g>a g>e "D"f2 d2 | "A7"g>a g>e "D"f4 | "A7"g2g>f e2a2 | f3e "D7"d2B>c | | "G7"d2 g>f "C"e2 e2 | "D7"d>e d>c "G"B2 B>c | "G"d2 G2 "C"A2 c2 | "D7"B3A "G"G4 |] P: C [| "C"G2c2 c2e2 | "D7"d>e d>c "G"B2 B>c | "G"d2 G2 "C"A2 c2 | "D7"B3A "G"G4 |]And here's what this looks like as a PNG file:

ABC's notation for multiple notes played simultaneously looks like:
Here's an example of the use of chords to write out a simple harmony. Note that the lower note is consistently written as the first of each "chord", so that monophonic players will treat it as the melody. (Of course, anyone familiar with Balkan music will realize that either line can be considered the "melody" and the other the "harmony".)
X: 1 T: Sva Nok le, Nado O: Makedonija R: slow pravo M: 4/4 L: 1/8 K: F [| "C"[c3e3] [df] [ce][Bd] [Bd][Ac] | "F"[Ac][G2B2] [Ac] [GB][FA] [FA][FC] \ | [FA][GB] [GB][Ac] "C7"[GB][Ac] [GB][FA] | "F"[FA][GB] [FA][CG] [FA][GB] [Ac][Bd] | | "C"[dB][ce] [ce][df] [ce][Bd] [Bd][Ac] | "C7"[Ac][B2G2] [Ac] "F"[GB][FA] [F2A2] \ | [FA][GB] [GB][Ac] "C7"[GB][Ac] [GB][FA] | "F"[F8A8] |] [| "F"([F3A3] [GC]) [F2A2] ([FA][GB]) | ([A3c3] [GB]) ([GB][FA][F2A2]) \ | ([FA][GB]) [A2c2] "C7"([GB][Ac]) ([GB][FA]) | "F"([F3A3] [CG] [FA][GB] [A2c2]) | | "F"[F2A2] ([FA][CG]) [F2A2] ([FA][GB]) | ([A3c3] [GB]) ([GB][FA] [F2A2]) \ | ([FA][GB]) [A2c2] "C7"([GB][Ac]) ([GB][FA]) | "F"[F8A8] |] [| "C"[c4e4] ([ce][Bd]) ([Bd][Ac]) | "F"([A3c3] [GB]) ([GB][FA] [F2A2]) \ | ([FA][GB]) [A2c2] "C7"([GB][Ac]) ([GB][FA]) | "F"([F3A3] [CG] [FA][GB] [A2c2]) | | "C"[c4e4] ([ce][Bd]) ([Bd][Ac]) | "C7"([Ac][B2G2]) [Ac] "F"([GB][FA]) [F2A2] \ | ([FA][GB]) [A2c2] "C7"([GB][Ac]) ([GB][FA]) | "F"[F8A8] |]

ABC has a simple notation for grace notes:
X:12
T:Gracenotes
L:1/8
M:C
K:D
| {E}FA{c}AF DF{^dc}A f{A}df f{AGA}df \
| {B}D2 {A}D2 {G}D2 {F}D2 {E}D2 \
| {E}c2 {F}c2 {G}c2 {A}c2 {B}c2 |
| {A}^c2 {gcd}c2 {gAGAG}A2{g}c<{GdG}e {Gdc}d>c {gBd}B<{e}G \
| {G}[G4e4] {FGAB}[^c4A4] {ef}[e4c4] {d'c'bagfedcB_AcBFGC}D4 |]

A lot of music has words, otherwise known as lyrics, and there are two ways of showing them. You can put them below the music staff, aligned with the notes. Or you can show all the words below the music, in poetry format. The original ABC only did the latter; now it does both.
Putting words below the music is easy: Put W: at the start of each line. Such lines are collected by the music formatting programs, and produced after the last music staff is finished.
Putting words below the notes is more complicated, and is handled by lines that start with w: (note the lower-case w). W: lines can occur anywhere, though they are conventionally in the header. You must put w: lines immediately below their staff of music, of course.
Before explaining more, here is an example of a well-known Greek folk song,
with the words included in both forms:

X: 1 T: Misirlou C: N.Roubanis 1934 O: Greece W: 1. Misirlou mou i glikia sou matia W: Floga m'ehi inapsi mes tin kardia W: Ah! Yahabibi Ah! Yaleleli Ah! W: Apto diko sou to sto mataki ime W: Chorus: W: A Misirlou W: Trella tha m'erthi den ipofero pia W: Ah! tha si klepso mes ap tin Arapia. W: Ah Misirlou. W: W: 2. Mavro mata Misirlou mou trelli W: Ti zoi m'allazo mena fili W: Ah! yahabibi M'ena filaki Ah! W: ta dio sou hili stazoune meli ime M: 4/4 L: 1/8 K: Gm |: "D"D3 E ^F2 G2 | A3B ^c2BA | A8- | A8 | w: 1.~Mi-sir-lou mou i gli-kia sou ma-tia w: 2.~Mav-ro ma-ta Mi-sir-lou mou tre-lli | D3E ^F2G2 | A3B ^c2BA | A8- | A8 | w: Flo-ga m'e-hi~i-na-psi mes tin kar-dia w: Ti zo-i m'al-la-zo me-na fi-li | "Gm"BA2B A2G2 | AG2A G2^F2 | "D"^F8- | ^F8 | w: Ah! Ya-ha-bi-bi Ah! Ya-le-le-li Ah! w: Ah! ya-ha-bi-bi M'e-na fi-la-ki Ah! | "Cm"AG2A G2^F2 | ^FE2F E2DD | "D"D8- | D8 :| w: ta dio sou hi-li sta-zou-ne me-li i-me w: Ap-to di-ko sou to sto ma-ta-ki i-me |: "Gm"G8- | G6 ^FG | "F"A8- | A6 GA | "Bm"B6 AB | "A"^c6 Bc | "D"d8- | d8 | w: A___________ Mi-sir-lou | "Cm"e d2 e d2 c2 | d c2 d c2 B2 | "D"A8- | A8 | w: Tre-lla tha m'er-thi den i-po-fe-ro pia | "Cm"c B2 c B2 A2 | A G2 A ^F2 E2 | "D"D8- | D8 :| w: Ah! tha si kle-pso mes ap tin A-ra-pia. P: Coda || "Gm"B6 AB | "A"^c6 Bc | "D"d8- | d8- | d8- | d z7 |] w: Ah___ Mi-sir-lou.The W: lines are self-explanatory, but there are a number of special symbols inside the w: lines that deal with the alignment with the notes. The basic rule is that each "word" is aligned with one note, where a "word" is whatever comes between chunks of white space. But the following can be used to modify this:
You might think that the W: and w: would be used only by the music formatting programs such as abc2mtex and abc2ps, but you'd be wrong. Some of the music-playing programs now have a "karaoke" option that displays or highlights the words as the music plays. Perhaps some day a program will include voice synthesis, so you can select a "Frank Sinatra" or "Ella Fitzgerald" or "Bob Dylan" voice, and hear how that singer would have done the song.
ABC is somewhat biased towards a "voice", that is, a sequence of notes for an instrument that produces one note at a time. There is work underway to design a multi-voice facility for ABC, so that choral, orchestra and band scores can be represented easily. This is currently under active development, and is rather preliminary. Different ABC software currently implements different portions of this.
The most general syntax so far defines a voice with a header line of the form:
V: label par1=value1 par2=value2 ...Such lines should appear within the header of the tune. Within the music portion, you would use only:
V:labelYou may also use
[V:label] music ...This is convenient because it lets you put the music on the same line.
Currently, there is disagreement on what the label may be. Some programs only allow numbers (and may insist that they be consecutive). Other programs allow any single word, such as V:Soprano or V:Cello. Most of the examples so far use only numbers.
There are a number of parameters that may be used in the definition of a voice. Here are some of the parameters defined so far:
param short example description name nm nm="Violin I" This sets the long version of the voice name, to be written before the staves at the start of a piece. If the string contains \\, this is interpreted as a line break and the pieces are writen above each other. sname snm snm="Vl. I" Short version of the name, written before subsequent staves. clef cl clef=bass Chooses the clef (treble, alto, or bass). It can also be bass+8 and so on. staves stv stv=2 This is the number of staves (starting from the current one) to connect by tall vertical bar lines. brace brc brace=2 This is the number of staves (starting from the current one) to be grouped together with a brace. When this option is used, the name defined in the same V: line is written at the center of the brace. bracket brk brk=4 The number of staves to be grouped together by a bracket. This option does not change the way in which the names are written. space spc spc=40 This defines or modifies the vertical space between this staff and the one below it. The space can be given in pt (default) or with a unit in the form 1cm or 0.4in. Furthermore: if a + or - sign comes after the start of the number, the value is an increment to be added to or subtracted from the default setting. gchords gch gch=0 This controls whether any guitar chords embedded in the current voice are actually written. True/false are specified as for the %% formats. stems stm stems=up This says that stems for this voice's notes should all go in the same direction, which may be "up" or "down". The default is to let the program draw stems as it wishes, including the possibility that notes will be joined on a single stem.
ABC uses the percent (%) character to mean "Ignore the rest of this line." You can use this to add any text you want to an ABC tune, and it will be ignored by ABC software.
One simple use of this is to put a line with just a % into a tune as a separator. You may have noticed that, since an ABC tune ends with the first blank line, you can't have a blank line inside a tune. But sometimes you want one to make things more readable. A line with just a % will do the job.
Another way in which % is used is as a sort of "escape" to pass non-ABC information to particular ABC programs. There are several ABC tools that use this, mostly in the form of lines that start with %%.
One of the nice things about ABC notation is that it is fairly readable. Many people are already claiming that they can read ABC nearly as easily as standard music notation. However, as with anything, there is good and bad ABC notation. Here are some suggestions for making your ABC easy to read.
The main suggestion is to use spaces. Consider these lines of music:
|"C"EDC|GF"C7"E|"F"ccA/B/|c3|"C"GEC|CB,C|"D7"EDD|"G7"D2G| |"C"GGE/F/|GG"C7"c|"F"ccA/B/|c2A|"C"GEC|"G7"DED|"C"C3-|C3||Not very nice to read, is it? Now compare it with:
| "C"EDC | GF "C7"E | "F"ccA/B/ | c3 | "C"GEC | CB,C | "D7"EDD | "G7"D2G | | "C"GGE/F/ | GG "C7"c | "F"ccA/B/ | c2A | "C"GEC | "G7"DED | "C"C3- | C3 ||You probably find this much easier to read. There are two ways that the spacing makes the second easier to read:
Here's a table of the current ABC header information lines:
| Field name | header | tune | elsewhere | Used by | Examples and notes | |
|---|---|---|---|---|---|---|
| A: | area | optional | A:Donegal, A:Bampton | |||
| B: | book | optional | yes | archive | B:O'Neills | |
| C: | composer | optional | C:Trad. | |||
| D: | discography | optional | archive | D:Chieftans IV | ||
| E: | elemskip | optional | yes | see Line Breaking | ||
| F: | file name | yes | see index.tex | |||
| G: | group | optional | yes | archive | G:flute | |
| H: | history | optional | yes | archive | H:This tune said to ... | |
| I: | information | optional | yes | playabc | ||
| K: | key | last | yes | K:G, K:Dm, K:AMix | ||
| L: | note length | optional | yes | L:1/4, L:1/8 | ||
| M: | meter | optional | yes | yes | M:3/4, M:4/4 | |
| N: | notes | optional | N:see also O'Neills - 234 | |||
| O: | origin | optional | yes | index | O:I, O:Irish, O:English | |
| P: | parts | optional | yes | P:ABAC, P:A, P:B | ||
| Q: | tempo | optional | yes | Q:200, Q:1/4=120, Q:C2=200 | ||
| R: | rhythm | optional | yes | index | R:R, R:reel | |
| V: | voice | optional | yes | V: 2=2nd violin, V:3 | ||
| S: | source | optional | S:collected in Brittany | |||
| T: | title | second | yes | T:Paddy O'Rafferty | ||
| W: | words | yes | yes | Words placed below the last staff | ||
| w: | words | no | yes | Words placed below the notes | ||
| X: | index number | first | X:1, X:2 | |||
| Z: | transcription | optional | Z:Joe Smith <js@fu.bar.com> from handwritten copy |
Some of these make sense only in the header portion of a tune, while others may be used inside the music portion to change the information.
Some programs (such as abc2ps) now accept notation such as: [K:...] to change information inside a line of music. But this notation might be ignored by some ABC software.
Now for detailed descriptions:
| K:D | D major | 2 sharps |
| K:Dmaj | D major | 2 sharps |
| K:Dmajor | D major | 2 sharps |
| K:Dm | D minor | 1 flat |
| K:Dmin | D minor | 1 flat |
| K:Dminor | D minor | 1 flat |
| K:C | C major | No sharps or flats |
| K:Am | A minor | No sharps or flats |
| K:DDor | D Dorian | No sharps or flats |
| K:DDorian | D Dorian | No sharps or flats |
| K:ELyd | E Lydian | No sharps or flats |
| K:DMix | D Mixolydian | 1 sharp |
| K:DPhr | D Phrygian | 2 flats |
| K:DLyd | D Lydian | 3 sharps |
| K:Gm^f | D hijaz | 2 flats and 1 sharp |
| K:_B_e^f | D hijaz | 2 flats and 1 sharp |
| K:GDor^c | D misheberach | Bb plus C# |
| K:Bb^c | D misheberach | Bb plus C# |
In addition, there are two keys specifically for notating highland bagpipe tunes: K:HP doesn't put a key signature on the music, as is common with many tune books of this music, while K:Hp marks the stave with F sharp, C sharp and G natural. Both force all the beams and staffs to go downwards. These correspond to the two conventional ways of notating bagpipe music.
| M:C | Common time, the same as M:4/4. |
| M:C| | Cut time, the same as M:2/2. |
| M:none | Free meter, no time signature and no checking. |
| Q:1/4=112 | Note and count (preferred) |
| Q:140 | Count only, L: used for note length |
| Q:C2=80 | C is the basic note length from the L: line |
| Q:Andante | Words are only printed, not used |
The value on an X: line should be a (non-negative) integer. Some people have suggested using arbitrary strings as indentifiers, but this will confuse a some software. X:0 seems to work with all ABC software, and it is sometimes used for introductory musical information in a file with multiple tunes - often with no actual music, just headers.
Every tune in a file should have a different X: number, because if two have the same number, you may not be able to use the second. It's probably a good idea to make sure that the numbers are in increasing order. They don't need to be consecutive.
Sites with large ABC music collections