How to interpret abc music notation - extensions and additions

An appendix to the tutorial by Steve Mansfield
Part three : Extensions and other stuff

Last revised : 18 November 2006

Link to Printer-friendly version of this page

Please note :

This page details proposed extensions to the abc music notation language. Features described here are NOT an agreed part of the abc notation standard, but are proposed extensions to that standard that may in the future be adopted as a part of the standard. Features described here may have been implemented in some abc software packages, but the syntax or format of a feature detailed here may change before the feature is adopted as a part of the full abc specification, and the feature may not be understood by other users or supported by their particular choice of abc software.

Accents
Annotations
Song words
User definable symbols
Voices

But I've read all three pages and you've still not mentioned ...

Discussion of the abc music notation system specification, including the discussion of extensions to the language, is conducted on the abcusers mailing list, which can be accessed via the abc home page, http://www.abcnotation.org.uk.


Accents - proposed extensions

This page details proposed extensions to the abc music notation language. Features described here are NOT an agreed part of the abc notation standard, but are proposed extensions to that standard that may in the future be adopted as a part of the standard. Features described here may have been implemented in some abc software packages, but the syntax or format of a feature detailed here may change before the feature is adopted as a part of the full abc specification, and the feature may not be understood by other users or supported by their particular choice of abc software.

Some common accents and symbols could be represented in the tune body by letters: a proposed list of such letter assignments is

H Fermata
L Accent, or emphasis
M Lower mordent (sometimes called 'mordent')
O Coda
P Upper mordent (sometimes called 'Pralltriller')
S Segno
T Trill

But

  • there is the danger that these symbols may have been redefined by the creator of a particular abc file (see user definable symbols ), and also
  • there is a proposed defined syntax for entering these and may other accents.

This uses the exclamation mark ! to enclose the text defining the accent eg

!trill!

and the mark is generally placed before the note (or first note of a group) affected, eg

!trill!G4

The symbols which are defined by the draft abc specification at the time of writing (May 2000) are as follows:

!+! Pizzicato for violins, rasp for brass
!0! to !5! Fingerings
!D.C.! Da capo
!D.S.! Da segno
!accent! Accent mark over the note
!breath! Breath mark
!coda! Coda mark
!crescendo(! Start of a crescendo mark
!crescendo)! End of a crescendo mark - this is placed AFTER the last note affected
!diminuendo(! Start of a diminuendo mark
!diminuendo)! End of a diminuendo mark - this is placed AFTER the last note affected
!downbow! Down bow mark
!emphasis! The same as !accent!
!fermata! Fermata, or hold
!f!, !ff!, !fff! etc. Dynamic markings - the more f -s, the louder
!fine! Fine
!invertedfermata! Inverted fermata / hold marking
!longphrase! Vertical line on the upper part of the staff, extending 3/4 of the way down
!lowermordent! Lower mordent, a.k.a. mordent
!mediumphrase! Vertical line on the upper part of the staff, extending down to the centre line
!mf! Dynamic marking for mezzoforte ('half-loud')
!mordent! Lower mordent, a.k.a. mordent
!open! Open string, or, harmonic
!p!, !pp!, !ppp! Dynamic markings - the more p -s, the quieter
!pralltriller! Upper mordent
!repeatbar! Repeat whole of previous bar
!repeatbar2! Repeat whole of previous two bars
!roll! Roll mark
!segno! Segno
!shortphrase! Vertical line on the upper part of the staff
!snap! Snap-pizzicato mark
!tenuto! tenuto (hold note for full duration)
!thumb! Cello thumb symbol
!trill! Trill
!turn! Turn
!upbow! Up bow mark
!uppermordent! Upper mordent, a.k.a. pralltriller
!wedge! Wedge mark

Back to the top

Back to page one of the abc tutorial

Back to page two of the abc tutorial

[Back to the accents section in the main tutorial]


Annotations - proposed abc extension

This page details proposed extensions to the abc music notation language. Features described here are NOT an agreed part of the abc notation standard, but are proposed extensions to that standard that may in the future be adopted as a part of the standard. Features described here may have been implemented in some abc software packages, but the syntax or format of a feature detailed here may change before the feature is adopted as a part of the full abc specification, and the feature may not be understood by other users or supported by their particular choice of abc software.

Annotations can be added to an abc file using the same syntax as guitar chords, eg enclosing the annotation in double quotes " ". However to distinguish these textual annotations from guitar chords the annotation should be preceded by one of the following symbols

^ _ < > @

Using these symbols will instruct software which converts abc into standard Western notation where you want the annotation to appear in relation to the following symbol (note, rest, or bar line) :

^ Above the following symbol
_ Below
< To the left of the symbol
> To the right of the symbol
@ Leaves the spacing to the discretion of the software.

If several annotations are present before a single note (eg notation of special fingerings, or fingerings and another instruction) the software should draw the instructions consecutively, one annotation to each line.

Use of the ^ _ < > @ symbols in the annotation will also alert any software which attempts to play the abc back through the computer speaker or MIDI that this is an annotation, not a guitar chord, thus (hopefully) preventing the player programme going off into a quick free jazz improvisation whilst trying to reproduce something like

"^quarter-tone upwards pitch bend"

as a guitar chord ....

Back to the top

Back to page one of the abc tutorial

Back to page two of the abc tutorial


Song words - proposed extension

This page details proposed extensions to the abc music notation language. Features described here are NOT an agreed part of the abc notation standard, but are proposed extensions to that standard that may in the future be adopted as a part of the standard. Features described here may have been implemented in some abc software packages, but the syntax or format of a feature detailed here may change before the feature is adopted as a part of the full abc specification, and the feature may not be understood by other users or supported by their particular choice of abc software.

The other form of notating words uses the w: field (lower case w:). Using the w: field allows the words to be aligned with the notes, to notate how the words fit the tune.

One line of abc notation should be followed on the next line by the corresponding words, with the line started by a w:. If one line of notes is followed by several w: lines, each w: line is taken to be a separate or alternate line of words (thus allowing several verses to be notated under the same melody line).

To align the individual words with the individual notes, the following symbols can be used :

  (space) one word aligns to one note
- (dash) Break between the syllables of a word
| Move on to the next bar
_ (underscore) Hold the last syllable for an extra note
* skip one note (eg equivalent to a silent syllable)
~ treat the words either side of the tilde as pertaining to one note
\- shows a - symbol in software output
\ continuation character, eg the next w: field is part of the same line of words NOT a separate verse.

eg

  1. 'doggie' and 'window' align to two notes each :
    D3 BAF|G2 E-E3
    w:dog-gie in the win-dow
  2. 'sale' covers three notes (two underscores)
    DFE|D3
    w:sale___

[Back to the song words section in the main abc tutorial]


User definable symbols - proposed abc extension

This page details proposed extensions to the abc music notation language. Features described here are NOT an agreed part of the abc notation standard, but are proposed extensions to that standard that may in the future be adopted as a part of the standard. Features described here may have been implemented in some abc software packages, but the syntax or format of a feature detailed here may change before the feature is adopted as a part of the full abc specification, and the feature may not be understood by other users or supported by their particular choice of abc software.

To reduce using the ! ! syntax described in accents above in the tune body, or to save typing in the ! ! notation for the same symbol several times, it is propsed that it would be possible to define a letter (in the range H to Z, h to z, and ~) in the header, using the U: and u: fields.

So to assign the letter T to be a trill marking, enter

U: T = !trill!

in the header.

Software which produces standard Western notation from abc, and / or plays abc through the computer loudspeaker / soundcard, will interpret

  • the contents of the U: (upper case) field to set what is printed when the user-defined letter is encountered, and
  • the contents of the u: (lower case) field to set how that user-defined letter is played.

It is possible

  1. to define user-defined symbols in the file header (eg at the top of a file before the first tune notation), in which case the definitions apply to the whole file :
  2. to define user-defined symbols in the header of an individual tune, in which case the user-defined symbol is limited to that one tune, and supercedes any previous redefinition of that symbol.
  3. For a piece of computer software to define a range of user-defined symbols which then apply whenever that piece of software is used on an abc file, unless there is a subsequent redefinition of that symbol in an abc file or a tune header.

It is also possible to assign more than one letter to the same symbol, eg

U: S = !trill!
U: T = !trill!

in which case the same symbol will be printed when either symbol is found - however the u: fields may define different ways of playing back the S and T fields.

Whilst it is permissable to redefine them, the draft abc specification lists the standard set of definitions as :

U: ~ = !roll! Roll mark
U: H = !fermata! Fermata, or hold
U: L = !emphasis! Accent mark over the note
U: M = !lowermordent! Lower mordent, a.k.a. mordent
U: O = !coda! Coda mark
U: P = !uppermordent! Upper mordent, a.k.a. pralltriller
U: S = !segno! Segno
U: T = !trill! Trill
U: u = !upbow! Up bow mark
U: v = !downbow! Down bow mark

Back to the top

Back to page one of the abc tutorial

Back to page two of the abc tutorial


Voices

This page details proposed extensions to the abc music notation language. Features described here are NOT an agreed part of the abc notation standard, but are proposed extensions to that standard that may in the future be adopted as a part of the standard. Features described here may have been implemented in some abc software packages, but the syntax or format of a feature detailed here may change before the feature is adopted as a part of the full abc specification, and the feature may not be understood by other users or supported by their particular choice of abc software.

Whilst all of the abc this tutorial has looked at so far has been for a single melody line, the voices syntax allows for multiple independent instrumental and/or vocal parts to be notated. The V: syntax therefore opens abc up to notating areas of music far beyond its origins in single-line melodies.

As yet the V: syntax is unagreed, and software packages which have implemented the V: syntax have not done so in a completely standard form. Until the V: syntax is formalised this tutorial will only outline the bare bones of the voices syntax.

In single-line abc the K: field is followed on the next line by the notation of the melody like so :

{other headers}
M:6/8
L:1/8
K:G
B3 A3 | G6 | B3 A3 | G6 ||

In multi-voice notation the K: field is followed by the first V: field, denoting the start of the first voice e.g.

{other headers}
M:6/8
L:1/8
K:G
V:1
B3 A3 | G6 | B3 A3 | G6 ||

The text following the V: can be either a number, or one or more words of text (this is one of the areas of inconsistency at present). The V: field can also include other information, which I will address in a moment. Once the first voice has been notated, the V: field appears again to denote the start of the second voice, e.g.

{other headers}
M:6/8
L:1/8
K:G
V:1
B3 A3 | G6 | B3 A3 | G6 ||
V:2
BdB AcA | GAG D3 | BdB AcA | GAG D6 ||

and if there is a third voice, the pattern is repeated, e.g.

{other headers}
M:6/8
L:1/8
K:G
V:1
B3 A3 | G6 | B3 A3 | G6 ||
V:2
BdB AcA | GAG D3 | BdB AcA | GAG D6 ||
V:3
D3 D3 | D6 | D3 D3 | D6 ||

Note that you could also notate this using the in-line field syntax of enclosing the V: field in square brackets e.g.

{other headers}
M:6/8
L:1/8
K:G
[V:1] B3 A3 | G6 | B3 A3 | G6 ||
[V:2] BdB AcA | GAG D3 | BdB AcA | GAG D6 ||
[V:3] D3 D3 | D6 | D3 D3 | D6 ||

As I have said, the V: field can give other pieces of information about the individual voices. These are, with one vital exception, typesetting instructions to programs which convert the abc into ‘standard’ music notation, and are also implemented to a greater or lesser extent in the software packages which do as yet support the V: syntax.

The most common are :

Voice name

name, can be abbreviated to nm
This is the full name of the voice, and will be displayed at the beginning of the first stave, e.g.
name=hurdy-gurdy
or
nm=violin

Voice short name

sname, can be abbreviated to snm
This is the abbreviated voice name, to be displayed on subsequent staves, e.g.
sname=h/g
or
snm=v

Clef

clef, can be abbreviated to cl
This sets the clef of the voice. This can be set to treble (which is the assumed clef if none is specified), alto, or bass e.g.
clef=bass
or
cl=treble

If bass is set as the clef, then it is not necessary to notate the bass part using leading commas (see this section of part one of the tutorial for an explanation of this). In this case notes are notated and played / drawn two octaves below what would normally be expected abc, e.g.
D is taken as the note below the first ledger line below the bass clef
d is taken as the third line of the bass clef
c’ is taken as ‘Middle C’

{other headers}
M:6/8
L:1/8
K:G
V:1 name="Whistle" snm="wh"
B3 A3 | G6 | B3 A3 | G6 ||
V:2 name="violin" snm="v"
BdB AcA | GAG D3 | BdB AcA | GAG D6 ||
V:3 name="Bass" snm="b" clef=bass
D3 D3 | D6 | D3 D3 | D6 ||

You may also encounter other typesetting parameters in the V: field, depending on which software’s particular implementation of the V: syntax is being followed. You may also encounter the following layout, defining the voices in the header and then using markers in the melody body :

{other headers}
M:6/8
L:1/8
V:1 name="Whistle" snm="wh"
V:2 name="violin" snm="v"
V:3 name="Bass" snm="b" clef=bass
K:G
[V:1] B3 A3 | G6 | B3 A3 | G6 ||
[V:2] BdB AcA | GAG D3 | BdB AcA | GAG D6 ||
[V:3] D3 D3 | D6 | D3 D3 | D6 ||

Back to the top

Back to page one of the abc tutorial

Back to page two of the abc tutorial


But I've now read all three pages of your tutorial and you've still not mentioned ....

A FAQ of sorts about why there's nothing in this tutorial about :

1. MIDI

Whilst several programs exist which will play back abc files through MIDI , and convert abc to and from the MIDI format, this is outside the scope of this tutorial (and of the abc specification).

A listing of the software available for your chosen operating system can be found at the abc home page , and (because differing software packages go about this in different ways) you will, I'm sorry to say, then need to read the documentation of your chosen software to write abc files which will take advantage of the MIDI capabilities of that software.

2. (Insert name here) Specific software package

See this bit of the second part of the tutorial as to why. All I'd add to what I wrote there is that I'm predominantly a Windows user, I've got Linux available, and I use Unix a lot at work (but not for abc stuff!). So I obviously cannot say anything useful about anything that runs on Macs, BeOS, FreeBSD, PalmOS ... I also happen to like graphical interfaces. Other people don't. That doesn't mean that I'm right and they're wrong (or even that they're right and I'm wrong), it just means that we're different.

3. abc+ or abc 2.0

There are at least three projects currently underway to extend, revise, or overhaul the abc specification.

I've not mentioned any of them in this tutorial because none of these projects are anywhere near to releasing an agreed proposal for a new specification for abc. I'm monitoring progress on all the development strands I'm aware of, and will extend this tutorial to include any definitive decisions once any definitive decisions are actually made ....

Back to the top

Back to page one of the abc tutorial

Back to page two of the abc tutorial


Ah one, ah two, ah one two three four ...

A (possibly slightly tongue-in-cheek) example of abc notation in all its multi-faceted glory. Compare and contrast with the 'simple' version at the end of part one of this tutorial. Note that the P: field in the header is not strictly legal, and the guitar chords might not be recommended by those who like their harmonies straightforward ...

X:1
T:Spleed the Pough
T:Speed The Plough (Interesting notation remix version)
M:4/4
L:1/8
N:God help anyone who
N:tries to play this from sight ...
N:Last time through inspired by the Bollywood Brass Band
N:(Who then emailed and said "What on earth are we doing in your tutorial??"
N:If they are ever in your neck of the woods GO SEE THEM -
N:Bhangramuffin street-band music :-)
H:Illustrative file for abc tutorial
F:http://www.lesession.co.uk/abc/abc_extensions.htm
U: R:=!roll!
R:Polka
P:(2A2B) ad infinitum then 'Last time' to finish
Z:Steve Mansfield 6/6/2000
K:G
P:A
"G" (GAB)c dedB | "G" dedB dedB |
"Am" c2ec "D7" B2 dB | "D" A2 "Dm" A2 "Am" A2 BA |
"G"(GABc d)edB | "G" dedB dedB |
"C"{d}c2ec "G" {c}B2dB- | "D7" BA A2 "G" RG4 ::
P:B
"C" "@Brass section stand up and do that Glenn
Miller thing at this point" g2 g2 {GABcdef} g4 ||
"G" g2fe dBGB | "Am" (3cde (3cde "Bm"(3Bcd dB | "F#m" A2 A2 "D" A4 |
w:shoo doo~be doo*** **** *** *** ***
"C" g2 g2 "G" g4 | "G" g2 fe dBGB | "C" (5cdedc "Am" ec "Bm" B2 "G" dB |
"A"[A2c2]"Am"[A2a2] "G" ~[G4B4d4g4] :|
w:shoo doo~be doo*** **** *** *** **wah
"@Last time" !crescendo(! "A" [A2^c2e2a2] "Am" [E2A2c2] "G"
!fermata! [G4B4d4g4b4] !crescendo)! ||
w:hey! hey! hey!

This tutorial copyright Steve Mansfield 2000 - present.

Back to the top

Back to page one of the abc tutorial

Back to page two of the main abc tutorial

Back to the main Lesession site index