ABC notation is a set of conventions invented by Chris Walshaw for encoding musical notation in plain ASCII text. One of its main attractions is that it's designed to be human-readable in a way that, say, MIDI isn't: pitches are indicated using English note names, bar lines are represented by pipes, and so on. ABC notation was originally designed with Western European folk music in mind, and many ABC interpreters have tools for doing things like realizing common ornaments (trills, turns, mordants, and so on), playing jigs, reels, and hornpipes with the accents in the right places, and interpreting key designations that include not only the usual major and minor keys, but also the various church modes. However, the notation is general enough to be useful not only for folk music, but also for just about any other kind of music that uses the Western chromatic scale or a subset of it. (So, for example, if you feel like coding up a Beethoven symphony or something pentatonic or some Macedonian dances in 11/8 time, ABC will do just fine, but if you crucially need quarter tones you may be out of luck.) ABC notation can be converted into nicely typeset standard Western musical notation by means of MTeX, via the ABC2MTeX package.
The MIME type for ABC notation is text/vnd.abc; it was registered with IANA in 1997.
Here's an example of a traditional klezmer tune in ABC notation, with some of the important features highlighted and explained. The
% symbol comments out the stuff on the right, so if you copy and paste the whole thing into an ABC interpreter as is, it should be able to read it. I apologize for any ill effects the
<pre> tag may have on your browser's ability to render this page gracefully, but it's the only way to get things to line up properly.
X: 1 % Tune number 1. An abc file can contain multiple tunes.
T: Siman Tov % Title of the tune.
R: freilach % Type of tune. (Some interpreters heed this in playback.)
Z: John Chambers <email@example.com> % Who coded the file.
M: C| % Time signature (metre). C| indicates cut time (2/2).
L: 1/8 % Default note length = eighth note.
Q: 1/4=244 % Tempo: 244 quarter notes per minute.
K: Dm % Key: D minor (one flat).
|:dddA dddA | dddA ddd2 | fffd fffd | % The first line of the tune. Each | is a bar line.
fffd fff2 | gggf gggf | ggga fed2 | % f2 and d2 are quarter notes (2x default length).
|1 d2g2 (g2fe) | f6 z2:|2 d2g2 (g2fe) | d6 zc % :| is a repeat sign. |1 and |2 mark first and second endings.
|:(fga2) a2aa | b2b2 a4 |1 b3a aggf | a6 zc:| % Parentheses around (fga2) indicate a slur.
[2 b3a aggf | f6 zA|: (def2) f2ff | g2g2 f4 | % z stands for a rest. f4 is a half note (4x default length).
[1 g3f feed | f6 zA:|2 g3f feed |d6 z2|] % |] is the double bar line at the end of the tune.