\\ ====== The DRAFT abc music notation standard 2.2 ====== ** Chris Walshaw ** \\ [[https://abcnotation.com/contact|abcnotation.com/contact]] \\ [[https://chriswalshaw.co.uk|chriswalshaw.co.uk]] ===== Rationale and development notes ===== Originally intended as a minor fix (version 2.1.1) to resolve some of the VOLATILE issues in clefs and transposition from [[.:v2.1#clefs and transposition|version 2.1]], it has taken such a long time, with protracted discussions about transposition (and long silences by the editor), that the intention is to publish this draft as abc version 2.2. ==== Changes between abc 2.1 and abc 2.2 ==== === Changes implemented === A list of the main changes (excluding typos corrected and minor clarifications). Dates are included so that people checking this list can see what has changed since they last visited. == 0.1.1 K: and V: parameters == // 22nd-23rd Feb 2013: // [[.:v2.2#voice modifiers - clefs and transposition|4.6 Voice modifiers]] has been rewritten (although the rules remain unchanged). Some additional clef values have been added. The ''middle'' parameter has been [[.:v2.1.1#outdated middle parameter|deprecated]] and the [[.:v2.2#multiple voices|Zocharti Loch]] & [[.:v2.2#canzonettaabc|Canzonetta]] examples have been adjusted accordingly. // 25th Feb 2013: // [[.:v2.2#clefs|Additional clef parameters]] have been added (e.g. ''clef=G2'' and ''clef=baritone''). // 1st Mar 2013: // Clef settings ''bass3'', ''alto2'' and ''alto1'', together with their generalisation to any line number (e.g. ''bass1''), have been [[.:v2.1.1#outdated clef values|deprecated]]. // 1st-2nd Mar 2013: // The [[.:v2.2#octave clefs]] syntax has been updated. // 5th Mar 2013: // The ''clef=auto'' syntax has been [[.:v2.2#clefs|added]]. == 0.1.2 Transposition incorporated == // 4th Jul 2015: // [[abc:standard:v2.1:proposals:transposition:v16|Transposition proposal version 16]] has been incorporated! This has involved some restructuring: * substantial changes to [[.:v2.2#voice modifiers - clefs and transposition|4.6 Voice modifiers - clefs and transposition]] * the inclusion of the ''V:*'' syntax in [[.:v2.2#Multiple voices|7. Multiple voices]] * a whole new section, [[.:v2.2#Transposition|13. Transposition]] * the move of [[.:v2.2#Sample abc tunes]] and [[.:v2.2#Appendices]] to sections 14 and 15 respectively (previously 13 and 14). == 0.1.3 Additional decorations == // 6th Jul 2015: // Decorations ''!^!'', ''!marcato!'', ''!D.C.alcoda!'', ''!D.C.alfine!'', ''!D.S.alcoda!'' and ''!D.S.alfine!'' have been [[.:v2.2#decorations|added]] // 16th Jul 2015: // Decorations ''!editorial!'' and ''!courtesy!'' have been [[.:v2.2#decorations|added]] - see also [[.:v2.2#accidentals|accidentals]] === Proposed minor additions === * ''I:pitch ='' - e.g. I:pitch A=440 * length modifier for ''y'' spacers (e.g. ''y2'', ''y4'', ''y/2'', etc) * Additional decorations (I will need some help with definitions for some of these) * ''!trill=!'', ''!trill_!'', ''!trill^!'', ''!trill__!'', ''!trill^^!'' \\ ===== Contents ===== * [[#introduction|1. Introduction]] * [[#how to read this document|1.1 How to read this document]] * [[#terminology definitions|1.1.1 Terminology / definitions]] * [[#how to avoid reading this document|1.2 How to avoid reading this document]] * [[#abc tutorials|1.3 Abc tutorials]] * [[#abc extensions|1.4 Abc extensions]] * [[#further information and changes|1.5 Further information and changes]] * [[#document_locations|1.6 Document locations]] * [[#abc_files_tunes_and_fragments|2. Abc files, tunes and fragments]] * [[#abc_file_identification|2.1 Abc file identification]] * [[#abc_file_structure|2.2 Abc file structure]] * [[#abc tune|2.2.1 Abc tune]] * [[#file header|2.2.2 File header]] * [[#free text and typeset text|2.2.3 Free text and typeset text]] * [[#empty_lines_and_line-breaking|2.2.4 Empty lines and line-breaking]] * [[#comments and remarks|2.2.5 Comments and remarks]] * [[#continuation_of_input_lines|2.2.6 Continuation of input lines]] * [[#embedded abc and abc fragments|2.3 Embedded abc and abc fragments]] * [[#embedded abc fragment|2.3.1 Embedded abc fragment]] * [[#embedded abc tune|2.3.2 Embedded abc tune]] * [[#embedded file header|2.3.3 Embedded file header]] * [[#embedded abc file|2.3.4 Embedded abc file]] * [[#information_fields|3. Information fields]] * [[#description_of_information_fields|3.1 Description of information fields]] * [[#xreference number|3.1.1 X: - reference number]] * [[#ttune title|3.1.2 T: - tune title]] * [[#ccomposer|3.1.3 C: - composer]] * [[#oorigin|3.1.4 O: - origin]] * [[#aarea|3.1.5 A: - area]] * [[#mmeter|3.1.6 M: - meter]] * [[#lunit note length|3.1.7 L: - unit note length]] * [[#qtempo|3.1.8 Q: - tempo]] * [[#pparts|3.1.9 P: - parts]] * [[#ztranscription|3.1.10 Z: - transcription]] * [[#nnotes|3.1.11 N: - notes]] * [[#ggroup|3.1.12 G: - group]] * [[#hhistory|3.1.13 H: - history]] * [[#kkey|3.1.14 K: - key]] * [[#rrhythm|3.1.15 R: - rhythm]] * [[#bdfsbackground information|3.1.16 B:, D:, F:, S: - background information]] * [[#iinstruction|3.1.17 I: - instruction]] * [[#other_fields|3.1.18 Other fields]] * [[#use_of_fields_within_the_tune_body|3.2 Use of fields within the tune body]] * [[#field continuation|3.3 Field continuation]] * [[#the_tune_body|4. The tune body]] * [[#pitch|4.1 Pitch]] * [[#accidentals|4.2 Accidentals]] * [[#note_lengths|4.3 Note lengths]] * [[#broken_rhythm|4.4 Broken rhythm]] * [[#rests|4.5 Rests]] * [[#voice modifiers - clefs and transposition|4.6 Voice modifiers - clefs and transposition]] * [[#Clefs|4.6.1 Clefs]] * [[#Stafflines|4.6.2 Stafflines]] * [[#The octave modifier|4.6.3 The octave modifier]] * [[#Scope and inheritance of modifiers|4.6.4 Scope and inheritance of modifiers]] * [[#Application specific modifiers|4.6.5 Application specific modifiers]] * [[#beams|4.7 Beams]] * [[#repeat_bar_symbols|4.8 Repeat/bar symbols]] * [[#first_and_second_repeats|4.9 First and second repeats]] * [[#variant_endings|4.10 Variant endings]] * [[#ties_and_slurs|4.11 Ties and slurs]] * [[#grace_notes|4.12 Grace notes]] * [[#duplets_triplets_quadruplets_etc|4.13 Duplets, triplets, quadruplets, etc.]] * [[#decorations|4.14 Decorations]] * [[#symbol_lines|4.15 Symbol lines]] * [[#redefinable_symbols|4.16 Redefinable symbols]] * [[#chords_and_unisons|4.17 Chords and unisons]] * [[#chord_symbols|4.18 Chord symbols]] * [[#annotations|4.19 Annotations]] * [[#order_of_abc_constructs|4.20 Order of abc constructs]] * [[#lyrics|5. Lyrics]] * [[#alignment|5.1 Alignment]] * [[#verses|5.2 Verses]] * [[#numbering|5.3 Numbering]] * [[#typesetting_and_playback|6. Typesetting and playback]] * [[#typesetting|6.1 Typesetting]] * [[#typesetting_line-breaks|6.1.1 Typesetting line-breaks]] * [[#typesetting_extra_space|6.1.2 Typesetting extra space]] * [[#typesetting information fields|6.1.3 Typesetting information fields]] * [[#playback|6.2 Playback]] * [[#multiple_voices|7. Multiple voices]] * [[#voice_properties|7.1 Voice properties]] * [[#breaking_lines|7.2 Breaking lines]] * [[#inline_fields|7.3 Inline fields]] * [[#voice_overlay|7.4 Voice overlay]] * [[#abc_data_format|8. abc data format]] * [[#tune_body|8.1 Tune body]] * [[#text strings|8.2 Text strings]] * [[#macros|9. Macros]] * [[#static_macros|9.1 Static macros]] * [[#transposing_macros|9.2 Transposing macros]] * [[#outdated syntax|10. Outdated syntax]] * [[#outdated information field syntax|10.1 Outdated information field syntax]] * [[#outdated_dialects|10.2 Outdated dialects]] * [[#outdated_line-breaking|10.2.1 Outdated line-breaking]] * [[#outdated_decorations|10.2.2 Outdated decorations]] * [[#outdated_chords|10.2.3 Outdated chords]] * [[#outdated_continuations|10.3 Outdated continuations]] * [[#outdated_directives|10.4 Outdated directives]] * [[#outdated_file_structure|10.5 Outdated file structure]] * [[#outdated_tune_header_syntax|10.5.1 Outdated tune header syntax]] * [[#outdated_defaults|10.5.1 Outdated defaults]] * [[#outdated lyrics alignment|10.6 Outdated lyrics alignment]] * [[#other outdated syntax|10.7 Other outdated syntax]] * [[#disallowed voice overlay|10.7.1 Disallowed voice overlay]] * [[#stylesheet directives and pseudo-comments|11. Stylesheet directives and pseudo-comments]] * [[#introduction to directives|11.0 Introduction to directives]] * [[#disclaimer|11.0.1 Disclaimer]] * [[#stylesheet directives|11.0.2 Stylesheet directives]] * [[#voice_grouping|11.1 Voice grouping]] * [[#instrumentation_directives|11.2 Instrumentation directives]] * [[#accidental_directives|11.3 Accidental directives]] * [[#formatting_directives|11.4 Formatting directives]] * [[#page_format_directives|11.4.1 Page format directives]] * [[#font_directives|11.4.2 Font directives]] * [[#space_directives|11.4.3 Space directives]] * [[#measure_directives|11.4.4 Measure directives]] * [[#text_directives|11.4.5 Text directives]] * [[#information directives|11.4.6 Information directives]] * [[#separation directives|11.4.7 Separation directives]] * [[#miscellaneous_directives|11.4.8 Miscellaneous directives]] * [[#application_specific_directives|11.5 Application specific directives]] * [[#further information about directives|11.6 Further information about directives]] * [[#dialects_strict_loose_interpretation_and_backwards_compatibility|12. Dialects, strict / loose interpretation and backwards compatibility]] * [[#dialect_differences|12.1 Dialect differences]] * [[#line-breaking_dialects|12.1.1 Line-breaking dialects]] * [[#decoration_dialects|12.1.2 Decoration dialects]] * [[#chord_dialects|12.1.3 Chord dialects]] * [[#loose_interpretation|12.2 Loose interpretation]] * [[#strict_interpretation|12.3 Strict interpretation]] * [[#transposition|13. Transposition]] * [[#Transposition operators|13.1 Transposition operators]] * [[#Shorthands for transposing instruments|31.1.1 Shorthands for transposing instruments]] * [[#Enharmonics|13.1.2 Enharmonics]] * [[#Transposing a file tune|13.2 Transposing a file/tune]] * [[#Writing abc code for transposing instruments|13.3 Writing abc code for transposing instruments]] * [[#Generating a concert sounding pitch score|13.3.1 Generating a concert/sounding pitch score]] * [[#Transposing instruments - extended example|13.3.2 Transposing instruments - extended example]] * [[#Transposing instrument examples|13.3.3 Transposing instrument examples]] * [[#Custom transposition for diatonic instruments|13.4 Custom transposition for diatonic instruments]] * [[#Fixed pitch transpositions|13.4.1 Fixed pitch transpositions]] * [[#Moveable pitch transpositions|13.4.2 Moveable pitch transpositions]] * [[#sample_abc_tunes|14. Sample abc tunes]] * [[#englishabc|14.1 English.abc]] * [[#strspysabc|14.2 Strspys.abc]] * [[#reelsabc|14.3 Reels.abc]] * [[#canzonettaabc|13.4 Canzonetta.abc]] * [[#appendices|15. Appendices]] * [[#supported accents & ligatures|15.1 Supported accents & ligatures]] * [[#errata|15.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|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|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: * [[#abc file definition|abc file]] * [[#abc fragment definition|abc fragment]] * [[#abc tune definition|abc tune]] * [[#abc tunebook definition|abc tunebook]] * [[#code line-break definition|code line-break]] * [[#comment definition|comment]] * [[#embedded definition|embedded]] * [[#empty line definition|empty line]] * [[#file header definition|file header]] * [[#free text definition|free text]] * [[#information field definition|information field]] * [[#inline field definition|inline field]] * [[#music code definition|music code]] * [[#score line-break definition|score line-break]] * [[#stylesheet directive definition|stylesheet directive]] * [[#text string definition|text string]] * [[#tune body definition|tune body]] * [[#tune header definition|tune header]] * [[#typeset text definition|typeset text]] 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, [[#introduction|1. Introduction]], newcomers are recommended to familiarise themselves with all of [[#abc file structure|2.2 Abc file structure]], [[#information fields|3.0 Information fields]], a few subsections in [[#description of information fields|3.1 Description of information fields]] (in particular [[#xreference number|3.1.1]], [[#ttune title|3.1.2]], [[#mmeter|3.1.6]], [[#lunit note length|3.1.7]] and [[#kkey|3.1.14]]), [[#use of fields within the tune body|3.2 Use of fields within the tune body]], and as much of section [[#the tune body|4. The tune body]] as is desired (but in particular [[#pitch|4.1]], [[#note lengths|4.3]], [[#beams|4.7]], [[#repeat bar symbols|4.8]]). Newcomers are also advised to take a look at section [[#sample abc tunes|13. Sample abc tunes]] and one of the [[#abc tutorials|abc tutorials]] that is available. After that, it may depend on what you want to use abc for, but further reading suggestions would be: * [[#lyrics|5. Lyrics]] for transcribing songs * [[#typesetting|6.1 Typesetting]] for printing abc transcriptions in staff notation * [[#multiple voices|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: * [[https://abcnotation.com/learn|abcnotation.com/learn]] - a number of tutorials are linked from here * http://abcplus.sourceforge.net/#ABCGuide * http://www.lesession.co.uk/abc/abc_notation.htm * http://trillian.mit.edu/~jc/music/abc/doc/ABCtutorial.html ==== 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 [[https://abcnotation.com/software#abcm2ps|abcm2ps]] * http://abc.sourceforge.net/standard/abc2midi.txt - extensions implemented by [[https://abcnotation.com/software#abcMIDI|abc2midi]] * http://www.barfly.dial.pipex.com/bfextensions.html - extensions implemented by [[https://abcnotation.com/software#BarFly|BarFly]] * http://www.lautengesellschaft.de/cdmm/userguide/userguide.html - extensions implemented by [[https://abcnotation.com/software#abctab2ps|abctab2ps]] ==== 1.5 Further information and changes ==== Questions about this standard, or abc in general, can be addressed to the abcusers e-mail list: * http://groups.yahoo.com/group/abcusers/ To propose changes to the standard, please read * [[abc:standard:route-map|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: * [[abc:standard:v2.2|abcnotation.com/wiki/abc:standard:v2.2]] The latest version of the standard, plus links to older versions and other developmental work, can always be found via: * [[abc:standard|abcnotation.com/wiki/abc:standard]] ----

Back to top

===== 2. Abc files, tunes and fragments ===== Tunes written in abc are normally stored in [[#abc file definition|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 file definition|abc files]] and [[#abc tune definition|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 file definition|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 definition|abc file]] should begin with the string ''%abc''. An optional version number may follow on the same line, e.g. %abc-2.2 Version numbers of 2.1 or higher indicate that the [[#abc file definition|abc file]] is to be [[#strict_interpretation|interpreted strictly]] according to the corresponding abc standard; if the version number is missing, the file will be treated under [[#loose_interpretation|loose interpretation]]. The [[#version field|version field]] may also be used to indicate abc versions for individual tunes. // Note for developers: // Software should ignore the [[http://en.wikipedia.org/wiki/Byte_order_mark|byte order mark]] (BOM) if encountered as the first character of the file. When an [[#abc file definition|abc file]] is included in a multi-part e-mail, its MIME type must be "text/vnd.abc" (see [[http://www.iana.org/assignments/media-types/text/vnd.abc|IANA text/vnd.abc]]). ==== 2.2 Abc file structure ==== An **abc file** consists of one or more [[#abc tune definition|abc tune]] transcriptions, optionally interspersed with [[#free text definition|free text]] and [[#typeset text definition|typeset text]] annotations. It may optionally start with a [[#file header definition|file header]] to set up default values for processing the file. The [[#file header definition|file header]], [[#abc tune definition|abc tunes]] and [[#free text and typeset text|text annotations]] are separated from each other by [[#empty line definition|empty lines]] (also known as blank lines). An [[#abc file definition|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 definition|tune header]] and a [[#tune body definition|tune body]], terminated by an [[#empty line definition|empty line]] or the end of the [[#abc file definition|file]]. It may also contain [[#comment definition|comment lines]] or [[#stylesheet directive definition|stylesheet directives]]. The **tune header** is composed of several [[#information field definition|information field]] lines, which are further discussed in [[#information fields|information fields]]. The [[#tune header definition|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 definition|music code]], follows immediately after. Certain fields may also be used inside the tune body - see [[#use of fields within the tune body|use of fields within the tune body]]. It is legal to write an [[#abc tune definition|abc tune]] without a [[#tune body definition|tune body]]. This feature can be used to document tunes without transcribing them. Abc **music code** lines are those lines in the [[#tune body definition|tune body]] which give notes, bar lines and other musical symbols - see [[#the tune body|the tune body]] for details. In effect, music code is the contents of any line which is not an [[#information field definition|information field]], [[#stylesheet directive definition|stylesheet directive]] or [[#comment definition|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 field definition|information fields]], [[#stylesheet directive definition|stylesheet directives]], or both, terminated with an [[#empty line definition|empty line]]. The [[#file header definition|file header]] is used to set default values for the tunes in the file. The [[#file header definition|file header]] may only appear at the beginning of a file, not between tunes. Settings in a tune may override the [[#file header definition|file header]] settings, but when the end of a tune is reached the defaults set by the [[#file header definition|file header]] are reinstated. Applications which extract separate tunes from a file must insert the fields of the original [[#file header definition|file header]] into the header of the extracted tune. However, since users may manually extract tunes without regard to the [[#file header definition|file header]], it is not recommended to use a [[#file header definition|file header]] in an [[#abc tunebook definition|abc tunebook]] that is to be distributed. === 2.2.3 Free text and typeset text === The terms [[#free text definition|free text]] and [[#typeset text definition|typeset text]] refer to any text not directly included within the [[#information field definition|information fields]] in a [[#tune header definition|tune header]]. Typically such text is used for annotating [[#abc tunebook definition|abc tunebooks]]; [[#free text definition|free text]] is for annotating the [[#abc file definition|abc file]] but is not included in the typeset score, whereas [[#typeset text definition|typeset text]] is intended for printing out. **Free text** is just that. It can be included anywhere in an [[#abc file definition|abc file]], after the [[#file header definition|file header]], but must be separated from [[#abc tune definition|abc tunes]], [[#typeset text definition|typeset text]] and the [[#file header definition|file header]] by [[#empty line definition|empty lines]]. Typically it is used for annotating the [[#abc file definition|abc file]] but in principle can be any text not containing [[#information field definition|information fields]]. // Comment: // Since raw html markup and email headers are treated as [[#free text definition|free text]] (provided they don't inadvertently contain [[#information field definition|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 definition|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 definition|free text]] as a [[#text string definition|text string]], but may format it in any way it chooses. **Typeset text** is any text specified using [[#text directives|text directives]]. It may be inserted anywhere in an [[#abc file definition|abc file]] after the [[#file header definition|file header]], either separated from tunes by [[#empty line definition|empty lines]], or included in the [[#tune header definition|tune header]] or [[#tune body definition|tune body]]. [[#typeset text definition|Typeset text]] should be printed by typesetting programs although its exact position in the printed score is program-dependent. [[#typeset text definition|Typeset text]] that is included in an [[#abc tune definition|abc tune]] (i.e. within the [[#tune header definition|tune header]] or [[#tune body definition|tune body]]), must be retained by any programs, such as databasing software, that splits an [[#abc file definition|abc file]] into separate [[#abc tune definition|abc tunes]]. === 2.2.4 Empty lines and line-breaking === **Empty lines** (also known as blank lines) are used to separate [[#abc tune definition|abc tunes]], [[#free text definition|free text]] and the [[#file header definition|file header]]. They also aid the readability of [[#abc file definition|abc files]]. Lines that consist entirely of white-space (space and tab characters) are also regarded as [[#empty line definition|empty lines]]. Line-breaks (also known as new lines, line feeds, carriage returns, end-of-lines, etc.) can be used within an [[#abc file definition|abc file]] to aid readability and, if required, break up long input lines - see [[#continuation of input lines|continuation of input lines]]. More specifically, line-breaks in the [[#music code definition|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|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|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 [[#comment definition|comments]] and remarks should be processed in exactly the same way as it would be if all the [[#comment definition|comments]] and [[#remark definition|remarks]] were removed (although, if the code is preprocessed, and [[#comment definition|comments]] are actually removed, the [[#stylesheet directive definition|stylesheet directives]] should be left in place). Important clarification: lines which just contain a [[#comment definition|comment]] are processed as if the entire line were removed, even if the [[#comment definition|comment]] is preceded by white-space (i.e. the ''%'' symbol is the not first character). In other words, removing the [[#comment definition|comment]] effectively removes the entire line and so no [[#empty line definition|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 definition|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|outdated continuations]]) for this purpose, but it was decided that this was both unnecessary and confusing. In abc 2.1 and above, there are ways of continuing each of the 4 different input line types: [[#music code definition|music code]], [[#information field definition|information fields]], [[#comment definition|comments]] and [[#stylesheet directive definition|stylesheet directives]]. In abc [[#music code definition|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 '') - see [[#typesetting line-breaks|typesetting line-breaks]] for full details. // Comment for programmers: // The backslash effectively acts as a continuation character for [[#music code definition|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 definition|music code]] lines through [[#information field definition|information fields]], [[#comment definition|comments]] and [[#stylesheet directive definition|stylesheet directives]]. The 3 other input line types can be continued as follows: * [[#information field definition|information fields]] can be continued using ''+:'' at the start of the following line - see [[#field continuation|field continuation]]; * [[#comment definition|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 directive definition|stylesheet directives]] are too short to require a continuation syntax, but if one is required then use the ''I:'' form (see ''[[#iinstruction|I:instruction]]''), in place of ''%%'' and continue the line as a field - see [[#field continuation|field continuation]]. // Comment for developers: // Unlike other languages, and because of the way in which both [[#information field definition|information fields]] and [[#music code definition|music code]] can be continued through [[#comment definition|comments]], [[#stylesheet directive definition|stylesheet directives]] and (in the case of [[#music code definition|music code]]) [[#information field definition|information fields]], it is generally not possible to parse [[#abc file definition|abc files]] by pre-processing continuations into single lines. Note that, with the exception of abc [[#music code definition|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 file definition|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 tune definition|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 file definition|abc files]]. More recently, however, the possibility has arisen to include [[#abc tune definition|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 definition|embedded]] abc code starts and finishes. // Example: // Within an html document a tune could be included as follows:
  X:1
  T:Title
  K:C
  DEF FED:|
  
// 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 ''
'', ''
'', '''', ''