Frank's ABC site
: The ABC of ABC
The ABC of ABC
[
Home
|
ABC of ABC
|
ABC applications
|
Message board
|
Site map
]
Index to this page
What ABC is
What ABC isn't
What you need
The body
The header
Putting it all together
And then...
What ABC is
If you're been looking for sheet music on Internet - and especially if you're into traditional music - you'll probably run into ABC notation sooner or later. So what is it?
ABC is simply a method for notating music as plain text. There are a few such systems around, but ABC is by far the most popular today, probably mostly because of it's simplicity. Unlike other text based music formats like ETF and XML, ABC is simple enough that a musician can often read it directly.
ABC was originally invented by
Chris Walshaw
and developed further by a number of people (too many to mention them all here).
There are a number of (mostly free)
computer programs
that can read ABC and do things like converting it into standard music notation and/or midi files.
Back to top
What ABC isn't
There are four misconceptions that ought to be corrected:
1. ABC is not sheet music
As I said, there are programs that converts it into sheet music, but ABC is really a notation system of its own.
2. ABC is not music typesetting
On its own ABC produces rough and simple notation - without any concern about things like page layout etc. (There are some ABC programs that has additional features in that direction, though).
3. ABC is not the ultimate solution
One of ABC's most important features is its simplicity. But simplicity often means lack of details. So ABC is not suitable for complex music. It's perfect for writing down a basic tune, but you wouldn't want to notate a large symphony in ABC (although it is possible).
4. ABC is not standardized
Well, at least it isn't 100% standardized. There is an ABC standard that all programs follow more or less, but there are also lots of program specific extentions. Worse, many of the actual ABC tunes you find on Internet are violating the standard in various ways.
In other words: Don't expect to be able to use any ABC file you've got from the web directly. You often have to do some manual editing first.
Back to top
What you need
For basic writing and editing, you can use any word processor, text processor or other program that can output text. But be sure to save the file as plain text if you use a word processor (like MS Word, AppleWorks, Word Perfect...). Microsoft Word is not a good choice, since the program's built in error correction and auto-formatting routines tend to mess everything up, but you can use that program too if you really want to.
BarFly is a (Macintosh only) word processor specially made for working on ABC files.
You want to print the music out in standard notation as well? That might be slightly more difficult, but not too bad.
If you have a Macintosh, you can use BarFly to print sheet music directly. If you have a Windows computer, you can try the shareware notation program Muse.
But most ABC users prefer a two step approach. First you use a program like the appropriately named abc2ps to convert the ABC into a Postscript file, then you use a Postscript reader, such as the free GhostScript to print the music.
Have a look at the
ABC applications
database for more information about ABC related software.
Back to top
The body
Enough of that. Let's write some music, shall we?
Here's a piece of almost-ABC:
E D C D E E E D D E D C
This shouldn't need much explanation. You play an E, then a D etc. You can't notate music much simpler than that.
But how about rhythm? Some notes last longer than others, of course:
E D C D E E E2 D D E D C4
Again, it ought to be easy to understand. The notes with a "2" last twice as long as the other, in other words, if the basic note value (more of that later) is a fourth note, the "2 note" is a half note while the "4" denotes a whole note.
Barlines? No problem, just use the vertical line:
E D C D | E E E2 | D D E D | C4 ||
Note the duble bar line at the end.
Basically, that's the body of a tune in ABC notation.
Back to top
The header
We still have a few details to take care of. First you'd probably need to include some information about the tune in the file - the title and the key and time signatures at least. Then we need a way to tell a computer program that this particular scrap of text is actually music, not just some random characters.
To solve all this, we use a header.
A header is a number of lines (they're called "fields") that we put before the actual music. There are a lot of them, but for now we'll make do with just five.
The X: field
The first line in the header is the X: field - or "reference number". It looks like this:
X:[any number]
It was originally for indexing and is still used that way. But it also has a far more important function: It tells the computer that an ABC tune is coming up!
The T: field
Of course we need to write the title of the tune. We do that in the T: field (title field). It looks like this:
T:[the title of the tune]
Don't need a title? Sorry, you got to have the T: field. That's the second clue the computer looks for. Leave it blank if you like, but don't leave it out. An ABC program scans any text you feed it looking for a line starting with "X:" immediately followed by a line starting with "T:". Whenever it finds that, it thinks "great, here's a tune!" and starts interpreting it. So, rule no. 1 for good ABC is:
Always start an ABC tune with a X: field, immediately followed by a T: field!!!
The M: field
Next thing we need, is the time signature. It's notated in th M: ("measure") field:
M:signature, e.g. 4/4
Actually, we don't really need that field. The ABC program is supposed to assume 4/4 time if the M: field is missing, but don't count on that!
The L: field
Remember what I said about "basic note length"? Let's go back to the tune example:
E D C D | E E E2 | D D E D | C4 ||
We need a way to determine the note length of each letter. We use the L: field ("default note length") for that:
L:[The note value of a note with no number, e.g. 1/4]
Again, this is not strictly necessary, the ABC program knows what to do if the field is missing. But the system it uses then is a bit too complicated, and besides, it might not make the choice you want it to. So keep the L: field in.
The K: field
The last field we need, is for the key signature. It's called (not surprisingly) the K: field. Like the X: and T: fields, this is an important pointer for the computer. It says that the header is ended. So never ever leave that field out!
The K: field is always the last field in the header, right before the actual music begins.
Back to top
Putting it all together
OK, so we need an X: field, a T: field, a M: field, a L: field, a K: field and - of course - the body of the music.
This is what we end up with:
X:1
T:Mary had a little lamb (second half)
M:4/4
L:1/4
K:C
E D C D | E E E2 | D D E D | C4 ||
Here's what BarFly makes out of this:
Cute, isn't it?
Back to top
And then...
Of course, this was just the beginning. Although ABC is very simple, it still has more functions than this.
Quite a lot more, actually. There are a couple more header fields you can use if you like (25 of them last time I counted), there are symbols for things like accidentals, repeat signs, guitar chords, accentuations etc. to add to the body, and there are lots of other nice stuff.
Here are a few places you can go to learn more about ABC.
How to interpret abc music notation
- Steve Mansfield's ABC primer
DCU's Guide to writing abc for abc2midi
John Chamber's list of known ABC instructional documents on the Web
The Musica Viva ABCylopedia
- an encyclopedia flavoured ABC reference book.
[
Home
|
ABC of ABC
|
ABC applications
|
Message board
|
Site map
]
Web
www.abc-notation.com
Site last updated
.
This particular page was created
09/07/2004
and last updated
28/08/2004
Site updates