ABC Music Notation: Clefs

by John Chambers
(Back to main text)


Clefs were not part of the original ABC notation, but they have been added by a few programs, and a semi-standard syntax has been worked out.

The most general syntax so far lets you specify a clef in the K: and V: lines. A clef the form:

clef=cleftype par1=value1 par2=value2 ...
The clef type may be any of the following: You may also use append +8 or -8 to any of them except tenor. The tenor clef is a synonym for treble-8.

A curious part of clefs in ABC is that users have not agreed on how ABC notes should be mapped to the staff for clefs other than treble. There are three mappings that have been suggested:

  1. "On the staff", which maps the letters CDEFGAB and cdefgab onto the lines of the staff, regardless of which clef is in use. This has the advantage that it is easy to type and intuitive for users no matter what their instrumental or vocal range.
  2. "Same pitch", which treats the letters CDEFGAB and cdefgab as always being in the treble range, with the same musical pitch, regardless of which clef is in use. Notes on the bass clef are then G,, through A,. This is difficult to type, but has the advantage that ABC player programs can simply ignore the clef.
  3. "Grand staff", which maps CDEFGAB to the top of the bass staff and cdefgab to the bottom of the treble staff. This is the most intuitive for the two-staff system used by keyboard players.

Since all of these are reasonable for some music, a loose consensus has arisen that extra parameters to a clef declaration should be used to say which is in effect. Two schemes have been suggested:

This gives the ABC note that corresponds to the middle line of the staff. For the usual treble clef, you could write "clef=treble middle=B". If you like "on the staff" notation, you would write bass lines as "clef=bass middle=d"; if you prefer "same pitch" notation, you would write "clef=bass middle=D,".
This is a more compact notation that let you just write commas or apostrophes after the name of the clef. You append the appropriate number of commas or apostrophes to get the octave shift you want. The "same pitch" notation for bass clef would be "clef=bass,,", since the notes sound two octaves lower than their treble pitches.

Here is a demo of three ways of writing a bass line:

X: 1
T: Three bass lines
K: C
V: 1 clef=bass
[| CDEF GABc | cdef gabc' | c'bag fedc | cBAG FEDC |]
w: C D E F G A B c c d e f g a b c' c' b a g f e d c c B A G F E D C
V: 2 clef=bass middle=D
[| C,D,E,F, G,A,B,C | CDEF GABc | cBAG FEDC | CB,A,G, F,E,D,C, |]
w: C, D, E, F, G, A, B, C C D E F G A B c c B A G F E D C C B, A, G, F, E, D, C,
V: 3 clef=bass,,
[| C,,D,,E,,F,, G,,A,,B,,C, | C,D,E,F, G,A,B,C | CB,A,G, F,E,D,C, | C,B,,A,,G,, F,,E,,D,,C,, |]
w: C,, D,, E,, F,, G,, A,, B,, C, C, D, E, F, G, A, B, C C B, A, G, F, E, D, C, C, B,, A,, G,, F,, E,, D,, C,,
Here's how that comes out in standard music notation:
Three different bass lines

This was produced by the jcabc2ps program, which implements all of the notation described here. If you know of other programs that do so, let me know.

(Back to main text)

Copyright 2001, 2002 by John Chambers