Abc Standard v2.1
Abc Standard v2.1
1 (Dec 2011)
Chris Walshaw For information on Abc2MIDI click here:
abcnotation.com/contact [https://abcnotation.com/contact]
chriswalshaw.co.uk [https://chriswalshaw.co.uk] https://abcmidi.sourceforge.io/
1. Introduction
1.1 How to read this document
1.1.1 Terminology / definitions
1.2 How to avoid reading this document
1.3 Abc tutorials
1.4 Abc extensions
1.5 Further information and changes
1.6 Document locations
2. Abc files, tunes and fragments
2.1 Abc file identification
2.2 Abc file structure
2.2.1 Abc tune
2.2.2 File header
2.2.3 Free text and typeset text
2.2.4 Empty lines and line-breaking
2.2.5 Comments and remarks
2.2.6 Continuation of input lines
2.3 Embedded abc and abc fragments
2.3.1 Embedded abc fragment
2.3.2 Embedded abc tune
2.3.3 Embedded file header
2.3.4 Embedded abc file
3. Information fields
3.1 Description of information fields
3.1.1 X: - reference number
3.1.2 T: - tune title
3.1.3 C: - composer
3.1.4 O: - origin
3.1.5 A: - area
3.1.6 M: - meter
3.1.7 L: - unit note length
3.1.8 Q: - tempo
3.1.9 P: - parts
3.1.10 Z: - transcription
3.1.11 N: - notes
3.1.12 G: - group
3.1.13 H: - history
3.1.14 K: - key
3.1.15 R: - rhythm
3.1.16 B:, D:, F:, S: - background information
3.1.17 I: - instruction
3.1.18 Other fields
1
3.2 Use of fields within the tune body
3.3 Field continuation
4. The tune body
4.1 Pitch
4.2 Accidentals
4.3 Note lengths
4.4 Broken rhythm
4.5 Rests
4.6 Clefs and transposition
4.7 Beams
4.8 Repeat/bar symbols
4.9 First and second repeats
4.10 Variant endings
4.11 Ties and slurs
4.12 Grace notes
4.13 Duplets, triplets, quadruplets, etc.
4.14 Decorations
4.15 Symbol lines
4.16 Redefinable symbols
4.17 Chords and unisons
4.18 Chord symbols
4.19 Annotations
4.20 Order of abc constructs
5. Lyrics
5.1 Alignment
5.2 Verses
5.3 Numbering
6. Typesetting and playback
6.1 Typesetting
6.1.1 Typesetting line-breaks
6.1.2 Typesetting extra space
6.1.3 Typesetting information fields
6.2 Playback
7. Multiple voices
7.1 Voice properties
7.2 Breaking lines
7.3 Inline fields
7.4 Voice overlay
8. abc data format
8.1 Tune body
8.2 Text strings
9. Macros
9.1 Static macros
9.2 Transposing macros
10. Outdated syntax
10.1 Outdated information field syntax
10.2 Outdated dialects
10.2.1 Outdated line-breaking
10.2.2 Outdated decorations
10.2.3 Outdated chords
10.3 Outdated continuations
10.4 Outdated directives
10.5 Outdated file structure
10.5.1 Outdated tune header syntax
10.5.1 Outdated defaults
10.6 Outdated lyrics alignment
10.7 Other outdated syntax
2
10.7.1 Disallowed voice overlay
11. Stylesheet directives and pseudo-comments
11.0 Introduction to directives
11.0.1 Disclaimer
11.0.2 Stylesheet directives
11.1 Voice grouping
11.2 Instrumentation directives
11.3 Accidental directives
11.4 Formatting directives
11.4.1 Page format directives
11.4.2 Font directives
11.4.3 Space directives
11.4.4 Measure directives
11.4.5 Text directives
11.4.6 Information directives
11.4.7 Separation directives
11.4.8 Miscellaneous directives
11.5 Application specific directives
11.6 Further information about directives
12. Dialects, strict / loose interpretation and backwards compatibility
12.1 Dialect differences
12.1.1 Line-breaking dialects
12.1.2 Decoration dialects
12.1.3 Chord dialects
12.2 Loose interpretation
12.3 Strict interpretation
13. Sample abc tunes
13.1 English.abc
13.2 Strspys.abc
13.3 Reels.abc
13.4 Canzonetta.abc
14. Appendix
14.1 Supported accents & ligatures
14.2 Errata
Back to top
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.
Back to top
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 [http://en.wikipedia.org/wiki/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
[http://www.iana.org/assignments/media-types/text/vnd.abc]).
6
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.
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
a file header
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>
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.
8
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.
Back to top
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
9
Field name file header tune header tune body inline type Examples and notes
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, <[email protected]>
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.
10
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.
11
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"
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.
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, <[email protected]>
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.
12
Z:abc-transcription John Smith, <[email protected]>, 1st Jan 2010
Z:abc-edited-by Fred Bloggs, <[email protected]>, 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
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
13
Mode Ionian Aeolian Mixolydian Dorian Phrygian Lydian Locrian
Key Signature Major Minor
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
14
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 [http://en.wikipedia.org/wiki/UTF-8] and ISO-8859 [http://en.wikipedia.org/wiki/ISO/IEC_8859]
can be found on wikipedia.
Version field
Every abc file conforming to this standard should start with the line
%abc-2.1
15
(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.
For W: and w: see lyrics.
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.
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.
Back to top
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.
17
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.
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.
18
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 be treble, alto, tenor, bass, perc or none. perc selects 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
19
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
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.
20
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> |]
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 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> :|
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.
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.
Symbol Meaning
(2 2 notes in the time of 3
22
Symbol
(3 Meaning
3 notes in the time of 2
(4 4 notes in the time of 3
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:
. 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:
!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 !>!
23
!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
24
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!|
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, [, ], | or : signs, e.g. while !dacapo! is legal, !da capo! is not.
If an unimplemented or unknown symbol is found, it should be ignored.
Recommendation: A good source of general information about decorations can be found at
http://www.dolmetsch.com/musicalsymbols.htm [http://www.dolmetsch.com/musicalsymbols.htm].
4.15 Symbol lines
Adding many symbols to a line of music can make a tune difficult to read. In such cases, a symbol line (a line that contains
only !…! decorations, "…" chord symbols or annotations) can be used, analogous to a line of lyrics.
A symbol line starts with s:, followed by a line of symbols. Matching of notes and symbols follow the alignment rules
defined for lyrics (meaning that symbols in an s: line cannot be aligned on grace notes, rests or spacers).
Example:
CDEF | G```AB`c
s: "^slow" | !f! ** !fff!
You can also use "^text", etc (see annotations below) in definitions
Example: To print a plus sign over notes, define p as follows and use it before the required notes:
U: p = "^+"
25
Symbol definitions can be written in the file header, in which case they apply to all the tunes in that file, or in a tune header,
when they apply only to that tune, and override any previous definitions. Programs may also make use of a set of global
default definitions, which apply everywhere unless overridden by local definitions. You can assign the same symbol to two
or more letters e.g.
U: T = !trill!
U: U = !trill!
in which case the same visible symbol will be produced by both letters (but they may be played differently), and you can de-
assign a symbol by writing:
U: T = !nil!
or
U: T = !none!
The standard set of definitions (if you do not redefine them) is:
U: ~ = !roll!
U: H = !fermata!
U: L = !accent!
U: M = !lowermordent!
U: O = !coda!
U: P = !uppermordent!
U: S = !segno!
U: T = !trill!
U: u = !upbow!
U: v = !downbow!
but there should be no spaces within the notation for a chord. See the tune 'Kitchen Girl' in the sample file Reels.abc for a
simple example.
All the notes within a chord should normally have the same length, but if not, the chord duration is that of the first note.
Recommendation: Although playback programs should not have any difficulty with notes of different lengths, typesetting
programs may not always be able to render the resulting chord to staff notation (for example, an eighth and a quarter note
cannot be represented on the same stem) and the result is undefined. Consequently, this is not recommended.
More complicated chords can be transcribed with the & operator (see voice overlay).
The chord forms a syntactic grouping, to which the same prefixes and postfixes can be attached as to an ordinary note
(except for accidentals which should be attached to individual notes within the chord and decorations which may be
attached to individual notes within the chord or may be attached to the chord as a whole).
Example:
( "^I" !f! [CEG]- > [CEG] "^IV" [F=AC]3/2"^V"[GBD]/ H[CEG]2 )
26
When both inside and outside the chord length modifiers are used, they should be multiplied. Example: [C2E2G2]3 has
the same meaning as [CEG]6.
If the chord contains two notes of the same pitch, then it is a unison (e.g. a note played on two strings of a violin
simultaneously) and is shown with one stem and two note-heads.
Example:
[DD]
4.19 Annotations
General text annotations can be added above, below or on the staff in a similar way to chord symbols. In this case, the
string within double quotes is preceded by one of five symbols ^, _, <, > or @ which controls where the annotation is to be
placed; above, below, to the left or right respectively of the following note, rest or bar line. Using the @ symbol leaves the
exact placing of the string to the discretion of the interpreting program. These placement specifiers distinguish annotations
from chord symbols, and should prevent programs from attempting to play or transpose them. All text that follows the
placement specifier is treated as a text string.
Where two or more annotations with the same placement specifier are placed consecutively, e.g. for fingerings, the notation
program should draw them on separate lines, with the first listed at the top.
Example: The following annotations place the note between parentheses.
"<(" ">)" C
27
Each tie symbol, -, should come immediately after a note group but may be followed by a space, i.e. =G,2- . Open and
close chord delimiters, [ and ], should enclose entire note sequences (except for chord symbols), e.g.
"C"[CEGc]|
|"Gm7"[.=G,^c']
and open and close slur symbols, (), should do likewise, i.e.
"Gm7"(v.=G,2~^c'2)
Back to top
5. Lyrics
The W: information field (uppercase W) can be used for lyrics to be printed separately below the tune.
The w: information field (lowercase w) in the tune body, supplies lyrics to be aligned syllable by syllable with previous notes
of the current voice.
5.1 Alignment
When adjacent, w: fields indicate different verses (see below), but for non-adjacent w: fields, the alignment of the lyrics:
starts at the first note of the voice if there is no previous w: field; or
starts at the first note after the notes aligned to the previous w: field; and
associates syllables to notes up to the end of the w: line.
Example: The following two examples are equivalent.
C D E F|
w: doh re mi fa
G A B c|
w: sol la ti doh
C D E F|
G A B c|
w: doh re mi fa sol la ti doh
Comment: The second example, made possible by an extension (introduced in abc 2.1) of the alignment rules, means that
lyrics no longer have to follow immediately after the line of notes to which they are attached. Indeed, the placement of the
lyrics can be postponed to the end of the tune body. However, the extension of the alignment rules is not fully backwards
compatible with abc 2.0 - see outdated lyrics alignment for an explanation.
If there are fewer syllables than available notes, the remaining notes have no lyric (blank syllables); thus the appearance of a
w: field associates all the notes that have appeared previously with a syllable (either real or blank).
Example: In the following example the empty w: field means that the 4 G notes have no lyric associated with them.
C D E F|
w: doh re mi fa
G G G G|
w:
F E F C|
w: fa mi re doh
If there are more syllables than available notes, any excess syllables will be ignored.
Recommendation for developers: If a w: line does not contain the correct number of syllables for the corresponding notes,
the program should warn the user. However, having insufficient syllables is legitimate usage (as above) and so the program
may allow these warnings to be switched off.
Note that syllables are not aligned on grace notes, rests or spacers and that tied, slurred or beamed notes are treated as
separate notes in this context.
The lyrics lines are treated as text strings. Within the lyrics, the words should be separated by one or more spaces and to
correctly align them the following symbols may be used:
28
Symbol Meaning
- (hyphen) break between syllables within a word
_ (underscore) previous syllable is to be held for an extra note
* one note is skipped (i.e. * is equivalent to a blank syllable)
~ appears as a space; aligns multiple words under one note
\- appears as hyphen; aligns multiple syllables under one note
| advances to the next bar
Note that if - is preceded by a space or another hyphen, the - is regarded as a separate syllable.
When an underscore is used next to a hyphen, the hyphen must always come first.
If there are not as many syllables as notes in a measure, typing a | automatically advances to the next bar; if there are
enough syllables the | is just ignored.
Examples:
w: syll-a-ble is aligned with three notes
w: syll-a--ble is aligned with four notes
w: syll-a -ble (equivalent to the previous line)
w: time__ is aligned with three notes
w: of~the~day is treated as one syllable (i.e. aligned with one note)
but appears as three separate words
CDEF FEDC|
w: these are the lyr-ics
+: for verse one
w: these are the lyr-ics
+: for verse two
5.3 Numbering
VOLATILE: The following syntax may be extended to include non-numeric "numbering".
If the first word of a w: line starts with a digit, this is interpreted as numbering of a stanza. Typesetting programs should
align the corresponding note with the first letter that occurs. This can be used in conjunction with the ~ symbol mentioned
in the table above to create a space between the digit and the first letter.
Example: In the following, the 1.~Three is treated as a single word with a space created by the ~, but the fact that the w:
line starts with a number means that the first note of the corresponding music line is aligned to Three.
w: 1.~Three blind mice
Back to top
"I:linebreak !" indicates that the ! symbol is used to typeset a score line-break. Any code line-breaks are
ignored for typesetting purposes.
Comment: The "I:linebreak !" instruction works in the same way as I:linebreak $ and is primarily provided for
backwards compatibility - see line-breaking dialects, so that "I:linebreak $" is the preferred usage. "I:linebreak
!" also automatically invokes the "I:decoration +" instruction - see decoration dialects. Finally, "I:linebreak !" is
equivalent to the deprecated directive %%continueall true - see outdated directives.
"I:linebreak <EOL>" indicates that the End Of Line character (CR, LF or CRLF) is used to typeset a score line-
break. In other words, code line-breaks are used for typesetting score line-breaks.
"I:linebreak <none>" indicates that all line-breaking is to be carried out automatically and any code line-
breaks are ignored for typesetting purposes.
The values <EOL>, $ and ! may also be combined so that more that one symbol can indicate a score line-break.
The default line-break setting is:
I:linebreak <EOL> $
meaning that both code line-breaks, and $ symbols, generate a score line-break.
Comment: Although "I:linebreak $ !" is legal it is not recommended as it uses two different symbols to mean the
same thing.
An I:linebreak instruction can be used either in the file header (in which case it is applied to every tune in the abc file),
or in a tune header (in which case it is applied to that tune only and overrides a line-breaking instruction in the file header).
30
Similarly, if two I:linebreak instructions appear in a file header or a tune header, the second cancels the first.
Comment: It can be sometimes be useful to include two instructions together - for example, "I:linebreak <EOL> $"
and "I:linebreak <none>" can be used to toggle between default and automatic line-breaking simply by swapping
the position of the two lines.
I:linebreak instructions are not allowed in the tune body (principally because it conflicts with the human readability of
the music code).
Suppressing score line-breaks
When the <EOL> character is being used in the tune body to indicate score line-breaks, it sometimes useful to be able to
tell typesetting software to ignore a particular code line-breaks. This is achieved using a backslash (\) at the end of a line of
music code. The backslash may be followed by trailing whitespace and/or comments, since they are removed before the line
is processed.
Example: The following two excerpts are considered equivalent and should be typeset as a single staff in the printed score.
abc cba|\ % end of line comment
abc cba|
The backslash effectively joins two lines together for processing so if space is required between the two half lines (for
example, to prevent the notes from being beamed together), it can be placed before the backslash, or at the beginning of
the next half line.
Example: The following three excerpts are considered equivalent.
abc \
cba|
abc\
cba|
abc cba|
There is no limit to the number of lines that may be joined together in this way. However, a backslash must not be used
before an empty line.
Example: The following is legal.
cdef|\
\
cedf:|
cdef:|
In the examples above, where a line of music code follows immediately after a line ending in backslash, the backslash acts
as a continuation for two lines of music code and can therefore be used to split up long music code lines.
More importantly, however, any information fields and stylesheet directives are processed (and comments are removed) at
the point where the physical line-break occurs. Hence the backslash is commonly used to include meter or key changes
halfway through a line of music.
Example: The following should be typeset as a single staff in the printed score.
abc cab|\
%%setbarnb 10
M:9/8
%comment
abc cba abc|
Alternative usage example: The above could also be achieved using inline fields, the I:<directive> form instead of %%
<directive> and a r:remark in place of the comment, i.e.
31
Finally, note that if the the <EOL> character is not being used to indicate score line-breaks, then the backslash is effectively
redundant.
Recommendation to users: If you find that you are using backslash symbols on most lines of music code, then consider
instead using "I:linebreak <none>" or "I:linebreak $" which will mean that all the code line-breaks will be
ignored for the purposes of generating score line-breaks (and, in the latter case, you can encode a score line-breaks with
the $ character).
6.1.2 Typesetting extra space
y can be used to add extra space between the surrounding notes; moreover, chord symbols and decorations can be
attached to it, to separate them from notes.
Example:
"Am" !pp! y
Note that the y symbol does not create rests in the music.
6.2 Playback
Many of the information fields are ignored by playback programs - exceptions are I:, K:, L:, M:, m:, P;, Q:, s:, U: and
V:.
In addition, playback programs that store their output in file types which have provisions for metadata (e.g. MIDI, ogg, mp3),
may record the contents the T:, C:, w: and W: fields in that metadata.
Furthermore, playback programs may use the R: field to infer stress patterns in a tune (i.e. to make playback closer to real
music, by for example, placing more stress on the first note in each bar); however, such usage is not standardised.
Most playback customisation is handled by instrumentation directives.
Back to top
7. Multiple voices
VOLATILE: Multi-voice music is under active review, with discussion about control voices and interaction between P:, V:
and T: fields. It is intended that the syntax will be finalised in abc 2.2.
The V: field allows the writing of multi-voice music. In multi-voice abc tunes, the tune body is divided into several voices,
each beginning with a V: field. All the notes following such a V: field, up to the next V: field or the end of the tune body,
belong to the voice.
The basic syntax of the field is:
32
V:ID
where ID can be either a number or a string, that uniquely identifies the voice in question. When using a string, only the first
20 characters of it will be distinguished. The ID will not be printed on the staff; it's only function is to indicate, throughout
the abc tune, which music line belongs to which voice.
Example:
X:1
T:Zocharti Loch
C:Louis Lewandowski (1821-1894)
M:C
Q:1/4=76
%%score (T1 T2) (B1 B2)
V:T1 clef=treble-8 name="Tenore I" snm="T.I"
V:T2 clef=treble-8 name="Tenore II" snm="T.II"
V:B1 middle=d clef=bass name="Basso I" snm="B.I" transpose=-24
V:B2 middle=d clef=bass name="Basso II" snm="B.II" transpose=-24
K:Gm
% End of header, start of tune body:
% 1
[V:T1] (B2c2 d2g2) | f6e2 | (d2c2 d2)e2 | d4 c2z2 |
[V:T2] (G2A2 B2e2) | d6c2 | (B2A2 B2)c2 | B4 A2z2 |
[V:B1] z8 | z2f2 g2a2 | b2z2 z2 e2 | f4 f2z2 |
[V:B2] x8 | x8 | x8 | x8 |
% 5
[V:T1] (B2c2 d2g2) | f8 | d3c (d2fe) | H d6 ||
[V:T2] z8 | z8 | B3A (B2c2) | H A6 ||
[V:B1] (d2f2 b2e'2) | d'8 | g3g g4 | H^f6 ||
[V:B2] x8 | z2B2 c2d2 | e3e (d2c2) | H d6 ||
This layout closely resembles printed music, and permits the corresponding notes on different voices to be vertically aligned
so that the chords can be read directly from the abc. The addition of single remark lines "%" between the grouped staves,
indicating the bar numbers, also makes the source more legible.
Here follows the visible output:
V: can appear both in the body and the header. In the latter case, V: is used exclusively to set voice properties. For
example, the name property in the example above, specifies which label should be printed on the first staff of the voice in
question. Note that these properties may be also set or changed in the tune body. The V: properties are fully explained
below.
Please note that the exact grouping of voices on the staff or staves is not specified by V: itself. This may be specified with
the %%score stylesheet directive. See voice grouping for details.
For playback, see instrumentation directives for details of how to assign a General MIDI instrument to a voice using a
%%MIDI stylesheet directive.
Although it is not recommended, the tune body of fragment X:1, could also be notated this way:
X:2
T:Zocharti Loch
33
%...skipping rest of the header...
K:Gm
% Start of tune body:
V:T1
(B2c2 d2g2) | f6e2 | (d2c2 d2)e2 | d4 c2z2 |
(B2c2 d2g2) | f8 | d3c (d2fe) | H d6 ||
V:T2
(G2A2 B2e2) | d6c2 | (B2A2 B2)c2 | B4 A2z2 |
z8 | z8 | B3A (B2c2) | H A6 ||
V:B1
z8 | z2f2 g2a2 | b2z2 z2 e2 | f4 f2z2 |
(d2f2 b2e'2) | d'8 | g3g g4 | H^f6 ||
V:B2
x8 | x8 | x8 | x8 |
x8 | z2B2 c2d2 | e3e (d2c2) | H d6 ||
In the example above, each V: label occurs only once, and the complete part for that voice follows. The output of tune X:2
will be exactly the same as the output of tune X:1; the source code of X:1, however, is much easier to read.
7.1 Voice properties
VOLATILE: See above.
V: fields can contain voice specifiers such as name, clef, and so on. For example,
indicates that voice T will be drawn on a staff labelled Tenor, using the treble clef with a small 8 underneath. Player
programs will transpose the notes by one octave. Possible voice definitions include:
name="voice name" - the voice name is printed on the left of the first staff only. The characters \n produce a
newline in the output.
subname="voice subname" - the voice subname is printed on the left of all staves but the first one.
stem=up/down - forces the note stem direction.
clef= - specifies a clef; see clefs and transposition for details.
The name specifier may be abbreviated to nm=. The subname specifier may be abbreviated to snm=.
Applications may implement their own specifiers, but must gracefully ignore specifiers they don't understand or implement.
This is required for portability of abc files between applications.
34
A2 | c d e f g a &\
A A A A A A &\
F E D C B, A, |]
Words in w: lines (and symbols in s: lines) are matched to the corresponding notes as per the normal rules for lyric
alignment (see lyrics), disregarding any overlay in the accompanying music code.
Example:
g4 f4 | e6 e2 |
&& (d8 | c6) c2|
w: ha-la-| lu-yoh
+: lu- | -yoh
This revokes the abc 2.0 usage of & in w: and s: lines, which is now deprecated (see disallowed).
Back to top
Programs that have difficulty typesetting accented letters may reduce them to the base letter or, in the case of ligatures, the
two base letters ignoring the backslash.
Examples: When reduced to the base letter, \oA becomes A, \"o becomes o, \ss becomes ss, \AE becomes AE, etc.
For fixed width unicode, \u or \U must be followed by 4 or 8 hexadecimal characters respectively. Thus if any of the 4
characters after \u is not hexadecimal, then it is interpreted as a breve.
Special characters
Characters that are meaningful in the context of a text string can be escaped using a backslash as follows:
type \\ to get a backslash;
type \% to get a percent symbol that is not interpreted as the start of a comment;
type \& to get an ampersand that is not interpreted as the start of a named html entity (although an ampersand
followed by white-space is interpreted as is - for example, gin & tonic is OK, but G\&T requires the backslash);
36
type " or \u0022 to get double quote marks in an annotation
Special symbols
The following symbols are also useful:
type © or \u00a9 for the copyright symbol ©
type \u266d for a flat symbol ♭
type \u266e for a natural symbol ♮
type \u266f for a sharp symbol ♯
VOLATILE: Finally note that currently the specifiers $1, $2, $3 and $4 can be used to change the font within a text string.
However, this feature is likely to change in future versions of the standard - see font directives for more details.
Back to top
9. Macros
This standard defines an optional system of macros which is principally used to define the way in which ornament symbols
such as the tilde ~ are played (although it could be used for many other purposes).
Software implementing these macros, should first expand the macros defined in this section, and only afterwards apply any
relevant U: replacement (see Redefinable symbols).
When these macros are stored in an abc header file (see include field), they may form a powerful library.
There are two kinds of macro, called Static and Transposing.
When you play the tune, the program searches the tune header for macro definitions, then does a search and replace on its
internal copy of the text before passing that to the parser which plays the tune. Every occurence of ~G3 in the tune is
replaced by G{A}G{F}G, and that is what gets played. Only ~G3 notes are affected, ~G2, ~g3, ~F3 etc. are ignored.
You can put in as many macros as you want, and indeed, if you only use static macros you will need to write a separate
macro for each combination of pitch and note-length. Here is an example:
X:50
T:Apples in Winter
S:Trad, arr. Paddy O'Brien
R:jig
m: ~g2 = {a}g{f}g
m: ~D2 = {E}D{C}D
M:6/8
K:D
G/2A/2|BEE dEE|BAG FGE|~D2D FDF|ABc ded|
BEE BAB|def ~g2 e|fdB AGF|GEE E2:|
d|efe edB|ege fdB|dec dAF|DFA def|
[1efe edB|def ~g2a|bgb afa|gee e2:|
[2edB def|gba ~g2e|fdB AGF|GEE E2||
Here I have put in two static macros, since there are two different notes in the tune marked with a tilde.
A static macro definition consists of four parts:
the field identifier m:
the target string - e.g ~G3
the equals sign
the replacement string - e.g. G{A}G{F}G
The target string can consist of any string up to 31 characters in length, except that it may not include the letter 'n', for
reasons which will become obvious later. You don't have to use the tilde, but of course if you don't use a legal combination
of abc, other programs will not be able to play your tune.
The replacement string consists of any legal abc text up to 200 characters in length. It's up to you to ensure that the target
and replacement strings occupy the same time interval (the program does not check this). Both the target and replacement
37
strings may include spaces if necessary, but leading and trailing spaces are stripped off so
m:~g2={a}g{f}g
38
Disallowed syntax has the same definition as obsolete syntax, but has not gone through a formal process of
deprecation.
Outdated syntax is the collective term for deprecated, obsolete and disallowed syntax.
Please see http://www.ietf.org/rfc/rfc2119.txt [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 in this
context.
Outdated abc syntax is listed below so that users who come across it are able to interpret (and preferably update) it
according to the latest standard.
10.1 Outdated information field syntax
The A: field was originally used to contain area information. In version 2.0 this was changed to contain the name of the
lyrics author. In version 2.1, to maintain backwards compatibility, this has been changed back to area, but for clarity, the A:
field is deprecated - area information can be stored in the O: field and a new field (to be decided) will be used for author
information.
Comment: Of the 160,000 tunes currently available in the abcnotation.com tune search [https://abcnotation.com/search]
16,300 contain an A: field with 680 distinct values. Of these, only around 10 contain author information rather than area
(in some cases it is difficult to tell).
An E: field was once used by abc2mtex to explicitly control note spacing; this is no longer necessary with current
formatting algorithms and the E: field is now deprecated.
The original usage of the H: history field, where the contents of the history field is considered to continue over several lines
until the next field occurs, is now deprecated.
The Q: tempo field is still very much in use, but earlier versions of the standard permitted two syntax variants, now
deprecated, which specified how many unit note lengths to play per minute.
Examples: Both examples mean "play 120 unit note-lengths per minute".
Q:C=120
Q:120
This is not very musical, and the usage is deprecated. However, there are many abc files which employ this syntax and
programs should accept it.
40
In the first excerpt the lyrics follow immediately after the line of music code to which they are attached.
In the second excerpt, the lyrics are postponed to the end of the tune, arguably aiding readability substantially and meaning
that each verse is contiguous. The comment lines in the second excerpt (those lines beginning with %) are added for
readability and are entirely optional.
D2DE G2GG|A2EE ED-D2|c2cc B2AG|
w:1\-~Si les ma-tins de gri-sail-le se tein-tent,*s'ils ont cou-leur en la
w:2\-~Si mo-ri-bonds sont les rois en ri-pail-le,*si leurs pri-sons sont des
w:3\-~Si mill' so-leils de mé-tal pren-nent voi-le,*dix mill' so-leils de cris-
w:4\-~Si mill' bri-gands à l'en-can font par-ta-ge,*dix mille en-fants des tor-
A2B^c d4|e2ee d2BA|G2EF GABc|
w:nuit qui s'é-teint, vien-dront d'o-pal's len-de-mains, re-vien-dront les siè-cles
w:ca-ges sans fond, vien-ne l'heur' des é-va-sions,******
w:\-tal font mer-veille vienn'nt des lu-eurs de ver-meil,******
w:\-rents font ar-gent, vien-nent des fleurs de sa-fran,******
%
% music
%
D2DE G2GG|A2EE ED-D2|c2cc B2AG|
A2B^c d4|e2ee d2BA|G2EF GABc|
%
% lyrics
%
w:1\-~Si les ma-tins de gri-sail-le se tein-tent,*s'ils ont cou-leur en la
+:nuit qui s'é-teint, vien-dront d'o-pal's len-de-mains, re-vien-dront les siè-cles
%
w:2\-~Si mo-ri-bonds sont les rois en ri-pail-le,*si leurs pri-sons sont des
+:ca-ges sans fond, vien-ne l'heur' des é-va-sions,******
%
w:3\-~Si mill' so-leils de mé-tal pren-nent voi-le,*dix mill' so-leils de cris-
+:\-tal font mer-veille vienn'nt des lu-eurs de ver-meil,******
%
w:4\-~Si mill' bri-gands à l'en-can font par-ta-ge,*dix mille en-fants des tor-
+:\-rents font ar-gent, vien-nent des fleurs de sa-fran,******
Unfortunately, however, this extension is not fully backwards compatible with abc 2.0.
The difficulty arises when there is a line (or lines) of music code without lyrics attached, followed by a line with lyrics
attached.
Example: In the following excerpt, using abc 2.0 the lyrics would be aligned with the adjacent music code, i.e. with cdef;
using abc 2.1 they would be aligned at the start of the tune (or voice), i.e. with CDEF.
CDEF|
FEDC|
cdef|]
w:these are lyr-ics
The work around for users who have files with such usage is either to avoid writing %abc-2.1 as the file identifier or to
add an empty w: field after the final line of music code that should be without lyrics.
Example: The following excerpt should be treated the same way (with regard to lyrics alignment) under abc 2.0 and abc 2.1.
Under abc 2.1 the empty w: field means that the lyrics are aligned with cdef.
CDEF|
FEDC|
w:
cdef|]
w:these are lyr-ics
Alternatively, any stylesheet directive may be written as an I:instruction field although this is not recommended for
usages which have not been standardised (i.e. it is not recommended for any directives described in section 11).
Examples: Not recommended.
I:papersize A4
I:newpage
I:setbarnb 10
Inline field notation may be used to place a stylesheet directive in the middle of a line of music:
Example:
CDEFG|[I:setbarnb 10]ABc
The score directive specifies which voices should be printed in the score and how they should be grouped on the staves.
Voices that are enclosed by parentheses () will go on one staff. Together they form a voice group. A voice that is not
enclosed by parentheses forms a voice group on its own that will be printed on a separate staff.
If voice groups are enclosed by curly braces {}, the corresponding staves will be connected by a big curly brace printed in
front of the staves. Together they form a voice block. This format is used especially for typesetting keyboard music.
If voice groups or braced voice blocks are enclosed by brackets [], the corresponding staves will be connected by a big
bracket printed in front of the staves. Together they form a voice block.
If voice blocks or voice groups are separated from each other by a | character, continued bar lines will be drawn between
the associated staves.
Example:
%%score Solo [(S A) (T B)] {RH | (LH1 LH2)}
If a single voice surrounded by two voice groups is preceded by a star (*), the voice is marked to be floating. This means
that the voice won't be printed on it's own staff; rather the software should automatically determine, for each note of the
voice, whether it should be printed on the preceding staff or on the following staff.
Software that does not support floating voices may simply print the voice on the preceding staff, as if it were part of the
preceding voice group.
Examples:
%%score {RH *M| LH}
%%score {(RH1 RH2) *M| (LH1 LH2)}
String parts in an orchestral work are usually bracketed together and the top two (1st/2nd violins) then braced outside the
bracket:
%%score [{Vln1 | Vln2} | Vla | Vc | DB]
Any voices appearing in the tune body will only be printed if it is mentioned in the score directive.
When the score directive occurs within the tune body, it resets the music generator, so that voices may appear and
disappear for some period of time.
If no score directive is used, all voices that appear in the tune body are printed on separate staves.
See Canzonetta.abc for an extensive example.
An alternative directive to %%score is %%staves.
Both %%score and %%staves directives accept the same parameters, but measure bar indications work the opposite way.
Therefore, %%staves [S|A|T|B] is equivalent to %%score [S A T B] and means that continued bar lines are not
drawn between the associated staves, while %%staves [S A T B] is equivalent to %%score [S|A|T|B] and means
that they are drawn.
Assigns a MIDI instrument to the indicated abc voice. The MIDI instruments are organized in banks of 128 instruments each.
Both the instruments and the banks are numbered starting from one.
The General MIDI (GM) standard defines a portable, numbered set of 128 instruments (numbered from 1-128) - see
http://www.midi.org/techspecs/gm1sound.php [http://www.midi.org/techspecs/gm1sound.php]. The GM instruments can be
43
used by selecting bank one. Since the contents of the other MIDI banks is platform dependent, it is highly recommended to
only use the first MIDI bank in tunes that are to be distributed.
The default bank number is 1 (one).
Example: The following assigns GM instrument 59 (tuba) to voice 'Tb'.
%%MIDI voice Tb instrument=59
You can use the keyword mute to mute the specified voice.
Some abc players can automatically generate an accompaniment based on the chord symbols specified in the melody line.
To suggest a GM instrument for playing this accompaniment, use the following directive:
%%MIDI chordprog 20 % Church organ
When set to not, accidentals apply only to the note they're attached to. When set to octave, accidentals also apply to all
the notes of the same pitch in the same octave up to the end of the bar. When set to pitch, accidentals also apply to all
the notes of the same pitch in all octaves up to the end of the bar.
The default value is pitch.
%%writeout-accidentals none | added | all
When set to none, modifying or explicit accidentals that appear in the key signature field (K:) are printed in the key
signature. When set to added, only the accidentals belonging to the mode indicated in the K: field, are printed in the key
signature. Modifying or explicit accidentals are printed in front of the notes to which they apply. When set to all, both the
accidentals belonging to the mode and possible modifying or explicit accidentals are printed in front of the notes to which
they apply; no key signature will be printed.
The default value is none.
44
%%botmargin <length>
%%leftmargin <length>
%%rightmargin <length>
%%indent <length>
%%landscape <logical>
The specifiers $1, $2, $3 and $4 can be used to change the font within a text string. The font to be used can be specified
with the %%setfont-n directives. $0 resets the font to its default value. $$ gives an actual dollar sign.
%%setfont-1 <font name> <size>
%%setfont-2 <font name> <size>
%%setfont-3 <font name> <size>
%%setfont-4 <font name> <size>
45
%%... <text string>
%%endtext
Notes:
%%text prints the following text, treated as a text string.
%%center prints the following text, treated as a text string and centred.
%%begintext and %%endtext mark a section of lines, each of which start with %%, followed by some text. It is
an alternative to several %%text lines. [Important note: some extensions offered by abc software programs relax
the rule that each line between %%begintext and %%endtext must start with %%. Whilst this should not cause
problems for typeset text between tunes, typeset text within a tune header or tune body should respect this rule and,
in particular, must not introduce blank lines.]
See further information about directives for more details and to find out about additional parameters for these directives.
Recommendation for users: If you are using text directives for tune-specific information, consider instead using one of the
background information fields together with a %%writefields directive (see information directives) so that the
information can correctly identified by databasing software.
11.4.6 Information directives
VOLATILE: The %%writefields directive and its formatting options are likely to be enhanced when markup is considered
in abc 2.3. See also the section 11 disclaimer.
%%writefields <list of field identifiers> [<logical>]
The %%writefields directive allows users to choose which string-type information fields appear in the printed score
(see the information fields table for a list of string-type fields). It is followed by a list of field identifiers and, optionally, the
logical value true or false. If the logical value is missing it is taken as true.
The %%writefields directive also applies to certain instruction fields - namely X:reference number, P:parts
and Q:tempo.
The default is "%%writefields TCOPQwW" meaning that the title (T), composer (C), origin (O), parts (P), tempo (Q),
aligned words (w) and other words (W) are printed out by default (see typesetting information fields for how these should be
typeset). Each subseqent %%writefields directive combines with this list, rather than overriding it.
Examples:
%%writefields O false % the O field is not printed out - other defaults remain
%%writefields X % the X: field is printed out
%%writefields BCDFGHNORSTWwXZ % all string-type fields are printed out
Typesetting software conforming to abc 2.1 may format the information strings in any way it chooses.
Comment: The %%writefields directive can be used in place of a number of directives introduced in abc 2.0:
"%%writefields X" can be used as an alternative to "%%withxrefs"
"%%writefields Ww false" can be used as an alternative to"%%musiconly"
"%%writefields" is a partial alternative to "%%writehistory" and "%%infoname"
See further information about directives for more details of the 2.0 alternatives.
See further information about directives for more details and to find out about additional parameters for these directives.
11.4.8 Miscellaneous directives
VOLATILE: See the section 11 disclaimer.
46
%%exprabove <logical>
%%exprbelow <logical>
%%graceslurs <logical> % grace notes slur to main note
%%infoline <logical> % rhythm and origin on the same line
%%oneperpage <logical>
%%vocalabove <logical>
%%freegchord <logical> % print '#', 'b' and '=' as they are
%%printtempo <logical>
Back to top
Finally a new line-breaking symbol, $, has been introduced as an alternative to using code line-breaks.
Comment: The $ symbol is effectively a replacement for !. It is aimed at those users who want ! as the decoration delimiter
but who prefer to use code line-breaks without generating corresponding score line-breaks.
12.1.2 Decoration dialects
Decorations are delimited using the ! symbol - see decorations.
In the past the + symbol has instead been used to denote decorations - this symbol is now deprecated for decorations.
Comment: Decorations were first introduced in draft standard 1.7.6 (which was never formally adopted) with the ! symbol.
In abc 2.0 (adopted briefly whilst discussions about abc 2.1 were taking place) this was changed to the + symbol. Neither
are in widespread use, but the ! symbol is much more common - of the 160,000 tunes currently available in the
abcnotation.com tune search [https://abcnotation.com/search], only around 100 (0.07%) use the + symbol to delimit
decorations, whereas around 1,350 (0.85%) use the ! symbol.
Users who wish to continue using the + symbol for decorations merely need to include the "I:decoration +" directive,
either in the file header or individually tune by tune - see decorations. All +…+ decorations will then be treated as if they
were the corresponding !…! decoration and any !…! decorations will generate an error message.
Note that the "I:decoration +" directive is automatically invoked by the "I:linebreak !" directive. Also note that
the !+! decoration has no + equivalent - +plus+ should be used instead.
Recommendation for users: Given the very small uptake of the + symbol for decorations, "I:decoration +" directive is
not recommended. However, it is retained for users who wish to use the ! symbol for line-breaking in legacy abc files.
For completeness the "I:decoration !", the default setting, is also available to allow individual tunes to use !…!
decorations in a file where "I:decoration +" is set in the file header.
X:1 % tune no 1
T:Dusty Miller, The % title
T:Binny's Jig % an alternative title
C:Trad. % traditional
R:DH % double hornpipe
M:3/4 % meter
K:G % key
B>cd BAG|FA Ac BA|B>cd BAG|DG GB AG:|
Bdd gfg|aA Ac BA|Bdd gfa|gG GB AG:|
BG G/2G/2G BG|FA Ac BA|BG G/2G/2G BG|DG GB AG:|
W:Hey, the dusty miller, and his dusty coat;
W:He will win a shilling, or he spend a groat.
W:Dusty was the coat, dusty was the colour;
W:Dusty was the kiss, that I got frae the miller.
X:2
T:Old Sir Simon the King
C:Trad.
S:Offord MSS % from Offord manuscript
N:see also Playford % reference note
M:9/8
R:SJ % slip jig
N:originally in C % transcription note
K:G
D|GFG GAG G2D|GFG GAG F2D|EFE EFE EFG|A2G F2E D2:|
D|GAG GAB d2D|GAG GAB c2D|[1 EFE EFE EFG|A2G F2E D2:|\ % no line-break in score
M:12/8 % change of meter
[2 E2E EFE E2E EFG|\ % no line-break in score
M:9/8 % change of meter
A2G F2E D2|]
X:3
T:William and Nancy
T:New Mown Hay
T:Legacy, The
C:Trad.
O:England; Gloucs; Bledington % place of origin
B:Sussex Tune Book % can be found in these books
B:Mally's Cotswold Morris vol.1 2
D:Morris On % can be heard on this record
P:(AB)2(AC)2A % play the parts in this order
M:6/8
K:G
[P:A] D|"G"G2G GBd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
[P:B] d|"G"e2d B2d|"C"gfe "G"d2d| "G"e2d B2d|"C"gfe "D7"d2c|
"G"B2B Bcd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
% changes of meter, using inline fields
[T:Slows][M:4/4][L:1/4][P:C]"G"d2|"C"e2 "G"d2|B2 d2|"Em"gf "A7"e2|"D7"d2 "G"d2|\
"C"e2 "G"d2|[M:3/8][L:1/8] "G"B2 d |[M:6/8] "C"gfe "D7"d2c|
"G"B2B Bcd|"C"e2e "G"dBG|"D7"A2d "G"BAG|"C"E2"D7"F "G"G2:|
13.2 Strspys.abc
49
%abc-2.1
M:4/4
O:Scottish
R:Strathspey
X:1
T:A. A. Cameron's
K:D
e<A A2 B>G d>B|e<A A2 d>g (3fed|e<A A2 B>G d>B|B<G G>B d>g (3fed:|
B<e e>f g>e a>f|B<e e>f g>e (3fed|B<e e>f g>e a>f|d<B G>B d>g (3fed:|
X:2
T:Atholl Brose
% in this example, which reproduces Highland Bagpipe gracing,
% the large number of grace notes mean that it is more convenient to be specific about
% score line-breaks (using the $ symbol), rather than using code line breaks to indicate them
I:linebreak $
K:D
{gcd}c<{e}A {gAGAG}A2 {gef}e>A {gAGAG}Ad|
{gcd}c<{e}A {gAGAG}A>e {ag}a>f {gef}e>d|
{gcd}c<{e}A {gAGAG}A2 {gef}e>A {gAGAG}Ad|
{g}c/d/e {g}G>{d}B {gf}gG {dc}d>B:|$
{g}c<e {gf}g>e {ag}a>e {gf}g>e|
{g}c<e {gf}g>e {ag}a2 {GdG}a>d|
{g}c<e {gf}g>e {ag}a>e {gf}g>f|
{gef}e>d {gf}g>d {gBd}B<{e}G {dc}d>B|
{g}c<e {gf}g>e {ag}a>e {gf}g>e|
{g}c<e {gf}g>e {ag}a2 {GdG}ad|
{g}c<{GdG}e {gf}ga {f}g>e {g}f>d|
{g}e/f/g {Gdc}d>c {gBd}B<{e}G {dc}d2|]
13.3 Reels.abc
%abc-2.1
M:4/4
O:Irish
R:Reel
X:1
T:Untitled Reel
C:Trad.
K:D
eg|a2ab ageg|agbg agef|g2g2 fgag|f2d2 d2:|\
ed|cecA B2ed|cAcA E2ed|cecA B2ed|c2A2 A2:|
K:G
AB|cdec BcdB|ABAF GFE2|cdec BcdB|c2A2 A2:|
X:2
T:Kitchen Girl
C:Trad.
K:D
[c4a4] [B4g4]|efed c2cd|e2f2 gaba|g2e2 e2fg|
a4 g4|efed cdef|g2d2 efed|c2A2 A4:|
K:G
ABcA BAGB|ABAG EDEG|A2AB c2d2|e3f edcB|ABcA BAGB|
ABAG EGAB|cBAc BAG2|A4 A4:|
13.4 Canzonetta.abc
%abc-2.1
%%pagewidth 21cm
%%pageheight 29.7cm
%%topspace 0.5cm
%%topmargin 1cm
%%botmargin 0cm
%%leftmargin 1cm
%%rightmargin 1cm
%%titlespace 0cm
%%titlefont Times-Bold 32
%%subtitlefont Times-Bold 24
%%composerfont Times 16
%%vocalfont Times-Roman 14
%%staffsep 60pt
%%sysstaffsep 20pt
%%musicspace 1cm
%%vocalspace 5pt
%%measurenb 0
%%barsperstaff 5
%%scale 0.7
X: 1
T: Canzonetta a tre voci
C: Claudio Monteverdi (1567-1643)
50
M: C
L: 1/4
Q: "Andante mosso" 1/4 = 110
%%score [1 2 3]
V: 1 clef=treble name="Soprano"sname="A"
V: 2 clef=treble name="Alto" sname="T"
V: 3 clef=bass middle=d name="Tenor" sname="B"
%%MIDI program 1 75 % recorder
%%MIDI program 2 75
%%MIDI program 3 75
K: Eb
% 1 - 4
[V: 1] |:z4 |z4 |f2ec |_ddcc |
w: Son que-sti~i cre-spi cri-ni~e
w: Que-sti son gli~oc-chi che mi-
[V: 2] |:c2BG|AAGc|(F/G/A/B/)c=A|B2AA |
w: Son que-sti~i cre-spi cri-ni~e que - - - - sto~il vi-so e
w: Que-sti son~gli oc-chi che mi-ran - - - - do fi-so mi-
[V: 3] |:z4 |f2ec|_ddcf |(B/c/_d/e/)ff|
w: Son que-sti~i cre-spi cri-ni~e que - - - - sto~il
w: Que-sti son~gli oc-chi che mi-ran - - - - do
% 5 - 9
[V: 1] cAB2 |cAAA |c3B|G2!fermata!Gz ::e4|
w: que-sto~il vi-so ond' io ri-man-go~uc-ci-so. Deh,
w: ran-do fi-so, tut-to re-stai con-qui-so.
[V: 2] AAG2 |AFFF |A3F|=E2!fermata!Ez::c4|
w: que-sto~il vi-so ond' io ri-man-go~uc-ci-so. Deh,
w: ran-do fi-so tut-to re-stai con-qui-so.
[V: 3] (ag/f/e2)|A_ddd|A3B|c2!fermata!cz ::A4|
w: vi - - - so ond' io ti-man-go~uc-ci-so. Deh,
w: fi - - - so tut-to re-stai con-qui-so.
% 10 - 15
[V: 1] f_dec |B2c2|zAGF |\
w: dim-me-lo ben mi-o, che que-sto\
=EFG2 |1F2z2:|2F8|] % more notes
w: sol de-si-o_. % more lyrics
[V: 2] ABGA |G2AA|GF=EF |(GF3/2=E//D//E)|1F2z2:|2F8|]
w: dim-me-lo ben mi-o, che que-sto sol de-si - - - - o_.
[V: 3] _dBc>d|e2AF|=EFc_d|c4 |1F2z2:|2F8|]
w: dim-me-lo ben mi-o, che que-sto sol de-si-o_.
Back to top
14. Appendix
14.1 Supported accents & ligatures
Conforming abc software must support the following encodings for accents and ligatures. It may offer support for other
named entities and hex unicode representations (which may be adopted by the standard at a later date).
For more details see text strings and for further information see, for example:
http://www.w3.org/TR/html4/sgml/entities.html [http://www.w3.org/TR/html4/sgml/entities.html]
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
[http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references]
http://en.wikipedia.org/wiki/List_of_Unicode_characters [http://en.wikipedia.org/wiki/List_of_Unicode_characters]
http://www.fileformat.info/info/unicode/char/search.htm [http://www.fileformat.info/info/unicode/char/search.htm] -
unicode character search
Accents:
51
Character Mnemonic Named html entity 16-bit hex unicode
ò \`o ò \u00f2
Ù \`U Ù \u00d9
ù \`u ù \u00f9
Á \'A Á \u00c1
á \'a á \u00e1
É \'E É \u00c9
é \'e é \u00e9
Í \'I Í \u00cd
í \'i í \u00ed
Ó \'O Ó \u00d3
ó \'o ó \u00f3
Ú \'U Ú \u00da
ú \'u ú \u00fa
Ý \'Y Ý \u00dd
ý \'y ý \u00fd
 \^A  \u00c2
â \^a â \u00e2
Ê \^E Ê \u00ca
ê \^e ê \u00ea
Î \^I Î \u00ce
î \^i î \u00ee
Ô \^O Ô \u00d4
ô \^o ô \u00f4
Û \^U Û \u00db
û \^u û \u00fb
Ŷ \^Y Ŷ \u0176
ŷ \^y ŷ \u0177
à \~A à \u00c3
ã \~a ã \u00e3
Ñ \~N Ñ \u00d1
ñ \~n ñ \u00f1
Õ \~O Õ \u00d5
õ \~o õ \u00f5
Ä \"A Ä \u00c4
ä \"a ä \u00e4
Ë \"E Ë \u00cb
ë \"e ë \u00eb
Ï \"I Ï \u00cf
ï \"i ï \u00ef
Ö \"O Ö \u00d6
ö \"o ö \u00f6
52
Character Mnemonic Named html entity 16-bit hex unicode
Ü \"U Ü \u00dc
ü \"u ü \u00fc
Ÿ \"Y Ÿ \u0178
ÿ \"y ÿ \u00ff
Ç \cC Ç \u00c7
ç \cc ç \u00e7
Å \AA Å \u00c5
å \aa å \u00e5
Ø \/O Ø \u00d8
ø \/o ø \u00f8
Ă \uA Ă \u0102
ă \ua ă \u0103
Ĕ \uE not available \u0114
ĕ \ue not available \u0115
Š \vS Š \u0160
š \vs š \u0161
Ž \vZ Ž \u017d
ž \vz ž \u017e
Ő \HO not available \u0150
ő \Ho not available \u0151
Ű \HU not available \u0170
ű \Hu not available \u0171
Ligatures, etc:
14.2 Errata
The following corrections have been made since the standard was published:
Section 1.1.1 Terminology / definitions: The definition of VOLATILE has been clarified; it is used to indicate "sections
which are under active discussion and/or are likely to change in some future version of the standard" rather than
"sections which are under active discussion or likely to change at some point in the future" (8th Jan 2012).
Section 6.1.1 Typesetting line-breaks: Typo: setbarno corrected to setbarnb in two places (8th Jan 2012).
Section 8.2 Text strings: Typos for accent mnemonics (cedilla and ring): "\,C \,c" and "\oA \oa" corrected to
"\cC \cc" and "\AA \aa", respectively, as per Section 14.1 Supported accents & ligatures (8th Jan 2012).
53
TODO: \, and \o are non-standard accent mnemonics introduced in abc 2.0; however, it is probably sensible to
support them in addition to the standard, but less memorable, \c and \a.
Section 11.4.6 Information directives: The statement "Note that the %%writefields directive does not apply to
instruction-type fields, such as parts (P) and tempo (Q)" has now been removed, as it conflicted with other
information in the same section (8th Jan 2012).
Section 4.18 Chord symbols: Typo: sustained corrected to suspended (26th May 2012).
Section 4.6 Clefs and transposition: following discussion, this section has been corrected to clarify that the middle
setting does not affect the playback (since there is no consistent way that it can do so). The Zocharti Loch example
has been corrected and its accompanying midi file (which has persisted unchanged from abc draft 2.0, and which
seemed to indicate middle might, in some circumstances, affect the playback) has been removed (20th February
2013).
Back to top
abc/standard/v2.1.txt · Last modified: 2021/07/07 12:29 by cwalshaw
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-
Share Alike 3.0 Unported [http://creativecommons.org/licenses/by-nc-sa/3.0/]
54