Squeezebox Studio
Guide

ABC notation explained, with examples

ABC is a way of writing music as plain text, with letters for the notes. It was made for folk and traditional tunes, and tens of thousands of them are online in it, Irish tunes above all. Once you know a dozen symbols you can read most of it.

Where ABC came from

Chris Walshaw devised ABC around the start of the 1990s, for folk and traditional tunes of Western Europe that fit on one stave. His program abc2mtex, version 1.0 in December 1993, turned it into printed music. The current standard is ABC 2.1, from December 2011; a version 2.2 exists as a draft. ABC files end in .abc.

A tune in ABC

Here's a short jig, written for this page:

X:1
T:Mixolydian jig (exercise)
R:jig
M:6/8
L:1/8
K:Dmix
|:"D"A2D FED|"C"G2E C3|"D"A2D FAd|"G"c2B "D"A3:|
|"D"d2^c dAF|"C"G2E c2E|"D"FAd "A"^c2e|"D"d3 d3|]

The lines at the top are the header. Each starts with a letter and a colon. X: must come first, T: second and K: last; the music starts on the next line.

  • X: a reference number, so one file can hold a whole book of tunes.
  • T: the title.
  • R: the rhythm: jig, reel, hornpipe, polka and so on.
  • M: the time signature, here 6/8.
  • L: the default note length. With L:1/8 every letter is a quaver unless it says otherwise.
  • K: the key, here D Mixolydian.

You'll also see C: for the composer, Q: for the tempo, Z: for who wrote the tune down and N: for notes.

Pitch and octaves

Capital letters are the octave starting at middle C, so C is middle C and G the G above it. Small letters are the octave above that. A comma after a note drops it an octave, and an apostrophe raises it one, so C, is the C below middle C and c' two octaves above it.

Note lengths and rests

A number after a note multiplies its length. With L:1/8, A is a quaver, A2 a crotchet, A3 a dotted crotchet and A/ a semiquaver. z is a rest and takes lengths the same way.

Notes written together are beamed together; a space breaks the beam but doesn't change the sound. a>b makes the first note dotted and the second short, the lilt you see in hornpipes, and (3abc is a triplet: three notes in the time of two.

Bars, repeats and endings

| is a bar line, |: and :| mark a repeat, and |] is the end. First and second endings are |1 and :|2. Here's a reel, also written for this page, that uses them, with a triplet in bar two:

X:2
T:Morning reel (exercise)
R:reel
M:4/4
L:1/8
K:D
|:FG|"D"A2FA dAFA|"G"B2GB "D"(3BAG FA|"D"~d3e fdec|1"A"dBAG FE:|2"A"dBAF "D"D2||

The FG at the start is a pickup, two quavers before the first full bar. A pickup and a short last bar together make one whole bar.

Keys, modes and accidentals

K:D means D major, two sharps, so every F and every C is sharp unless marked otherwise. A mode can follow the key note: K:Dmix is D Mixolydian, with one sharp, and K:Ador is A Dorian. K:Em is E minor. Lots of Irish tunes are in these modes.

In the music, ^ before a note is a sharp, _ a flat and = a natural. In the jig above the key gives C natural, so ^c in the second part asks for a C sharp. An accidental lasts to the end of the bar for that note. Programs don't agree on whether it also changes the same note in other octaves, so if you mean it to, write it again.

Chords, rolls and other marks

Text in double quotes before a note is usually a chord for the accompaniment: "D" means a D chord there. Quotes that start with ^ or _ are just words printed above or below the music.

  • ~ is a roll, the Irish ornament, as in ~d3 in the reel. ABC marks it; how you play it is up to you.
  • {g} before a note is a grace note.
  • - ties a note to the next one, and ( ) around notes is a slur.
  • [DFA] is a chord written out note by note.
  • % starts a comment that programs ignore.

Common mistakes

  • A blank line ends a tune, so a stray empty line in the middle cuts it short. Put one blank line between tunes.
  • A header without X: first or K: last.
  • C and c mixed up; they're an octave apart.
  • # or b written in the music instead of ^ and _.
  • Bars that don't add up to the time signature. Count them against L:.
  • A word processor turning straight quotes and apostrophes into curly ones, which breaks chords and octave marks. Use a plain text editor.

Where to find tunes in ABC

The Session has tens of thousands of Irish and other traditional tunes, often in several settings, each with its ABC to copy or download. Henrik Norbeck's collection has over 3,000, mostly Irish and Swedish. The Nottingham Music Database has over 1,000 folk tunes, mostly English dance tunes, and abcnotation.com searches collections from across the web.

Treat any ABC as one person's version of a tune. It may not match the way it's played where you are, and now and then a bar won't add up. Some tunes on these sites are recent compositions, not traditional, so check before you copy one into a book.

Free tools for ABC

From ABC to melodeon tab

To play an ABC tune on a melodeon you need to know which button gives each note and which way the bellows go. The ABC for melodeon players guide shows how the letters map onto a D/G, and how to read melodeon tab explains the tab itself.

Sources