What is this thing called ABC?

ABC is a simple text music notation language.  To play the notes A B C, you simply type ‘ABC’.  There are conventions in the notation for changing note length, key signatures, time signatures, etc.

The ABC language has been around for some time, so there are already several definitions available for the language.  By poking around the ABC project website you should be able to get to most of them.  The purpose of this description is to explain how ABC is interpreted by iabc, and why.  It is not intended to be a definitive reference standard for all ‘legal’ ABC, but I will make somewhat of an attempt to explain what is and is not allowed.

ABC Files consist of 3 basic types of information – comments, headers, and music.  Comments start with a ‘%’ character and continue until the end of the line.  Headers consist of a letter followed by a colon ‘:’ followed by header-specific information.  The music consists of the note values with their associated modifiers for duration, embellishments, accidentals, etc.

It is possible (and in fact common) to contain many tunes within a single ABC source file.  And within each tune, there can be multiple independent voices.

A Simple ABC Tune

Here’s a simple ABC tune that sounds awful but demonstrates a lot of the things you can do with iabc.

% iabc (C) Aaron Newman 2002
T:My New Tune
B,C DE|^F>G A<B|c2 d2 B3- d|c8||

And here’s the graphical rendition:

ABC Notes

ABC Music uses the letters A-G to define the notes Middle-C to the B above. The letters a-g define the notes from C above Middle C to the B above the staff, like so:

A note followed by , will lower the note one octave for each occurrence.  The ' (forward tick, or single apostrophe depending on your upbringing) will raise the note one octave, like so:



A bunch of other stuff can precede or follow the note to change how it looks or sounds. Rests are indicated with a the lower case ‘z’ instead of a note value.

As per the ABC 1.6 standard (in italics):

The symbols ^ = and _are used (before note) to generate respectively sharp, natural or flat. Double sharps and flats are available with ^^ and __ respectively.

For example:



You can tie two notes together either across or within a bar with a - symbol, e.g. abc-|cba or abc-cba. More general slurs can be put in with () symbols. Thus (DEFG) puts a slur over the four notes. Spaces within a slur are OK, e.g. (D E F G), but the open bracket should come immediately before a note (and its accents/accidentals, etc.) and the close bracket should come immediately after a note (and its octave marker or length). Thus (=b c'2) is OK but ( =b c'2 ) is not.

For example:


Grace notes can be written by enclosing  them  in  curly  braces, {}. 

Grace notes can be written by enclosing them in curly braces, {}. For example, a taorluath on the Highland pipes would be written {GdGe}. The tune `Athol Brose' (in the file Strspys.abc) has an example of complex Highland pipe gracing in all its glory. Grace notes have no time value and so expressions such as {a2} or {a>b} are not legal.

For example:


Alternatively, the tilde symbol ~ represents the general gracing of a note which, in the context of traditional music, can mean different things for different instruments, for example a roll, cran or staccato triplet

Staccato marks (a small dot above or below the note head) can be generated by a dot before the note, i.e. a staccato triplet is written as (3.a.b.c

For fiddlers, the letters u and v can be used to denote up-bow and down-bow, e.g. vAuBvA

For example:


There’s another way to identify embellishments in ABC, and that’s to precede the chord with one of the !…! (read bang-bang) formulas. This is also how you specify dynamics in iabc.  From the 1.8 standard, here are the embellishments and dynamics as specified by the bang-bang rules:





"tr" (trill mark)

$ !lowermordent!   


short /|/|/ squiggle with a vertical line through it

$ !uppermordent!   


short /|/|/ squiggle

$ !mordent!        


same as !lowermordent!

$ !pralltriller!   


same as !uppermordent!

$ !accent!         


> mark

$ !emphasis!       


same as !accent!

$ !crescendo(!


      start of a < crescendo mark


$ !crescendo)!     


end of a < crescendo mark, placed after the last note

$ !diminuendo(!    


start of a > diminuendo mark

$ !diminuendo)!    


end of a > diminuendo mark, placed after the last note

!p! !pp! !f! !ff!

!mf! !ppp! !pppp!

!fff! !ffff! !sfz!


dynamics marks



fermata or hold (arc above dot)




upside down fermata


horizontal line to indicate holding note for full duration