| Next revision | Previous revision |
| abc:syntax-2.1 [2026/10/04 11:19] – created (some example ABC is still broken, but by the ABC library) ach | abc:syntax-2.1 [2026/10/04 12:05] (current) – fixed formatting improvements ach |
|---|
| ====== The abc music standard 2.1 (Dec 2011) ====== | ====== The abc music standard 2.1 (Dec 2011) ====== |
| |
| The original source of this standard can be found at https://abcnotation.com/wiki/abc:standard:v2.1. | //The original source of this standard can be found at [[https://abcnotation.com/wiki/abc:standard:v2.1]].// |
| |
| ** Chris Walshaw ** \\ | ** Chris Walshaw ** \\ |
| [[https://abcnotation.com/contact|abcnotation.com/contact]] \\ | [[https://abcnotation.com/contact|abcnotation.com/contact]] \\ |
| [[https://chriswalshaw.co.uk|chriswalshaw.co.uk]] | [[https://chriswalshaw.co.uk|chriswalshaw.co.uk]] |
| |
| ===== 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]] | |
| * [[#clefs and transposition|4.6 Clefs and transposition]] | |
| * [[#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]] | |
| * [[#sample_abc_tunes|13. Sample abc tunes]] | |
| * [[#englishabc|13.1 English.abc]] | |
| * [[#strspysabc|13.2 Strspys.abc]] | |
| * [[#reelsabc|13.3 Reels.abc]] | |
| * [[#canzonettaabc|13.4 Canzonetta.abc]] | |
| * [[#appendix|14. Appendix]] | |
| * [[#supported accents & ligatures|14.1 Supported accents & ligatures]] | |
| * [[#errata|14.2 Errata]] | |
| |
| ===== 1. Introduction ===== | ===== 1. Introduction ===== |
| Bar line symbols are notated as follows: | Bar line symbols are notated as follows: |
| |
| ^ **Symbol** ^ **Meaning** ^ | ^ Symbol ^ Meaning ^ |
| | ''|'' | bar line | | | ''|'' | bar line | |
| | ''|]'' | thin-thick double bar line | | | ''|]'' | thin-thick double bar line | |
| These can be simply coded with the notation ''(2ab'' for a duplet, ''(3abc'' for a triplet or ''(4abcd'' for a quadruplet, etc, up to ''(9''. The musical meanings are: | These can be simply coded with the notation ''(2ab'' for a duplet, ''(3abc'' for a triplet or ''(4abcd'' for a quadruplet, etc, up to ''(9''. The musical meanings are: |
| |
| ^ **Symbol** ^ **Meaning** ^ | ^ Symbol ^ Meaning ^ |
| | ''(2'' | 2 notes in the time of 3 | | | ''(2'' | 2 notes in the time of 3 | |
| | ''(3'' | 3 notes in the time of 2 | | | ''(3'' | 3 notes in the time of 2 | |
| |
| A number of shorthand decoration symbols are available: | A number of shorthand decoration symbols are available: |
| . staccato mark | |
| ~ Irish roll | ^ Symbol ^ Meaning ^ |
| H fermata | | ''.'' | staccato mark | |
| L accent or emphasis | | ''~'' | Irish roll | |
| M lowermordent | | ''H'' | fermata | |
| O coda | | ''L'' | accent or emphasis | |
| P uppermordent | | ''M'' | lowermordent | |
| S segno | | ''O'' | coda | |
| T trill | | ''P'' | uppermordent | |
| u up-bow | | ''S'' | segno | |
| v down-bow | | ''T'' | trill | |
| | | ''u'' | up-bow | |
| | | ''v'' | down-bow | |
| Decorations should be placed before the note which they decorate - see [[#order of abc constructs|order of abc constructs]] | Decorations should be placed before the note which they decorate - see [[#order of abc constructs|order of abc constructs]] |
| |
| |
| The currently defined symbols are: | The currently defined symbols are: |
| !trill! "tr" (trill mark) | |
| !trill(! start of an extended trill | ^ Symbol ^ Meaning ^ |
| !trill)! end of an extended trill | | ''!trill!'' | "tr" (trill mark) | |
| !lowermordent! short /|/|/ squiggle with a vertical line through it | | ''!trill(!'' | start of an extended trill | |
| !uppermordent! short /|/|/ squiggle | | ''!trill)!'' | end of an extended trill | |
| !mordent! same as !lowermordent! | | ''!lowermordent!'' | short ''%%/|/|/%%'' squiggle with a vertical line through it | |
| !pralltriller! same as !uppermordent! | | ''!uppermordent!'' | short ''%%/|/|/%%'' squiggle | |
| !roll! a roll mark (arc) as used in Irish music | | ''!mordent!'' | same as ''!lowermordent!'' | |
| !turn! a turn mark (also known as gruppetto) | | ''!pralltriller!'' | same as ''!uppermordent!'' | |
| !turnx! a turn mark with a line through it | | ''!roll!'' | a roll mark (arc) as used in Irish music | |
| !invertedturn! an inverted turn mark | | ''!turn!'' | a turn mark (also known as gruppetto) | |
| !invertedturnx! an inverted turn mark with a line through it | | ''!turnx!'' | a turn mark with a line through it | |
| !arpeggio! vertical squiggle | | ''!invertedturn!'' | an inverted turn mark | |
| !>! > mark | | ''!invertedturnx!'' | an inverted turn mark with a line through it | |
| !accent! same as !>! | | ''!arpeggio!'' | vertical squiggle | |
| !emphasis! same as !>! | | ''!>!'' | ''>'' mark | |
| !fermata! fermata or hold (arc above dot) | | ''!accent!'' | same as ''!>!'' | |
| !invertedfermata! upside down fermata | | ''!emphasis!'' | same as ''!>!'' | |
| !tenuto! horizontal line to indicate holding note for full duration | | ''!fermata!'' | fermata or hold (arc above dot) | |
| !0! - !5! fingerings | | ''!invertedfermata!'' | upside down fermata | |
| !+! left-hand pizzicato, or rasp for French horns | | ''!tenuto!'' | horizontal line to indicate holding note for full duration | |
| !plus! same as !+! | | ''!0!'' - ''!5!'' | fingerings | |
| !snap! snap-pizzicato mark, visually similar to !thumb! | | ''!+!'' | left-hand pizzicato, or rasp for French horns | |
| !slide! slide up to a note, visually similar to a half slur | | ''!plus!'' | same as ''!+!'' | |
| !wedge! small filled-in wedge mark | | ''!snap!'' | snap-pizzicato mark, visually similar to ''!thumb!'' | |
| !upbow! V mark | | ''!slide!'' | slide up to a note, visually similar to a half slur | |
| !downbow! squared n mark | | ''!wedge!'' | small filled-in wedge mark | |
| !open! small circle above note indicating open string or harmonic | | ''!upbow!'' | V mark | |
| !thumb! cello thumb symbol | | ''!downbow!'' | squared n mark | |
| !breath! a breath mark (apostrophe-like) after note | | ''!open!'' | small circle above note indicating open string or harmonic | |
| !pppp! !ppp! !pp! !p! dynamics marks | | ''!thumb!'' | cello thumb symbol | |
| !mp! !mf! !f! !ff! more dynamics marks | | ''!breath!'' | a breath mark (apostrophe-like) after note | |
| !fff! !ffff! !sfz! more dynamics marks | | ''!pppp!'' ''!ppp!'' ''!pp!'' ''!p!'' | dynamics marks | |
| !crescendo(! start of a < crescendo mark | | ''!mp!'' ''!mf!'' ''!f!'' ''!ff!'' | more dynamics marks | |
| !<(! same as !crescendo(! | | ''!fff!'' ''!ffff!'' ''!sfz!'' | more dynamics marks | |
| !crescendo)! end of a < crescendo mark, placed after the last note | | ''!crescendo(!'' | start of a ''<'' crescendo mark | |
| !<)! same as !crescendo)! | | ''!<(!'' | same as ''!crescendo(!'' | |
| !diminuendo(! start of a > diminuendo mark | | ''!crescendo)!'' | end of a ''<'' crescendo mark, placed after the last note | |
| !>(! same as !diminuendo(! | | ''!<)!'' | same as ''!crescendo)!'' | |
| !diminuendo)! end of a > diminuendo mark, placed after the last note | | ''!diminuendo(!'' | start of a ''>'' diminuendo mark | |
| !>)! same as !diminuendo)! | | ''!>(!'' | same as ''!diminuendo(!'' | |
| !segno! 2 ornate s-like symbols separated by a diagonal line | | ''!diminuendo)!'' | end of a ''>'' diminuendo mark, placed after the last note | |
| !coda! a ring with a cross in it | | ''!>)!'' | same as ''!diminuendo)!'' | |
| !D.S.! the letters D.S. (=Da Segno) | | ''!segno!'' | 2 ornate s-like symbols separated by a diagonal line | |
| !D.C.! the letters D.C. (=either Da Coda or Da Capo) | | ''!coda!'' | a ring with a cross in it | |
| !dacoda! the word "Da" followed by a Coda sign | | ''!D.S.!'' | the letters D.S. (=Da Segno) | |
| !dacapo! the words "Da Capo" | | ''!D.C.!'' | the letters D.C. (=either Da Coda or Da Capo) | |
| !fine! the word "fine" | | ''!fine!'' | the word "fine" | |
| !shortphrase! vertical line on the upper part of the staff | | ''!shortphrase!'' | vertical line on the upper part of the staff | |
| !mediumphrase! same, but extending down to the centre line | | ''!mediumphrase!'' | same, but extending down to the centre line | |
| !longphrase! same, but extending 3/4 of the way down | | ''!longphrase!'' | same, but extending 3/4 of the way down | |
| |
| Here is a picture of most decorations: | Here is a picture of most decorations: |
| The chord has the format //<note><accidental><type></bass>//, where //<note>// can be ''A-G'', the optional //<accidental>// can be ''b'', ''#'', the optional //<type>// is one or more of | The chord has the format //<note><accidental><type></bass>//, where //<note>// can be ''A-G'', the optional //<accidental>// can be ''b'', ''#'', the optional //<type>// is one or more of |
| |
| m or min minor | ^ Type ^ Meaning ^ |
| maj major | | m or min | minor | |
| dim diminished | | maj | major | |
| aug or + augmented | | dim | diminished | |
| sus suspended | | aug or + | augmented | |
| 7, 9 ... 7th, 9th, etc. | | sus | suspended | |
| | | 7, 9 ... | 7th, 9th, etc. | |
| |
| and //</bass>// is an optional bass note. | and //</bass>// is an optional bass note. |
| The lyrics lines are treated as [[#text string definition|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: | The lyrics lines are treated as [[#text string definition|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: |
| |
| ^ **Symbol** ^ **Meaning** ^ | ^ Symbol ^ Meaning ^ |
| | ''-'' | (hyphen) break between syllables within a word | | | ''-'' | (hyphen) break between syllables within a word | |
| | ''_'' | (underscore) previous syllable is to be held for an extra note | | | ''_'' | (underscore) previous syllable is to be held for an extra note | |