New Hampshire Country Dance Fiddle Tunes Website

About the abc Document


The abc Document II: The Tune Body

The tune header defines the characteristics of a tune and optionally provides documentation for the tune. The tune body then presents the actual music.

Here we continue from the previous page. Now that the tune has been defined we can look at how the music itself is presented.
There are two parts to the section on abc notation. This is part of the Detail section, intended for people interested in using abc notation. Please use the abc Notation menu above to navigate the abc pages.

The Tune Body I

Important Note: This page works best on a screen at least 768 pixels wide. You should hold an iPhone or any other small screen in landscape orientation for best results.

In the last tab we looked at the tune header, which has basic information about a tune such as title, timing, key, etc. We'll need to refer back to it, so I'm reproducing the relevant parts here.

X:1                     % the tune number 
T:On the Road to Boston % title
T:Road to Boston        % a second title
M:2/4                   % meter
L:1/8                   % default note length
R:March                 % rhythm
K:D                     % key

Next is the tune body, where the music itself is encoded. Let's look at the code for the first line of music.

 A |\
"D" f2 fe/2f/2 | "D" gf ed | "A7" cd ef | "D" dA FA |

You probably noticed that although I said it was code for the first line of music, there are two lines of code. Although the code looks confusing, the basic principles involved are pretty simple, and there aren't too many to know to get the basic idea of how it works.

  • The vertical lines are bar lines. The letters in quotation marks are the chords. The other letters and numbers are the melody notes.
  • So the first full measure contains the notes f2 fe/2f/2.
    • The default length is an eighth note. Therefore we have a quarter note followed by an eighth note, and then two notes followed by /2. That means what you might predict: an eighth note divided by two or a sixteenth note.
    • A shortcut would be to write the measure as f2 fe/f/; the division by 2 is implied.
    • Although the first note is written as f2, it's an F#; there's no need to write in the # as it's implied by the key signature.
    • Note that the piano player would play a D chord for this measure.
  • In the fourth measure there are capital letters as well as lower-case letters. They are pitched an octave lower than lower-case letters. See below for the details of how that works.
  • The backslash (\) at the end of the first line tells the abc interpreter to keep it together with what's on the next line when it converts it to notation.

The end result looks like the following:

Here's a chart of when to use upper- and lower-case letters.

In addition to viewing the sheet music, most abc software can also play back the tune. That's useful both for proofreading a tune you've written out and for learning a tune. Those of us who can't always tell what a tune sounds like from the written notation can use the playback to find out.

If you click on the tune you should hear the melody with a basic accompaniment. (Note that playback may not work on a phone or a tablet.)

The next page is The Tune Body II. We'll use the rest of the tune to illustrate additional techniques for writing out tunes with abc notation.