ABC Quick Reference

Every symbol ABC notation uses, grouped by what it does. Jump to a group, or read it through.

Header Fields

X:
Reference/tune number — required, must be unique in the file
T:
Title
C:
Composer
O:
Origin
R:
Rhythm (e.g. reel, jig, waltz)
M:
Meter (e.g. 4/4, 6/8)
L:
Default note length (e.g. 1/8)
Q:
Tempo (e.g. "allegro" 1/4=120)
K:
Key [clef] [middle=x] — always the last header line
V:
Voice (e.g. V:4 clef=bass)
P:
Parts (e.g. P:A, P:ABAC, P:(A2B)3)
B:
Book
D:
Discography
F:
File URL
G:
Group (e.g. G:flute)
H:
History
I:
Instruction
N:
Notes (about the tune)
S:
Source
W:
Words (lyrics after the tune)
w:
Words (lyrics inline, under the staff)
Z:
Transcriber — also a good place for copyright info
m:
Macro (e.g. m: ~n2 = (3o/n/m/ n)
r:
Remark
s:
Symbol line (e.g. s: !pp! ** !f!)
U:
User-defined shortcut (e.g. U: T = !trill!)

Clefs & Voices

treble
Treble (default)
treble-8
Treble, 8ve below (e.g. tenors)
treble+8
Treble, 8ve above (e.g. piccolo)
bass
Bass
bass3
Baritone
alto4
Tenor
alto
Alto
alto2
Mezzo-soprano
alto1
Soprano
none
No clef
perc
Percussion
clef=
Clef of the voice
name=xxx
Name shown left of the first staff
sname=xxx
Short name shown left of later staves
merge
Places this voice on the same staff as the previous one
up / down
Forces the note stem direction
middle=<note>
Note on the middle line of the staff

Notes, Octaves & Duration

C,, C, C c c' c''
Octave markers around middle C
^
Sharp
^^
Double sharp
=
Natural
_
Flat
__
Double flat
z
Rest
Z
Whole-bar rest
x
Invisible rest
X
Invisible whole-bar rest
y
Spacer
-
Tie
( )
Slur
.-
Dotted tie
.( )
Dotted slur
-,
Tie below
(' )
Slur above
{/g}
Grace note
(3
3 notes in the time of 2
(p:q:r
p notes in the time of q, for the next r notes
[ceg]
Chord
&
Overlay (temporary extra voice)

Repeats & Bar Lines

|
Bar line
|]
Final bar line
||
Double bar line (section break)
[|
Bold bar line at start
|:
Repeat start
:|
Repeat end
::
Repeat end + start
[|]
Invisible bar line
.|
Dotted bar line
[1 [2
First and second time repeats

Chord Symbols

m, min
Minor, e.g. "Am7"
maj
Major
dim
Diminished
aug, +
Augmented
sus
Suspended
7, 9 …
7th, 9th, etc.

Lyrics (w: / W:)

-
Break between syllables within a word
_
Last syllable held for an extra note
*
One note is skipped
~
Appears as a space; puts multiple words under one note
\-
Appears as a hyphen; multiple syllables under one note
|
Advances to the next bar

Decorations — Short Forms

.
Staccato
~
Irish roll/turn
T
Trill
H
Fermata
L
Accent or emphasis
M
Inverted mordent
P
Mordent
S
Segno
O
Coda
J
Slide
R
Roll
u
Upbow
v
Downbow

Dynamics

!crescendo(! or !<(!
Start of a crescendo mark
!crescendo)! or !<)!
End of a crescendo mark, placed after the last note
!diminuendo(! or !>(!
Start of a diminuendo mark
!diminuendo)! or !>)!
End of a diminuendo mark, placed after the last note
!pppp! … !ffff! !sfz!
Volume levels from pianissississimo to fortissississimo, and sforzando

Ornaments

!trill!
Trill (also !trill(! / !trill)!)
!lowermordent!
Short squiggle with a line through it
!uppermordent!
Short squiggle
!mordent!
Same as !lowermordent!
!pralltriller!
Same as !uppermordent!
!accent! !>! !emphasis!
Accent mark (>)
!fermata! !invertedfermata!
Fermata / hold (arc above dot)
!tenuto!
Horizontal bar
!trem1/2/3/4!
Tremolo (on the 2nd note)
!xstem!
Stem points up to the staff above
!slide! !turnx! !invertedturn! !invertedturnx! !arpeggio!
Additional ornament marks

Text Annotations

"..."
Text above the note by default
"^..."
Above the staff
"_..."
Below the staff
"<..."
Left of the note
">..."
Right of the note
"@x,y ..."
Explicit offset

Fingering & Phrasing

!0! – !5!
Fingerings
!plus!
Left-hand pizzicato, or rasp for brass
!wedge!
Small filled-in wedge mark
!open!
Open string or harmonic (small circle above note)
!thumb!
Cello thumb symbol
!snap!
Snap-pizzicato mark
!turn!
Turn mark
!roll!
Roll mark (arc), as used in Irish music
!breath!
Breath mark (apostrophe) after the note
!shortphrase!
Vertical line on the upper part of the staff
!mediumphrase!
Same, extending down to the middle
!longphrase!
Same, extending 3/4 of the way down
!upbow!
V mark
!downbow!
Squared "n" mark

Repeat / Section Symbols

!segno!
Two "S"-like symbols separated by a diagonal
!coda!
A ring with a cross in it
!D.S.!
The letters "D.S." (Da Segno)
!D.C.!
The letters "D.C." (Da Capo)
!dacoda! !dacapo! !fine!
Additional navigation markers

Correct Order of Elements

<grace notes><chord symbols><decorations><accidentals><NOTE><octave><note length><tie>
The order ABC expects these to appear in, left to right

General MIDI Instruments

1
Acoustic Grand
2
Bright Acoustic
3
Electric Grand
4
Honky-Tonk
5
Electric Piano 1
6
Electric Piano 2
7
Harpsichord
8
Clavinet
9
Celesta
10
Glockenspiel
11
Music Box
12
Vibraphone
13
Marimba
14
Xylophone
15
Tubular Bells
16
Dulcimer
17
Drawbar Organ
18
Percussive Organ
19
Rock Organ
20
Church Organ
21
Reed Organ
22
Accordion
23
Harmonica
24
Tango Accordion
25
Acoustic Guitar (nylon)
26
Acoustic Guitar (steel)
27
Electric Guitar (jazz)
28
Electric Guitar (clean)
29
Electric Guitar (muted)
30
Overdriven Guitar
31
Distortion Guitar
32
Guitar Harmonics
33
Acoustic Bass
34
Electric Bass (finger)
35
Electric Bass (pick)
36
Fretless Bass
37
Slap Bass 1
38
Slap Bass 2
39
Synth Bass 1
40
Synth Bass 2
41
Violin
42
Viola
43
Cello
44
Contrabass
45
Tremolo Strings
46
Pizzicato Strings
47
Harp
48
Timpani
49
String Ensemble 1
50
String Ensemble 2
51
Synth Strings 1
52
Synth Strings 2
53
Choir Aahs
54
Voice Oohs
55
Synth Voice
56
Orchestra Hit
57
Trumpet
58
Trombone
59
Tuba
60
Muted Trumpet
61
French Horn
62
Brass Section
63
Synth Brass 1
64
Synth Brass 2
65
Soprano Sax
66
Alto Sax
67
Tenor Sax
68
Baritone Sax
69
Oboe
70
English Horn
71
Bassoon
72
Clarinet
73
Piccolo
74
Flute
75
Recorder
76
Pan Flute
77
Blown Bottle
78
Shakuhachi
79
Whistle
80
Ocarina
81
Lead 1 (square)
82
Lead 2 (sawtooth)
83
Lead 3 (calliope)
84
Lead 4 (chiff)
85
Lead 5 (charang)
86
Lead 6 (voice)
87
Lead 7 (fifths)
88
Lead 8 (bass+lead)
89
Pad 1 (new age)
90
Pad 2 (warm)
91
Pad 3 (polysynth)
92
Pad 4 (choir)
93
Pad 5 (bowed)
94
Pad 6 (metallic)
95
Pad 7 (halo)
96
Pad 8 (sweep)
97
FX 1 (rain)
98
FX 2 (soundtrack)
99
FX 3 (crystal)
100
FX 4 (atmosphere)
101
FX 5 (brightness)
102
FX 6 (goblins)
103
FX 7 (echoes)
104
FX 8 (sci-fi)
105
Sitar
106
Banjo
107
Shamisen
108
Koto
109
Kalimba
110
Bagpipe
111
Fiddle
112
Shanai
113
Tinkle Bell
114
Agogo
115
Steel Drums
116
Woodblock
117
Taiko Drum
118
Melodic Tom
119
Synth Drum
120
Reverse Cymbal
121
Guitar Fret Noise
122
Breath Noise
123
Seashore
124
Bird Tweet
125
Telephone Ring
126
Helicopter
127
Applause
128
Percussion (abcjs only)

Accented Characters

\`X
Grave accent, e.g. \`a → à
\'X
Acute accent, e.g. \'e → é
\^X
Circumflex, e.g. \^o → ô
\~X
Tilde, e.g. \~n → ñ
\"X
Umlaut/diaeresis, e.g. \"o → ö
\,X
Cedilla, e.g. \,c → ç
\oX
Ring, e.g. \oa → å
\/X
Slash, e.g. \/o → ø
\uX
Breve, e.g. \ua → ă
\vX
Caron, e.g. \vs → š
\HX
Double acute, e.g. \Ho → ő
\ss \AE \ae \oe
Ligatures: ß, Æ, æ, œ
&copy;
Copyright symbol ©
\u266f \u266e \u266d
Sharp / natural / flat symbols (♯ ♮ ♭)

Extended Information Fields

%%abc-creator
Name/version of the tool that generated this file
%%abc-version 2.0
Use for pre-2.1 ABC
%%abc-charset iso-8859-1
Character set — default is UTF-8
%%abc-include mydefs.abh
Include an external definitions file

Page Format

%%pageheight <length>
Page height
%%pagewidth <length>
Page width
%%topmargin <length>
Top margin
%%botmargin <length>
Bottom margin
%%leftmargin <length>
Left margin
%%rightmargin <length>
Right margin
%%indent <length>
First-line indent
%%landscape <logical>
Landscape orientation
%%staffwidth <length>
Staff width

Fonts

%%titlefont
Title font (name + size)
%%subtitlefont
Subtitle font
%%composerfont
Composer font
%%partsfont
Parts font
%%tempofont
Tempo font
%%gchordfont
Chord symbol font
%%headerfont
Header font
%%historyfont
History (H:) font
%%footerfont
Footer font
%%annotationfont
Annotation font
%%infofont
Info line font
%%measurefont
Measure number font
%%repeatfont
Repeat text font
%%textfont
Body text font
%%voicefont
Voice name font
%%vocalfont
Vocal font (w:)
%%wordsfont
Words font (W:)
%%setfont-1/2/3/4 <ft> <sz>
Define $1–$4 inline font switches usable within an ABC string

Spacing

%%topspace <length>
Space above the title block
%%titlespace <length>
Space around the title
%%titleleft <logical>
Left-align the title instead of centering
%%titlecaps <logical>
Render the title in capitals
%%subtitlespace <length>
Space around the subtitle
%%composerspace <length>
Space around the composer line
%%aligncomposer <integer>
-1 left, 0 centre, 1 right
%%musicspace <length>
Space between composer line and first staff
%%partsspace <length>
Space around part labels
%%vocalspace <length>
Space around vocal lines
%%wordsspace <length>
Space around lyrics
%%textspace <length>
Space around free text blocks
%%infospace <length>
Space around the info line
%%staffsep <length>
Space between systems
%%sysstaffsep <length>
Space between staves within a system
%%barsperstaff <integer>
Fixed number of bars per staff line
%%parskipfac <number>
Space between parts
%%lineskipfac <number>
Space between lines of text
%%stretchstaff <logical>
Stretch staves to fill the page width
%%stretchlast <logical>
Stretch the last staff line too
%%maxshrink <number>
Maximum note-shrinking factor
%%maxstaffsep <length>
Maximum space between systems
%%maxsysstaffsep <length>
Maximum space between staves in a system
%%splittune <logical>
Allow a tune to split across pages
%%newpage
Force a page break
%%scale <number>
Scale everything
%%staves
Group voices into staves, e.g. [(SA)(TB)] for short score
%%vskip <length>
Vertical skip

Measure Numbering (%%)

%%measurefirst <integer>
Number of the first measure
%%barnumbers <integer>
Print a number every n bars
%%measurenb <integer>
Same as %%barnumbers
%%measurebox <logical>
Box around measure numbers
%%setbarnb <integer>
Set the current measure number
%%contbarnb <logical>
Continue numbering across repeats
%%alignbars <integer>
Align bars vertically for the next n lines

Text Blocks (%%)

%%text <ABC String>
Insert a text line
%%textoption <string>
Text block formatting option
%%center <ABC String>
Centered text line
%%begintext … %%endtext
Multi-line text block
%%sep [# # #]
Horizontal separator
%%header
Custom page header
%%footer
Custom page footer

Misc Directives (%%)

%%autoclef <logical>
Automatic clef selection
%%beginps … %%endps
Embed raw PostScript
%%bstemdown <logical>
Force bass-staff stems down
%%comball <logical>
Combine all voices
%%combinevoices <logical>
Combine voices sharing a staff
%%dateformat <string>
Date format
%%encoding <integer>
0–6 for ISO-Latin-n
%%EPS <string>
Include an external EPS file
%%exprabove <logical>
Place expression marks above the staff
%%exprbelow <logical>
Place expression marks below the staff
%%flatbeams <logical>
Flatten beam angles
%%freegchord <logical>
Print '#', 'b' and '=' literally in chord symbols
%%gchordbox <logical>
Box around chord symbols
%%graceslurs <logical>
Slur grace notes to the main note
%%hyphencont <logical>
Continue lyric hyphenation across lines
%%infoline <logical>
Rhythm and origin on the same line
%%linebreak $ or ! or <EOL> or <none>
Character that marks a line break in the source
%%musiconly <logical>
Don't output lyrics
%%oneperpage <logical>
One tune per page
%%partsbox <logical>
Box around part labels
%%postscript <string>
Raw PostScript string
%%printparts <logical>
Print P: part labels
%%printtempo <logical>
Print the Q: tempo marking
%%sep <length> <length> <length>
Separator dimensions
%%shiftunison <logical>
Offset unison notes so both are visible
%%squarebreve <logical>
Draw breves as squares
%%slurheight <float>
Slur arc height — below 1.0 flattens
%%staff <number>
Use the nth staff
%%staffnonote <logical>
Hide staves with no notes
%%stemheight <float>
Note stem height
%%straightflags <logical>
Draw note flags straight instead of curved
%%timewarn <logical>
Show cautionary time signatures
%%tuplets <integer> <integer> <integer>
Tuplet number display options
%%vocalabove <logical>
Place vocals above the staff
%%withxrefs <logical>
Print the X: index in the title
%%writefields <fields> [<logical>]
Show/hide specific header fields
%%writehistory <logical>
Print the H: history field