The Lesession pages

Abc music notation tutorial, tune collections in abc, rauschpfeifes, and more ...

Abc Notation Tutorial Tune collections Rauschpfeifes Miscellanea About
 

How to interpret abc music notation - extensions and additions

A tutorial by Steve Mansfield

Part one : The basics
Part two: The slightly more advanced bits
Part three: The even more more advanced bits
An alphabetical index

Last revised : 14th August 2016

This page details extensions to the abc music notation language, added since the main body of my tutorial was written.

Accents
Annotations
Song words
Voices
Short harmony parts

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

Some common accents and symbols can be represented in the tune body by letters. A 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

These are placed in the tune body text preceding the note affected, eg

TB2

There are also a wider range of accents, decorations and directions available; these use the exclamation mark ! to enclose the text defining the accent eg

!trill!

The symbols 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

As with the single letter symbols, the mark is placed before the note (or first note of a group) affected, eg

!trill!G4

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

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

A disclaimer of sorts: this particular feature is an area of abc that the current author has personally made very little use of. The following section is therefore only an outline; of tha available possibilities and formatting options: for full details I would refer you to the full abc specification document at abcnotation.com.

Whilst the W: (upper case W:) syntax allows a block of song words to be inserted into the abc file, The w: field (lower case w:) allows the words to be aligned with the notes, to notate how the words fit the melody in far greater detail.

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]

Back to the top

Back to page one of the abc tutorial

Back to page two of the abc tutorial


Voices

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.

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


Short harmony parts

The V: syntax is excellent for notating full independent parts. However many (for example) string and free-reed players may wish to notate a short section within a tune where a drone note or a short counter-melody is played, but without going to the extent of notating a full second part.

This is where the & syntax in the tune body is useful. Using the & symbol, a full bar of the melody is entered as usual, then the & symbol, then a second full bar of the counter-melody; the & tells the player, or the software drawing sheet music from the abc, that the two parts are two separate lines in the same bar.

A visual example will help here; as a simple example,

GAB BAG & D6 |

will produce the following sheet music:

Sheet music output of GAB BAG & D6 |

If you are notating the abc for sheet music, a useful tip to align the note heads is that the notes to the left of the & symbol will be drawn by most software packages as pointing upwards, and the notes to the right of the & will point downwards.

In some circumstances there may just be part of a bar which requires more than one note; whilst this could be achieved with rests, the x symbol is available to draw spaces (or invisible rests). The length of x can be modified in exactly the same way as any other tune body element.

GAB BAG & x3 G2x

will produce the following sheet music:

Sheet music output of GAB BAG & x3 G2x |

Always remember that the [] syntax is available for creating chords where all the notes are the same length; the & and x elements are primarily useful when the counter melody or drone is of different note lengths to the 'main' melody.

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 at home, and that's certainly the platform I do all of my abc work on. So I obviously cannot say anything useful about anything that runs on Macs, linux, FreeBSD, PalmOS, ZX Spectrum ... I also happen to like simple uncluttered graphical interfaces. Other people don't, preferring the command line or a more 'busy' interface. 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.

But if you ask, I'm currently using EasyAbc as my main abc workhorse.

3. I've got a great idea for extending abc, what should I do?

First of all, please don't make the mistake that many people have made over the years and assume that it's in any way my abc system. The abc system was invented by Chris Walshaw, taken up enthusiastically by many people over the years, and is now used all over the world for notating all sorts of music. I only recently discovered, for example, that abc has a whole life I never knew about, encoding the music for computer games.

I wrote a tutorial in the year 2000 for a friend, they liked it and passed it on, I fleshed it out and put it on my website, and ever since many people (5 or 600 a week seems to be the long-term average) use it every week to learn or look up abc syntax.

Secondly,  check that your suggestion will not break all the hundreds of thousands of tunes that already exist on the Internet in abc format. Over the years I've had a couple of people email me suggesting that it would 'make more sense' if uppercase letters were the upper octave and lowercase letters the lower octave, for example: which may theoretically be an arguable position, but stands precisely 0% chance of being adopted. 

So after doing your research if you really, really think you have something worth pursuing, don't email me about it. Join the abcusers mailing list by joining the abcusers discussion group (see https://groups.yahoo.com/neo/groups/abcusers for details) and then put your suggestion up for debate there. You will then get a comprehensive assessment of your suggestion by people who have used abc for years.

4. I think I've found a mistake in your tutorial!

That wouldn't surprise me - although I've read it many times, and tens of thousands of other people have used it, the odd glitch still terns up. Please email me with exact details and I'll have a look, and if it is a mistake, thank you very much for pointing it out.

Please note that smart-arsed, pedantic and/or deliberately vexatious emails get reproduced on my blog or on this page. The editor's decision is final!

5. I'm running a workshop / teaching programme / etc, can I use your tutorial as course materials?

Please email me first, although in nearly all circumstances the answer will be yes and makes me very happy. We can discuss exact usage when you email, and I also like to know what's happening to my work. In just some examples it has been used to give a blind person in Stockport extra tunes for their piano accordion, in a fiddle workshop in Canada, and on a music school in Australia. The tutorials are not released under any form of Creative Commons license, and also the sheer common courtesy of fair use of Internet-based materials applies to my work.

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:Try playing this from sight ...
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 & G2D2 G2D2 ||
"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