This is an old revision of the document!
Table of Contents
The abc music standard 2.1 (Dec 2011)
The original source of this standard can be found at https://abcnotation.com/wiki/abc:standard:v2.1.
Chris Walshaw
abcnotation.com/contact
chriswalshaw.co.uk
1. Introduction
Abc is a text-based music notation system designed to be comprehensible by both people and computers. Music notated in abc is written using characters - letter, digits and punctuation marks - on paper or in computer files.
This description of abc has been created for those who wish to understand the notation, and for implementers of abc software applications. Some example tunes are included in sample abc tunes.
1.1 How to read this document
Start at the beginning and work through to the end. Alternatively, for selected highlights, take a look at how to avoid reading this document.
1.1.1 Terminology / definitions
Note that the following terms have specific meanings in the context of the abc standard. For convenience, each time one of these terms is used in the standard it is linked to the section in which it is defined:
Please see also http://www.ietf.org/rfc/rfc2119.txt for formal definitions of the key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL.
Finally, the word VOLATILE is used to indicate sections which are under active discussion and/or likely to change in some future version of the standard.
1.2 How to avoid reading this document
The abc standard contains a lot of information, much of which will not be immediately useful to the beginner. Apart from reading this section, 1. Introduction, newcomers are recommended to familiarise themselves with all of 2.2 Abc file structure, 3.0 Information fields, a few subsections in 3.1 Description of information fields (in particular 3.1.1, 3.1.2, 3.1.6, 3.1.7 and 3.1.14), 3.2 Use of fields within the tune body, and as much of section 4. The tune body as is desired (but in particular 4.1, 4.3, 4.7, 4.8).
Newcomers are also advised to take a look at section 13. Sample abc tunes and one of the abc tutorials that is available.
After that, it may depend on what you want to use abc for, but further reading suggestions would be:
- 5. Lyrics for transcribing songs
- 6.1 Typesetting for printing abc transcriptions in staff notation
- 7. Multiple voices for working with multi-voice music
1.3 Abc tutorials
This document is also best read in conjunction with an introduction to abc notation. Several are available - see, for example:
- abcnotation.com/learn - a number of tutorials are linked from here
1.4 Abc extensions
Since the abc notation system was originally written, a large number of abc software packages (programs which: produce printed sheet music; play or create audio files, usually MIDI; search or organise tune databases; or that analyse or manipulate tunes in some way) have been developed. However, not all of them follow this standard absolutely. This document aims at solving, or at least reducing, the problem of incompatibility between applications.
Nevertheless, when using abc it is good to be aware of the existence of such extensions. Extensions implemented by some major abc packages are described at the following links:
- http://moinejf.free.fr/abcm2ps-features.txt - extensions implemented by abcm2ps
- http://abc.sourceforge.net/standard/abc2midi.txt - extensions implemented by abc2midi
- http://www.barfly.dial.pipex.com/bfextensions.html - extensions implemented by BarFly
- http://www.lautengesellschaft.de/cdmm/userguide/userguide.html - extensions implemented by abctab2ps
1.5 Further information and changes
Questions about this standard, or abc in general, can be addressed to the abcusers e-mail list, or the abcnotation forums:
- http://groups.yahoo.com/group/abcusers/ (abcusers - subscriptions and archive of posts)
- http://www.mail-archive.com/abcusers@argyll.wisemagic.com/ (abcusers - archive of old posts)
To propose changes to the standard, please read
- abcnotation.com/wiki/abc:standard:route-map - a route map of proposed changes to the standard plus instructions for proposing changes
1.6 Document locations
This document can be found at:
The latest version of the standard, plus links to older versions and other developmental work, can always be found via:
2. Abc files, tunes and fragments
Tunes written in abc are normally stored in abc files, either on a computer's hard-drive or linked from a web-page. However, an increasing number are found on web-pages or in databases.
This section describes the basic structure of abc files and abc tunes, as well as a definition for including fragments of abc tunes elsewhere (e.g. web-pages).
2.1 Abc file identification
All abc files should have the extension ".abc" (all lower-case) on all platforms.
Comment: Some web-servers only allow a limited selection of file types; in this case a ".txt" extension is the best alternative.
Every abc file should begin with the string %abc. An optional version number may follow on the same line, e.g.
%abc-2.1
Version numbers of 2.1 or higher indicate that the abc file is to be interpreted strictly according to the corresponding abc standard; if the version number is missing, the file will be treated under loose interpretation. The version field may also be used to indicate abc versions for individual tunes.
Note for developers: Software should ignore the byte order mark (BOM) if encountered as the first character of the file.
When an abc file is included in a multi-part e-mail, its MIME type must be "text/vnd.abc" (see IANA text/vnd.abc).
2.2 Abc file structure
An abc file consists of one or more abc tune transcriptions, optionally interspersed with free text and typeset text annotations. It may optionally start with a file header to set up default values for processing the file.
The file header, abc tunes and text annotations are separated from each other by empty lines (also known as blank lines).
An abc file with more than one tune in it is called an abc tunebook.
2.2.1 Abc tune
An abc tune itself consists of a tune header and a tune body, terminated by an empty line or the end of the file. It may also contain comment lines or stylesheet directives.
The tune header is composed of several information field lines, which are further discussed in information fields. The tune header should start with an X:(reference number) field followed by a T:(title) field and finish with a K:(key) field.
The tune body, which contains the music code, follows immediately after. Certain fields may also be used inside the tune body - see use of fields within the tune body.
It is legal to write an abc tune without a tune body. This feature can be used to document tunes without transcribing them.
Abc music code lines are those lines in the tune body which give notes, bar lines and other musical symbols - see the tune body for details. In effect, music code is the contents of any line which is not an information field, stylesheet directive or comment line.
2.2.2 File header
The file may optionally start with a file header (immediately after the version field), consisting of a block of consecutive information fields, stylesheet directives, or both, terminated with an empty line. The file header is used to set default values for the tunes in the file.
The file header may only appear at the beginning of a file, not between tunes.
Settings in a tune may override the file header settings, but when the end of a tune is reached the defaults set by the file header are reinstated.
Applications which extract separate tunes from a file must insert the fields of the original file header into the header of the extracted tune. However, since users may manually extract tunes without regard to the file header, it is not recommended to use a file header in an abc tunebook that is to be distributed.
2.2.3 Free text and typeset text
The terms free text and typeset text refer to any text not directly included within the information fields in a tune header. Typically such text is used for annotating abc tunebooks; free text is for annotating the abc file but is not included in the typeset score, whereas typeset text is intended for printing out.
Free text is just that. It can be included anywhere in an abc file, after the file header, but must be separated from abc tunes, typeset text and the file header by empty lines. Typically it is used for annotating the abc file but in principle can be any text not containing information fields.
Comment: Since raw html markup and email headers are treated as free text (provided they don't inadvertently contain information fields) this means that abc software can process a wide variety of text-based input files just by ignoring non-abc code.
By default free text is not included in the printed score, although typesetting software may offer the option to print it out (e.g. via a command line switch or GUI checkbox). In this case, the software should treat the free text as a text string, but may format it in any way it chooses.
Typeset text is any text specified using text directives. It may be inserted anywhere in an abc file after the file header, either separated from tunes by empty lines, or included in the tune header or tune body.
Typeset text should be printed by typesetting programs although its exact position in the printed score is program-dependent.
Typeset text that is included in an abc tune (i.e. within the tune header or tune body), must be retained by any programs, such as databasing software, that splits an abc file into separate abc tunes.
2.2.4 Empty lines and line-breaking
Empty lines (also known as blank lines) are used to separate abc tunes, free text and the file header. They also aid the readability of abc files.
Lines that consist entirely of white-space (space and tab characters) are also regarded as empty lines.
Line-breaks (also known as new lines, line feeds, carriage returns, end-of-lines, etc.) can be used within an abc file to aid readability and, if required, break up long input lines - see continuation of input lines.
More specifically, line-breaks in the music code can be used to structure the abc transcription and, by default, generate line-breaks in the printed music. For more details see typesetting line-breaks.
2.2.5 Comments and remarks
A percent symbol (%) will cause the remainder of any input line to be ignored. It can be used to add a comment to the end of an abc line or as a comment line in its own right. (To get a percent symbol, type \% - see text strings.)
Alternatively, you can use the syntax [r:remark] to write a remark in the middle of a line of music.
Example:
|:DEF FED| % this is an end of line comment % this is a comment line DEF [r:and this is a remark] FED:|
Abc code which contains comments and remarks should be processed in exactly the same way as it would be if all the comments and remarks were removed (although, if the code is preprocessed, and comments are actually removed, the stylesheet directives should be left in place).
Important clarification: lines which just contain a comment are processed as if the entire line were removed, even if the comment is preceded by white-space (i.e. the % symbol is the not first character). In other words, removing the comment effectively removes the entire line and so no empty line is introduced.
2.2.6 Continuation of input lines
It is sometimes necessary to tell abc software that an input line is continued on the next physical line(s) in the abc file, so that the two (or more) lines are treated as one. In abc 2.0 there was a universal continuation character (see outdated continuations) for this purpose, but it was decided that this was both unnecessary and confusing.
In abc 2.1, there are ways of continuing each of the 4 different input line types: music code, information fields, comments and stylesheet directives.
In abc music code, by default, line-breaks in the code generate line-breaks in the typeset score and these can be suppressed by using a backslash (or by telling abc typesetting software to ignore line-breaks using I:linebreak $ or I:linebreak <none>) - see typesetting line-breaks for full details.
Comment for programmers: The backslash effectively acts as a continuation character for music code lines, although, for those used to encountering it in other computer language contexts, its use is very abc-specific. In particular it can continue music code lines through information fields, comments and stylesheet directives.
The 3 other input line types can be continued as follows:
- information fields can be continued using
+:at the start of the following line - see field continuation; - comments can easily be continued by adding a
%symbol at the start of the following line - since they are ignored by abc software it doesn't matter how many lines they are split into; - most stylesheet directives are too short to require a continuation syntax, but if one is required then use the
I:<directive>form (seeI:instruction), in place of%%<directive>and continue the line as a field - see field continuation.
Comment for developers: Unlike other languages, and because of the way in which both information fields and music code can be continued through comments, stylesheet directives and (in the case of music code) information fields, it is generally not possible to parse abc files by pre-processing continuations into single lines.
Note that, with the exception of abc music code, continuations are unlikely to be needed often. Indeed in most cases it should be possible, although not necessarily desirable, to write very long input lines, since most abc editing software will display them as wrapped within the text editor window.
Recommendation: Despite there being no limit on line length in abc files, it is recommended that users avoid writing abc code with very long lines. In particular, judiciously applied line-breaks can aid the (human) readability of abc code. More importantly, users who send abc tunes with long lines should be aware that email software sometimes introduces additional line-breaks into lines with more than 72 characters and these may even cause errors when the resulting tune is processed.
2.3 Embedded abc and abc fragments
Traditionally abc has been used in dedicated abc files. More recently, however, the possibility has arisen to include abc tunes, and even fragments, within other document types. An abc element included within another document type is referred to as embedded in that document.
Often, although not always, some form of markup is used to indicate where the embedded abc code starts and finishes.
Example: Within an html document a tune could be included as follows:
<pre class="abc-tune"> X:1 T:Title K:C DEF FED:| </pre>
Important note: The abc standard makes no stipulation about how the abc code is included in the document. For example, in html it could be via a <pre>, <div>, <object>, <script> or some other tag.
Embedded abc elements can be one of four types:
- an abc fragment
- an abc tune
- an entire abc file
In all cases, the type must be indicated to the abc parsing code which is going to process it (for example, via a class parameter). An exception is the embedded abc tune where the parser may instead use the X: field to identify it.
The following rules are applied to embedded elements:
2.3.1 Embedded abc fragment
An abc fragment is a partial abc tune. It may contain a partial tune header with no body or a tune body with optional tune header information fields.
Example 1: A fragment with no tune header:
<div class="abc-fragment"> CDEF GABc| </div>
Example 2: A fragment with a partial tune header:
<div class="abc-fragment"> T:Major scale in D K:D DEFG ABcd| </div>
Unless T:, M: and K: fields are present, a fragment is assumed to describe a stave in the treble clef with no title, no meter indication and no key signature, respectively.
An abc fragment does not require an empty line to mark the end of the tune body if it is terminated by the document markup.
Note for developers: For processing as an abc tune, the parsing code is notionally assumed to add empty X:, T: and K: fields, if these are missing. However, since the processing generally takes place internally within a software package, these need not be added in actuality.
2.3.2 Embedded abc tune
An embedded abc tune has the same structure as an ordinary abc tune except that it does not require an empty line to mark the end of the tune body.
An embedded abc tune could also be identified as an abc fragment (albeit complete), if preferred.
2.3.3 Embedded file header
As with the file header, an embedded file header can be used to set default values for all embedded abc tunes and abc fragments within the document.
Example: For setting the title font in every abc tune in the document:
<div class="abc-file-header"> %%titlefont Arial 10 </div>
Like its counterpart, there must only be one embedded file header per document and it should precede all other embedded abc tunes and abc fragments.
2.3.4 Embedded abc file
A document may include an entire embedded abc file with the usual structure - see abc file structure.
An embedded abc file should be treated independently from other embedded elements so that settings in one embedded abc file do not affect other embedded elements.
Recommendation: As a consequence, using other embedded elements in a document that contains an embedded abc file is not recommended.
3. Information fields
Any line beginning with a letter in the range A-Z or a-z and immediately followed by a colon (:) is an information field. Information fields are used to notate things such as composer, meter, etc. In fact anything that isn't music.
An information field may also be inlined in a tune body when enclosed by [ and ] - see use of fields within the tune body.
Many of these information field identifiers are currently unused so, in order to extend the number of information fields in the future, programs that comply with this standard must ignore the occurrence of information fields not defined here (although they should give a non-fatal error message to warn the user, in case the field identifier is an error or is unsupported).
Some information fields are permitted only in the file or tune header and some only in the tune body, while others are allowed in both locations. information field identifiers A-G, X-Z and a-g, x-z are not permitted in the body to avoid confusion with note symbols, rests and spacers.
Users who wish to use abc notation solely for transcribing (rather than documenting) tunes can ignore most of the information fields. For this purpose all that is really needed are the X:(reference number), T:(title), M:(meter), L:(unit note length) and K:(key) information fields, plus if applicable C:(composer) and w: or W: (words/lyrics, respectively within or after the tune).
Recommendation for newcomers: A good way to find out how to use the fields is to look at the example files, sample abc tunes (in particular English.abc), and try out some examples.
The information fields are summarised in the following table and discussed in description of information fields and elsewhere.
The table illustrates how the information fields may be used in the tune header and whether they may also be used in the tune body (see use of fields within the tune body for details) or in the file header (see abc file structure).
Abc Fields and their usage:
| Field name | file header | tune header | tune body | inline | type | Examples and notes |
|---|---|---|---|---|---|---|
| A:area | yes | yes | string | A:Donegal, A:Bampton (deprecated) | ||
| B:book | yes | yes | string | B:O'Neills | ||
| C:composer | yes | yes | string | C:Robert Jones, C:Trad. | ||
| D:discography | yes | yes | string | D:Chieftains IV | ||
| F:file url | yes | yes | string | F:http://a.b.c/file.abc | ||
| G:group | yes | yes | string | G:flute | ||
| H:history | yes | yes | string | H:The story behind this tune … | ||
| I:instruction | yes | yes | yes | yes | instruction | I:papersize A4, I:newpage |
| K:key | last | yes | yes | instruction | K:G, K:Dm, K:AMix | |
| L:unit note length | yes | yes | yes | yes | instruction | L:1/4, L:1/8 |
| M:meter | yes | yes | yes | yes | instruction | M:3/4, M:4/4 |
| m:macro | yes | yes | yes | yes | instruction | m: ~G2 = {A}G{F}G |
| N:notes | yes | yes | yes | yes | string | N:see also O'Neills - 234 |
| O:origin | yes | yes | string | O:UK; Yorkshire; Bradford | ||
| P:parts | yes | yes | yes | instruction | P:A, P:ABAC, P:(A2B)3 | |
| Q:tempo | yes | yes | yes | instruction | Q:"allegro" 1/4=120 | |
| R:rhythm | yes | yes | yes | yes | string | R:R, R:reel |
| r:remark | yes | yes | yes | yes | - | r:I love abc |
| S:source | yes | yes | string | S:collected in Brittany | ||
| s:symbol line | yes | instruction | s: !pp! ** !f! | |||
| T:tune title | second | yes | string | T:Paddy O'Rafferty | ||
| U:user defined | yes | yes | yes | yes | instruction | U: T = !trill! |
| V:voice | yes | yes | yes | instruction | V:4 clef=bass | |
| W:words | yes | yes | string | W:lyrics printed after the end of the tune | ||
| w:words | yes | string | w:lyrics printed aligned with the notes of a tune | |||
| X:reference number | first | instruction | X:1, X:2 | |||
| Z:transcription | yes | yes | string | Z:John Smith, <j.s@mail.com> |
Fields of type 'string' accept text strings as argument. Fields of type 'instruction' expect a special instruction syntax which will be detailed below. The contents of the remark field will be totally ignored.
Repeated information fields
All information fields, with the exception of X:, may appear more than once in an abc tune.
In the case of all string-type information fields, repeated use in the tune header can be regarded as additional information - for example, a tune may be known by many titles and an abc tune transcription may appear at more than one URL (using the F: field). Typesetting software which prints this information out may concatenate all string-type information fields of the same kind, separated by semi-colons (;), although the initial T:(title) field should be treated differently, as should W:(words) fields - see typesetting information fields.
Certain instruction-type information fields, in particular I:, m:, U: and V:, may also be used multiple times in the tune header to set up different instructions, macros, user definitions and voices. However, if two such fields set up the same value, then the second overrides the first.
Example: The second I:linebreak instruction overrides the first.
I:linebreak <EOL> I:linebreak <none>
Comment: The above example should not generate an error message. The user may legitimately wish to test the effect of two such instructions; having them both makes switching from one to another easy just by changing their order.
Other instruction-type information fields in the tune header also override the previous occurrence of that field.
Within the tune body each line of code is processed in sequence. Therefore, with the exception of s:(symbol line), w:(words) and W:(words) which have their own syntax, the same information field may occur a number of times, for example to change key, meter, tempo or voice, and each occurrence has the effect of overriding the previous one, either for the remainder of the tune, or until the next occurrence. See use of fields within the tune body for more details.
Order of information fields
Recommendation for users: Although information fields in the tune header may be written in any order (subject to X:, T: and K: coming first, second and last, respectively), it does make sense for users to stick to a common ordering, if for no other reason than it makes public domain abc code more readable. Typical ordering of the tune header puts fundamental tune identification details first (X, T, C, O, R), with information fields relating to how the tune is played last (P, V, M, L, Q, K). Background information (B, D, F, G, H, N, S, Z) and information on how the abc code should be interpreted (I, m, U) then tends to appear in the middle of the tune header. Words (W) may be included in the tune header but are usually placed at the end of the tune body.
3.1 Description of information fields
3.1.1 X: - reference number
The X: (reference number) field is used to assign to each tune within a tunebook a unique reference number (a positive integer), for example: X:23.
The X: field is also used to indicate the start of the tune (and hence the tune header), so all tunes must start with an X: field and only one X: field is allowed per tune.
The X: field may be empty, although this is not recommended.
Recommendation for developers: Software which writes abc files is recommended to offer users the possibility to manage X: field numbering automatically. GUI applications may even hide the X: field from users although they should always allow the user access to the raw abc file.
3.1.2 T: - tune title
A T: (title) field must follow immediately after the X: field; it is the human identifier for the tune (although it may be empty).
Some tunes have more than one title and so this field can be used more than once per tune to indicate alternative titles.
The T: field can also be used within a tune to name parts of a tune - in this case it should come before any key or meter changes.
See typesetting information fields for details of how the title and alternatives are included in the printed score.
3.1.3 C: - composer
The C: field is used to indicate the composer(s).
See typesetting information fields for details of how the composer is included in the printed score.
3.1.4 O: - origin
The O: field indicates the geographical origin(s) of a tune.
If possible, enter the data in a hierarchical way, like:
O:Canada; Nova Scotia; Halifax. O:England; Yorkshire; Bradford and Bingley.
Recommendation: It is recommended to always use a ";" (semi-colon) as the separator, so that software may parse the field. However, abc 2.0 recommended the use of a comma, so legacy files may not be parse-able under abc 2.1.
This field may be especially useful for traditional tunes with no known composer.
See typesetting information fields for details of how the origin information is included in the printed score.
3.1.5 A: - area
Historically, the A: field has been used to contain area information (more specific details of the tune origin). However this field is now deprecated and it is recommended that such information be included in the O: field.
3.1.6 M: - meter
The M: field indicates the meter. Apart from standard meters, e.g. M:6/8 or M:4/4, the symbols M:C and M:C| give common time (4/4) and cut time (2/2) respectively. The symbol M:none omits the meter entirely (free meter).
It is also possible to specify a complex meter, e.g. M:(2+3+2)/8, to make explicit which beats should be accented. The parentheses around the numerator are optional.
The example given will be typeset as:
2 + 3 + 2
8
When there is no M: field defined, free meter is assumed (in free meter, bar lines can be placed anywhere you want).
3.1.7 L: - unit note length
The L: field specifies the unit note length - the length of a note as represented by a single letter in abc - see note lengths for more details.
Commonly used values for unit note length are L:1/4 - quarter note (crotchet), L:1/8 - eighth note (quaver) and L:1/16 - sixteenth note (semi-quaver). L:1 (whole note) - or equivalently L:1/1, L:1/2 (minim), L:1/32 (demi-semi-quaver), L:1/64, L:1/128, L:1/256 and L:1/512 are also available, although L:1/64 and shorter values are optional and may not be provided by all software packages.
If there is no L: field defined, a unit note length is set by default, based on the meter field M:. This default is calculated by computing the meter as a decimal: if it is less than 0.75 the default unit note length is a sixteenth note; if it is 0.75 or greater, it is an eighth note. For example, 2/4 = 0.5, so, the default unit note length is a sixteenth note, while for 4/4 = 1.0, or 6/8 = 0.75, or 3/4= 0.75, it is an eighth note. For M:C (4/4), M:C| (2/2) and M:none (free meter), the default unit note length is 1/8.
A meter change within the body of the tune will not change the unit note length.
3.1.8 Q: - tempo
The Q: field defines the tempo in terms of a number of beats per minute, e.g. Q:1/2=120 means 120 half-note beats per minute.
There may be up to 4 beats in the definition, e.g:
Q:1/4 3/8 1/4 3/8=40
This means: play the tune as if Q:5/4=40 was written, but print the tempo indication using separate notes as specified by the user.
The tempo definition may be preceded or followed by an optional text string, enclosed by quotes, e.g.
Q: "Allegro" 1/4=120 Q: 3/8=50 "Slowly"
It is OK to give a string without an explicit tempo indication, e.g. Q:"Andante".
Finally note that some previous Q: field syntax is now deprecated (see outdated information field syntax).
3.1.9 P: - parts
VOLATILE: For music with more than one voice, interaction between the P: and V: fields will be clarified when multi-voice music is addressed in abc 2.2. The use of P: for single voice music will be revisited at the same time.
The P: field can be used in the tune header to state the order in which the tune parts are played, i.e. P:ABABCDCD, and then inside the tune body to mark each part, i.e. P:A or P:B. (In this context part refers to a section of the tune, rather than a voice in multi-voice music.)
Within the tune header, you can give instruction to repeat a part by following it with a number: e.g. P:A3 is equivalent to P:AAA. You can make a sequence repeat by using parentheses: e.g. P:(AB)3 is equivalent to P:ABABAB. Nested parentheses are permitted; dots may be placed anywhere within the header P: field to increase legibility: e.g. P:((AB)3.(CD)3)2. These dots are ignored by computer programs.
See variant endings and lyrics for possible uses of P: notation.
Player programs should use the P: field if possible to render a complete playback of the tune; typesetting programs should include the P: field values in the printed score.
See typesetting information fields for details of how the part information may be included in the printed score.
3.1.10 Z: - transcription
Typically the Z: field contains the name(s) of the person(s) who transcribed the tune into abc, and possibly some contact information, e.g. an (e-)mail address or homepage URL.
Example: Simple transcription notes.
Z:John Smith, <j.s@mail.com>
However, it has also taken over the role of the %%abc-copyright and %%abc-edited-by since they have been deprecated (see outdated directives).
Example: Detailed transcription notes.
Z:abc-transcription John Smith, <j.s@mail.com>, 1st Jan 2010 Z:abc-edited-by Fred Bloggs, <f.b@mail.com>, 31st Dec 2010 Z:abc-copyright © John Smith
This new usage means that an update history can be recorded in collections which are collaboratively edited by a number of users.
Note that there is no formal syntax for the contents of this field, although users are strongly encouraged to be consistent, but, by convention, Z:abc-copyright refers to the copyright of the abc transcription rather than the tune.
See typesetting information fields for details of how the transcription information may be included in the printed score.
Comment: If required, software may even choose to interpret specific Z: strings, for example to print out the string which follows after Z:abc-copyright.
3.1.11 N: - notes
Contains general annotations, such as references to other tunes which are similar, details on how the original notation of the tune was converted to abc, etc.
See typesetting information fields for details of how notes may be included in the printed score.
3.1.12 G: - group
Database software may use this field to group together tunes (for example by instruments) for indexing purposes. It can also be used for creating medleys - however, this usage is not standardised.
3.1.13 H: - history
Designed for multi-line notes, stories and anecdotes.
Although the H: fields are typically not typeset, the correct usage for multi-line input is to use field continuation syntax (+:), rather than H: at the start of each subsequent line of a multi-line note. This allows, for example, database applications to distinguish between two different anecdotes.
Examples:
H:this is considered +:as a single entry
H:this usage is considered as two entries H:rather than one
The original usage of H: (where subsequent lines need no field indicator) is now deprecated (see outdated information field syntax).
See typesetting information fields for details of how the history may be included in the printed score.
3.1.14 K: - key
The key signature should be specified with a capital letter (A-G) which may be followed by a # or b for sharp or flat respectively. In addition the mode should be specified (when no mode is indicated, major is assumed).
For example, K:C major, K:A minor, K:C ionian, K:A aeolian, K:G mixolydian, K:D dorian, K:E phrygian, K:F lydian and K:B locrian would all produce a staff with no sharps or flats. The spaces can be left out, capitalisation is ignored for the modes and in fact only the first three letters of each mode are parsed so that, for example, K:F# mixolydian is the same as K:F#Mix or even K:F#MIX. As a special case, minor may be abbreviated to m.
This table sums up how the same key signatures can be written in different ways:
| Mode | Ionian | Aeolian | Mixolydian | Dorian | Phrygian | Lydian | Locrian |
|---|---|---|---|---|---|---|---|
| Key Signature | Major | Minor | |||||
| 7 sharps | C# | A#m | G#Mix | D#Dor | E#Phr | F#Lyd | B#Loc |
| 6 sharps | F# | D#m | C#Mix | G#Dor | A#Phr | BLyd | E#Loc |
| 5 sharps | B | G#m | F#Mix | C#Dor | D#Phr | ELyd | A#Loc |
| 4 sharps | E | C#m | BMix | F#Dor | G#Phr | ALyd | D#Loc |
| 3 sharps | A | F#m | EMix | BDor | C#Phr | DLyd | G#Loc |
| 2 sharps | D | Bm | AMix | EDor | F#Phr | GLyd | C#Loc |
| 1 sharp | G | Em | DMix | ADor | BPhr | CLyd | F#Loc |
| 0 sharps/flats | C | Am | GMix | DDor | EPhr | FLyd | BLoc |
| 1 flat | F | Dm | CMix | GDor | APhr | BbLyd | ELoc |
| 2 flats | Bb | Gm | FMix | CDor | DPhr | EbLyd | ALoc |
| 3 flats | Eb | Cm | BbMix | FDor | GPhr | AbLyd | DLoc |
| 4 flats | Ab | Fm | EbMix | BbDor | CPhr | DbLyd | GLoc |
| 5 flats | Db | Bbm | AbMix | EbDor | FPhr | GbLyd | CLoc |
| 6 flats | Gb | Ebm | DbMix | AbDor | BbPhr | CbLyd | FLoc |
| 7 flats | Cb | Abm | GbMix | DbDor | EbPhr | FbLyd | BbLoc |
By specifying an empty K: field, or K:none, it is possible to use no key signature at all.
The key signatures may be modified by adding accidentals, according to the format K:<tonic> <mode> <accidentals>. For example, K:D Phr ^f would give a key signature with two flats and one sharp, which designates a very common mode in Klezmer (Ahavoh Rabboh) and in Arabic music (Maqam Hedjaz). Likewise, "K:D maj =c" or "K:D =c" will give a key signature with F sharp and c natural (the D mixolydian mode). Note that there can be several modifying accidentals, separated by spaces, each beginning with an accidental sign (__, _, =, ^ or ^^), followed by a note letter. The case of the letter is used to determine on which line the accidental is placed.
It is possible to use the format K:<tonic> exp <accidentals> to explicitly define all the accidentals of a key signature. Thus K:D Phr ^f could also be notated as K:D exp _b _e ^f, where 'exp' is an abbreviation of 'explicit'. Again, the case of the letter is used to determine on which line the accidental is placed.
Software that does not support explicit key signatures should mark the individual notes in the tune with the accidentals that apply to them.
Scottish highland pipes typically have the scale G A B ^c d e ^f g a and highland pipe music primarily uses the modes D major and A mixolyian (plus B minor and E dorian). Therefore there are two additional keys specifically for notating highland bagpipe tunes; K:HP doesn't put a key signature on the music, as is common with many tune books of this music, while K:Hp marks the stave with F sharp, C sharp and G natural. Both force all the beams and stems of normal notes to go downwards, and of grace notes to go upwards.
By default, the abc tune will be typeset with a treble clef. You can add special clef specifiers to the K: field, with or without a key signature, to change the clef and various other staff properties, such as transposition. K: clef=bass, for example, would indicate the bass clef. See clefs and transposition for full details.
Note that the first occurrence of the K: field, which must appear in every tune, finishes the tune header. All following lines are considered to be part of the tune body.
3.1.15 R: - rhythm
Contains an indication of the type of tune (e.g. hornpipe, double jig, single jig, 48-bar polka, etc). This gives the musician some indication of how a tune should be interpreted as well as being useful for database applications (see background information). It has also been used experimentally by playback software (in particular, abcmus) to provide more realistic playback by altering the stress on particular notes within a bar.
See typesetting information fields for details of how the rhythm may be included in the printed score.
3.1.16 B:, D:, F:, S: - background information
The information fields B:book (i.e. printed tune book), D:discography (i.e. a CD or LP where the tune can be heard), F:file url (i.e. where the either the abc tune or the abc file can be found on the web) and S:source (i.e. the circumstances under which a tune was collected or learned), as well as the fields H:history, N:notes, O:origin and R:rhythm mentioned above, are used for providing structured background information about a tune. These are particularly aimed at large tune collections (common in abc since its inception) and, if used in a systematic way, mean that abc database software can sort, search and filter on specific fields (for example, to sort by rhythm or filter out all the tunes on a particular CD).
The abc standard does not prescribe how these fields should be used, but it is typical to employ several fields of the same type each containing one piece of information, rather than one field containing several pieces of information (see English.abc for some examples).
See typesetting information fields for details of how background information may be included in the printed score.
3.1.17 I: - instruction
The I:(instruction) field is used for an extended set of instruction directives concerned with how the abc code is to be interpreted.
The I: field can be used interchangeably with stylesheet directives so that any I:directive may instead be written %%directive, and vice-versa. However, to use the inline version, the I: version must be used.
Despite this interchangeability, certain directives have been adopted as part of the standard (indicated by I: in this document) and must be implemented by software confirming to this version of the standard; conversely, the stylesheet directives (indicated by %% in this document) are optional.
Comment: Since stylesheet directives are optional, and not necessarily portable from one program to another, this means that I: fields containing stylesheet directives should be treated liberally by abc software and, in particular, that I: fields which are not recognised should be ignored.
The following table contains a list of the I: field directives adopted as part of the abc standard, with links to further information:
| directive | section |
|---|---|
I:abc-charset | charset field |
I:abc-version | version field |
I:abc-include | include field |
I:abc-creator | creator field |
I:linebreak | typesetting line breaks |
I:decoration | decoration dialects |
Typically, instruction fields are for use in the file header, to set defaults for the file, or (in most cases) in the tune header, but not in the tune body. The occurrence of an instruction field in a tune header overrides that in the file header.
Comment: Remember that abc software which extracts separate tunes from a file must insert the fields of the original file header into the header of the extracted tune: this is also true for the fields defined in this section.
Charset field
The I:abc-charset <value> field indicates the character set in which text strings are coded. Since this affects how the file is read, it should appear as early as possible in the file header. It may not be changed further on in the file.
Example:
I:abc-charset utf-8
Legal values for the charset field are iso-8859-1 through to iso-8859-10, us-ascii and utf-8 (the default).
Software that exports abc tunes conforming to this standard should include a charset field if an encoding other than utf-8 is used. All conforming abc software must be able to handle text strings coded in utf-8 and us-ascii. Support for the other charsets is optional.
Extensive information about UTF-8 and ISO-8859 can be found on wikipedia.
Version field
Every abc file conforming to this standard should start with the line
%abc-2.1
(see abc file identification).
However to indicate tunes conforming to a different standard it is possible to use the I:abc-version <value> field, either in the tune header (for individual tunes) or in the file header.
Example:
I:abc-version 2.0
Include field
The I:abc-include <filename.abh> imports the definitions found in a separate abc header file (.abh), and inserts them into the file header or tune header.
Example:
I:abc-include mydefs.abh
The included file may contain information fields, stylesheet directives and comments, but no other abc constructs.
If the header file cannot be found, the I:abc-include instruction should be ignored with a non-fatal error message.
Comment: If you use this construct and distribute your abc files, make sure that you distribute the .abh files with them.
Creator field
The I:abc-creator <value> field contains the name and version number of the program that created the abc file.
Example:
I:abc-creator xml2abc-2.7
Software that exports abc tunes conforming to this standard must include a creator field.
3.1.18 Other fields
- For
m:see macros. - For
r:see comments and remarks. - For
s:see symbol lines. - For
U:see redefinable symbols. - For
V:see multiple voices.
3.2 Use of fields within the tune body
It is often desired to change the key (K), meter (M), or unit note length (L) mid-tune. These, and most other information fields which can be legally used within the tune body, can be specified as an inline field by placing them within square brackets in a line of music
Example: The following two excerpts are considered equivalent - either variant is equally acceptable.
E2E EFE|E2E EFG|[M:9/8] A2G F2E D2|]
E2E EFE|E2E EFG|\ M:9/8 A2G F2E D2|]
The first bracket, field identifier and colon must be written without intervening spaces. Only one field may be placed within a pair of brackets; however, multiple bracketed fields may be placed next to each other. Where appropriate, inline fields (especially clef changes) can be used in the middle of a beam without breaking it.
See information fields for a table showing the fields that may appear within the body and those that may be used inline.
3.3 Field continuation
A field that is too long for one line may be continued by prefixing +: at the start of the following line. For string-type information fields (see the information fields table for a list of string-type fields), the continuation is considered to add a space between the two half lines.
Example: The following two excerpts are considered equivalent.
w:Sa-ys my au-l' wan to your aul' wan, +:will~ye come to the Wa-x-ies dar-gle?
w:Sa-ys my au-l' wan to your aul' wan, will~ye come to the Wa-x-ies dar-gle?
Comment: This is most useful for continuing long w:(aligned lyrics) and H:(history) fields. However, it can also be useful for preventing automatic wrapping by email software (see continuation of input lines).
Recommendation for GUI developers: Sometimes users may wish to paste paragraphs of text into an abc file, particularly in the H:(history) field. GUI developers are recommended to provide tools for reformatting such paragraphs, for example by splitting them into several lines each prefixed by +:.
There is no limit to the number of times a field may be continued and comments and stylesheet directives may be interspersed between the continuations.
Example: The following is a legal continuation of the w: field, although the usage not recommended (the change of font could also be achieved by font specifiers - see font directives).
%%vocalfont Times-Roman 14 w:nor-mal % legal, but not recommended %%vocalfont Times-Italic * +:i-ta-lic %%vocalfont Times-Roman * +:nor-mal
Comment: abc standard 2.3 is scheduled to address markup and will be seeking a more elegant way to achieve the above.
4. The tune body
4.1 Pitch
The following letters are used to represent notes using the treble clef:
and by extension other lower and higher notes are available.
Lower octaves are reached by using commas and higher octaves are written using apostrophes; each extra comma/apostrophe lowers/raises the note by an octave.
Programs should be able to to parse any combinations of , and ' signs appearing after the note. For example C,', (C comma apostrophe comma) has the the same meaning as C, (C comma) and (uppercase) C' (C apostrophe) should have the same meaning as (lowercase) c.
Alternatively, it is possible to raise or lower a section of music code using the octave parameter of the K: or V: fields.
Comment: The English note names C-B, which are used in the abc system, correspond to the note names do-si, which are used in many other languages: do=C, re=D, mi=E, fa=F, sol=G, la=A, si=B.
4.2 Accidentals
The symbols ^, = and _ are used (before a note) to notate respectively a sharp, natural or flat. Double sharps and flats are available with ^^ and __ respectively.
4.3 Note lengths
Throughout this document note lengths are referred as sixteenth, eighth, etc. The equivalents common in the U.K. are sixteenth note = semi-quaver, eighth = quaver, quarter = crotchet and half = minim.
The unit note length for the transcription is set in the L: field or, if the L: field does not exist, inferred from the M: field. For example, L:1/8 sets an eighth note as the unit note length.
A single letter in the range A-G, a-g then represents a note of this length. For example, if the unit note length is an eighth note, DEF represents 3 eighth notes.
Notes of differing lengths can be obtained by simply putting a multiplier after the letter. Thus if the unit note length is 1/16, A or A1 is a sixteenth note, A2 an eighth note, A3 a dotted eighth note, A4 a quarter note, A6 a dotted quarter note, A7 a double dotted quarter note, A8 a half note, A12 a dotted half note, A14 a double dotted half note, A15 a triple dotted half note and so on. If the unit note length is 1/8, A is an eighth note, A2 a quarter note, A3 a dotted quarter note, A4 a half note, and so on.
To get shorter notes, either divide them - e.g. if A is an eighth note, A/2 is a sixteenth note, A3/2 is a dotted eighth note, A/4 is a thirty-second note - or change the unit note length with the L: field. Alternatively, if the music has a broken rhythm, e.g. dotted eighth note/sixteenth note pairs, use broken rhythm markers.
Note that A/ is shorthand for A/2 and similarly A// = A/4, etc.
Comment: Note lengths that can't be translated to conventional staff notation are legal, but their representation by abc typesetting software is undefined and they should be avoided.
Note for developers: All compliant software should be able to handle note lengths down to a 128th note; shorter lengths are optional.
4.4 Broken rhythm
A common occurrence in traditional music is the use of a dotted or broken rhythm. For example, hornpipes, strathspeys and certain morris jigs all have dotted eighth notes followed by sixteenth notes, as well as vice-versa in the case of strathspeys. To support this, abc notation uses a > to mean 'the previous note is dotted, the next note halved' and < to mean 'the previous note is halved, the next dotted'.
Example: The following lines all mean the same thing (the third version is recommended):
L:1/16 a3b cd3 a2b2c2d2
L:1/8 a3/2b/2 c/2d3/2 abcd
L:1/8 a>b c<d abcd
As a logical extension, >> means that the first note is double dotted and the second quartered and >>> means that the first note is triple dotted and the length of the second divided by eight. Similarly for << and <<<.
Note that the use of broken rhythm markers between notes of unequal lengths will produce undefined results, and should be avoided.
4.5 Rests
Rests can be transcribed with a z or an x and can be modified in length in exactly the same way as normal notes. z rests are printed in the resulting sheet music, while x rests are invisible, that is, not shown in the printed music.
Multi-measure rests are notated using Z (upper case) followed by the number of measures.
Example: The following excerpts, shown with the typeset results, are musically equivalent (although they are typeset differently).
Z4|CD EF|GA Bc
z4|z4|z4|z4|CD EF|GA Bc
When the number of measures is not given, Z is equivalent to a pause of one measure.
By extension multi-measure invisible rests are notated using X (upper case) followed by the number of measures and when the number of measures is not given, X is equivalent to a pause of one measure.
Comment: Although not particularly valuable, a multi-measure invisible rest could be useful when a voice is silent for several measures.
4.6 Clefs and transposition
VOLATILE: This section is subject to some clarifications with regard to transposition, rules for the middle parameter and interactions between different parameters.
Clef and transposition information may be provided in the K: key and V: voice fields. The general syntax is:
[clef=]<clef name>[<line number>][+8 | -8] [middle=<pitch>] [transpose=<semitones>] [octave=<number>] [stafflines=<lines>]
(where <…> denotes a value, […] denotes an optional parameter, and | separates alternative values).
<clef name>- may betreble,alto,tenor,bass,percornone.percselects the drum clef.clef=may be omitted.[<line number>]- indicates on which staff line the base clef is written. Defaults are: treble:2; alto:3; tenor:4; bass:4.[+8 | -8]- draws '8' above or below the staff. The player will transpose the notes one octave higher or lower.[middle=<pitch>]- is an alternate way to define the line number of the clef. The pitch indicates what note is displayed on the 3rd line of the staff. Defaults are: treble:B; alto:C; tenor:A,; bass:D,; none:B. This setting does not affect the playback.[transpose=<semitones>]- for playback, transpose the current voice by the indicated amount of semitones; positive numbers transpose up, negative down. This setting does not affect the printed score. The default is 0.[octave=<number>]to raise (positive number) or lower (negative number) the music code in the current voice by one or more octaves. This usage can help to avoid the need to write lots of apostrophes or commas to raise or lower notes.[stafflines=<lines>]- the number of lines in the staff. The default is 5.
Note that the clef, middle, transpose, octave and stafflines specifiers may be used independent of each other.
Examples:
K: clef=alto K: perc stafflines=1 K:Am transpose=-2 V:B middle=d bass
Note that although this standard supports the drum clef, there is currently no support for special percussion notes.
The middle specifier can be handy when working in the bass clef. Setting K:bass middle=d transpose=-24 will save you from adding comma specifiers to the notes (the transpose setting is required to get the playback sounding at the correct pitch). The specifier may be abbreviated to m=.
The transpose specifier is useful, for example, for a Bb clarinet, for which the music is written in the key of C although the instrument plays it in the key of Bb:
V:Clarinet K:C transpose=-2
The transpose specifier may be abbreviated to t=.
To notate the various standard clefs, one can use the following specifiers:
The seven clefs
| Name | specifier |
|---|---|
| Treble | K:treble |
| Bass | K:bass |
| Baritone | K:bass3 |
| Tenor | K:tenor |
| Alto | K:alto |
| Mezzosoprano | K:alto2 |
| Soprano | K:alto1 |
More clef names may be allowed in the future, therefore unknown names should be ignored. If the clef is unknown or not specified, the default is treble.
Applications may introduce their own clef line specifiers. These specifiers should start with the name of the application, followed a colon, followed by the name of the specifier.
Example:
V:p1 perc stafflines=3 m=C mozart:noteC=snare-drum
4.7 Beams
To group notes together under one beam they must be grouped together without spaces. Thus in 2/4, A2BC will produce an eighth note followed by two sixteenth notes under one beam whilst A2 B C will produce the same notes separated. The beam slopes and the choice of upper or lower stems are typeset automatically.
Notes that cannot be beamed may be placed next to each other. For example, if L:1/8 then ABC2DE is equivalent to AB C2 DE.
Back quotes ` may be used freely between notes to be beamed, to increase legibility. They are ignored by computer programs. For example, A2``B``C is equivalent to A2BC.
4.8 Repeat/bar symbols
Bar line symbols are notated as follows:
| Symbol | Meaning |
|---|---|
| | bar line |
|] | thin-thick double bar line |
|| | thin-thin double bar line |
[| | thick-thin double bar line |
|: | start of repeated section |
:| | end of repeated section |
:: | start & end of two repeated sections |
Recommendation for developers: If an 'end of repeated section' is found without a previous 'start of repeated section', playback programs should restart the music from the beginning of the tune, or from the latest double bar line or end of repeated section.
Note that the notation :: is short for :| followed by |:. The variants ::, :|: and :||: are all equivalent.
By extension, |:: and ::| mean the start and end of a section that is to be repeated three times, and so on.
A dotted bar line can be notated by preceding it with a dot, e.g. .| - this may be useful for notating editorial bar lines in music with very long measures.
An invisible bar line may be notated by putting the bar line in brackets, e.g. [|] - this may be useful for notating voice overlay in meter-free music.
Abc parsers should be quite liberal in recognizing bar lines. In the wild, bar lines may have any shape, using a sequence of | (thin bar line), [ or ] (thick bar line), and : (dots), e.g. |[| or [|::: .
4.9 First and second repeats
First and second repeats can be notated with the symbols [1 and [2, e.g.
faf gfe|[1 dfe dBA:|[2 d2e dcB|].
When adjacent to bar lines, these can be shortened to |1 and :|2, but with regard to spaces
| [1
is legal, while
| 1
is not.
Thus, a tune with different ending for the first and second repeats has the general form:
|: <common body of tune> |1 <first ending> :|2 <second ending> |]
Note that in many abc files the |: may not be present.
4.10 Variant endings
In combination with P: part notation, it is possible to notate more than two variant endings for a section that is to be repeated a number of times.
For example, if the header of the tune contains P:A4.B4 then parts A and B will each be played 4 times. To play a different ending each time, you could write in the tune:
P:A <notes> | [1 <notes> :| [2 <notes> :| [3 <notes> :| [4 <notes> |]
The Nth ending starts with [N and ends with one of ||, :| |] or [|. You can also mark a section as being used for more than one ending e.g.
[1,3 <notes> :|
plays on the 1st and 3rd endings and
[1-3 <notes> :|
plays on endings 1, 2 and 3. In general, '[' can be followed by any list of numbers and ranges as long as it contains no spaces e.g.
[1,3,5-7 <notes> :| [2,4,8 <notes> :|
4.11 Ties and slurs
You can tie two notes of the same pitch together, within or between bars, with a - symbol, e.g. abc-|cba or c4-c4. The tie symbol must always be adjacent to the first note of the pair, but does not need to be adjacent to the second, e.g. c4 -c4 and abc|-cba are not legal - see order of abc constructs.
More general slurs can be put in with () symbols. Thus (DEFG) puts a slur over the four notes. Spaces within a slur are OK, e.g. ( D E F G ) .
Slurs may be nested:
(c (d e f) g a)
and they may also start and end on the same note:
(c d (e) f g a)
A dotted slur may be notated by preceding the opening brace with a dot, e.g. .(cde); it is optional to place a dot immediately before the closing brace. Likewise, a dotted tie can be transcribed by preceding it with a dot, e.g. C.-C. This is especially useful in parts with multiple verses: some verses may require a slur, some may not.
It should be noted that although the tie - and slur () produce similar symbols in staff notation they have completely different meanings to player programs and should not be interchanged. Ties connect two successive notes of the same pitch, causing them to be played as a single note, while slurs connect the first and last note of any series of notes, and may be used to indicate phrasing, or that the group should be played legato. Both ties and slurs may be used into, out of and between chords, and in this case the distinction between them is particularly important.
4.12 Grace notes
Grace notes can be written by enclosing them in curly braces, {}. For example, a taorluath on the Highland pipes would be written {GdGe}. The tune 'Athol Brose' (in the file Strspys.abc) has an example of complex Highland pipe gracing in all its glory. Although nominally grace notes have no melodic time value, expressions such as {a3/2b/} or {a>b} can be useful and are legal although some software may ignore them. The unit duration to use for gracenotes is not specified by the abc file, but by the software, and might be a specific amount of time (for playback purposes) or a note length (e.g. 1/32 for Highland pipe music, which would allow {ge4d} to code a piobaireachd 'cadence').
To distinguish between appoggiaturas and acciaccaturas, the latter are notated with a forward slash immediately following the open brace, e.g. {/g}C or {/gagab}C:
The presence of gracenotes is transparent to the broken rhythm construct. Thus the forms A<{g}A and A{g}<A are legal and equivalent to A/2{g}A3/2.
4.13 Duplets, triplets, quadruplets, etc.
These can be simply coded with the notation (2ab for a duplet, (3abc for a triplet or (4abcd for a quadruplet, etc, up to (9. The musical meanings are:
| Symbol | Meaning |
|---|---|
(2 | 2 notes in the time of 3 |
(3 | 3 notes in the time of 2 |
(4 | 4 notes in the time of 3 |
(5 | 5 notes in the time of n |
(6 | 6 notes in the time of 2 |
(7 | 7 notes in the time of n |
(8 | 8 notes in the time of 3 |
(9 | 9 notes in the time of n |
If the time signature is compound (6/8, 9/8, 12/8) then n is three, otherwise n is two.
More general tuplets can be specified using the syntax (p:q:r which means 'put p notes into the time of q for the next r notes'. If q is not given, it defaults as above. If r is not given, it defaults to p.
For example, (3 is equivalent to (3:: or (3:2 , which in turn are equivalent to (3:2:3, whereas (3::2 is equivalent to (3:2:2.
This can be useful to include notes of different lengths within a tuplet, for example (3:2:2 G4c2 or (3:2:4 G2A2Bc. It also describes more precisely how the simple syntax works in cases like (3 D2E2F2 or even (3 D3EF2. The number written over the tuplet is p.
Spaces that appear between the tuplet specifier and the following notes are to be ignored.
4.14 Decorations
A number of shorthand decoration symbols are available:
| Symbol | Meaning |
|---|---|
. | staccato mark |
~ | Irish roll |
H | fermata |
L | accent or emphasis |
M | lowermordent |
O | coda |
P | uppermordent |
S | segno |
T | trill |
u | up-bow |
v | down-bow |
Decorations should be placed before the note which they decorate - see order of abc constructs
Examples:
(3.a.b.c % staccato triplet vAuBvA % bowing marks (for fiddlers)
Most of the characters above (~HLMOPSTuv) are just short-cuts for commonly used decorations and can even be redefined (see redefinable symbols).
More generally, symbols can be entered using the syntax !symbol!, e.g. !trill!A4 for a trill symbol. (Note that the abc standard version 2.0 used instead the syntax +symbol+ - this dialect of abc is still available, but is now deprecated - see decoration dialects.)
The currently defined symbols are:
| Symbol | Meaning | ||
|---|---|---|---|
!trill! | "tr" (trill mark) |
| !trill(! | start of an extended trill | ||
!trill)! | end of an extended trill |
| !lowermordent! | short /|/|/ squiggle with a vertical line through it | ||
!uppermordent! | short / | / | / squiggle |
| !mordent! | same as !lowermordent! |
!pralltriller! | same as !uppermordent! |
| !roll! | a roll mark (arc) as used in Irish music | ||
!turn! | a turn mark (also known as gruppetto) |
| !turnx! | a turn mark with a line through it | ||
!invertedturn! | an inverted turn mark |
| !invertedturnx! | an inverted turn mark with a line through it | ||
!arpeggio! | vertical squiggle |
| !>! | > mark | ||
!accent! | same as !>! |
| !emphasis! | same as !>! | ||
!fermata! | fermata or hold (arc above dot) |
| !invertedfermata! | upside down fermata | ||
!tenuto! | horizontal line to indicate holding note for full duration |
| !0! - !5! | fingerings | ||
!+! | left-hand pizzicato, or rasp for French horns |
| !plus! | same as !+! | ||
!snap! | snap-pizzicato mark, visually similar to !thumb! |
| !slide! | slide up to a note, visually similar to a half slur | ||
!wedge! | small filled-in wedge mark |
| !upbow! | V mark | ||
!downbow! | squared n mark |
| !open! | small circle above note indicating open string or harmonic | ||
!thumb! | cello thumb symbol |
| !breath! | a breath mark (apostrophe-like) after note | ||
!pppp! !ppp! !pp! !p! | dynamics marks |
| !mp! !mf! !f! !ff! | more dynamics marks | ||
!fff! !ffff! !sfz! | more dynamics marks |
| !crescendo(! | start of a < crescendo mark | ||
!<(! | same as !crescendo(! |
| !crescendo)! | end of a < crescendo mark, placed after the last note | ||
!<)! | same as !crescendo)! |
| !diminuendo(! | start of a > diminuendo mark | ||
!>(! | same as !diminuendo(! |
| !diminuendo)! | end of a > diminuendo mark, placed after the last note | ||
!>)! | same as !diminuendo)! |
| !segno! | 2 ornate s-like symbols separated by a diagonal line | ||
!coda! | a ring with a cross in it |
| !D.S.! | the letters D.S. (=Da Segno) | ||
!D.C.! | the letters D.C. (=either Da Coda or Da Capo) |
| !dacoda! | the word "Da" followed by a Coda sign | ||
!dacapo! | the words "Da Capo" |
| !fine! | the word "fine" | ||
!shortphrase! | vertical line on the upper part of the staff |
| !mediumphrase! | same, but extending down to the centre line | ||
!longphrase! | same, but extending 3/4 of the way down |
Here is a picture of most decorations:
<abc>
L:1/1
K: clef=none
!trill!c | !trill(!c | !trill)!c | !lowermordent!c | !uppermordent!c | !roll!c | !turn!c | !turnx!c | !invertedturn!c | !invertedturnx!c | !arpeggio!c | !>!c | !fermata!c | !invertedfermata!c | !tenuto!c | !2!c | !+!c | !snap!c | !slide!c | !wedge!c | !upbow!c | !downbow!c | !open!c | !thumb!c | !breath!c | !pppp!c | !<(!c | !<)!c | !>(!c | !>)!c | !segno!c | !coda!c | !D.S.!c | !D.C.!c | !fine!c | !shortphrase!c | !mediumphrase!c | !longphrase!c |]
w:!trill! !trill(! !trill)! !lowermordent! !uppermordent! !roll! !turn! !turnx! !invertedturn! !invertedturnx! !arpeggio! !>! !fermata! !invertedfermata! !tenuto! !2! !+! !snap! !slide! !wedge! !upbow! !downbow! !open! !thumb! !breath! !pppp! !<(! !<)! !>(! !>)! !segno! !coda! !D.S.! !D.C.! !fine! !shortphrase! !mediumphrase! !longphrase!
</abc>
Note that the decorations may be applied to notes, rests, note groups, and bar lines. If a decoration is to be typeset between notes, it may be attached to the y spacer - see typesetting extra space.
Spaces may be used freely between each of the symbols and the object to which it should be attached. Also an object may be preceded by multiple symbols, which should be printed one over another, each on a different line.
Example:
[!1!C!3!E!5!G] !coda! y !p! !trill! C !fermata!|
<abc>
L:1/8
K: clef=none
[!1!C!3!E!5!G] !coda! y !p! !trill! C !fermata!|
</abc>
Player programs may choose to ignore most of the symbols mentioned above, though they may be expected to implement the dynamics marks, the accent mark and the staccato dot. Default volume is equivalent to !mf!. On a scale from 0-127, the relative volumes can be roughly defined as: !pppp! = !ppp! = 30, !pp! = 45, !p! = 60, !mp! = 75, !mf! = 90, !f! = 105, !ff! = 120, !fff! = !ffff! = 127.
Abc software may also allow users to define new symbols in a package dependent way.
Note that symbol names may not contain any spaces, [, ], |