abc2midi guide ..
abc cheatsheet
Fiddle Runtime ..
Fiddle Resources
Extending Fiddle ..
Installing Fiddle
General MIDI ..
MIDI CC ..
MIDI notes
Box2D API ..
Tidal Cheatsheet
Banklist File .. Sample TOC File
Audio Troubleshooting
This cheatsheet is based on work by John Chambers here It has been extended to include DbABC-specific details. The official ABC reference is found here
Information Fields .
Multiple Voices .
Notes . Bars .
Timing . Beaming
Slurs and Ties .
Clefs .
Ornaments .
Accompaniment .
Parts and Patterns
The main advantages of abc
are:
It's simple ASCII, easy to type and read, and easy to email. There's a lot of good software that understands it. ABC files are small, so downloading is fast.
The main disadvantages of ABC are:
It's not a full music notation yet. It's best for single-line instruments. The software isn't from a single source, and there are inconsistencies.
X: 1
T: Tune Title
C: Composer
N: Notes about the tune
M: 4/4
L: 1/8
K: Emin
|:D2|EB{c}BA B2 EB|~B2 AB dBAG|FDAD BDAD|FDAD dAFD|
EBBA B2 EB|B2 AB defg|afe^c dBAF|DEFD E2:|
|:gf|eB B2 efge|eB B2 gedB|A2 FA DAFA|A2 FA defg|
eB B2 eBgB|eB B2 defg|afe^c dBAF|DEFD E2:|
X and T should be first two lines, K should be last in the header. An information field may also be inlined in a tune body when enclosed by [].
Header Field | Description |
---|---|
B | books where you can find the tune |
C | composer - use Trad for traditional tunes |
H | history |
K | key - Em, EDor supported |
L | default note length - 1/8 is a quaver (eighth note) |
M | meter - 2/4 is two/four time, M:C and M:C| allowed |
N | comment - usually ignored by renderering software |
O | origin - (where it's from) |
P | parts - used to state the order in which parts are played |
R | rhythm - (reel, jig, polka, tango, …) |
S | source - (where you got it from) |
T | title - may be repeated |
X | sequence number - identifies one from many in the same file |
Q | tempo (1/4=120 means 120 quarter notes per minute) |
V | the identifier for a voice in a multi-voice file |
W | lyrics (uppercase), w: (lowercase) |
Z | transcription notes |
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 bottom half of the staff from C to B are represented by capital letters. The upper is represented by lowercase letters. You can represent the octaves below and above these by putting a comma (,) after the capital letters, or an apostrophe (') after the lower-case letters. This is sort of a pictorial mark: the "lower comma" means go down an octave, while the "upper comma" means to go up an octave.
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.
X: 1
T: Doh, Dear
M: 4/4
L: 1/8
K: C
|G,A,B,CDEFGAB cdefgab c'd'e'|
produces this:
The ASCII character set has the # symbol, but lacks the natural and flat symbols. So some other, somewhat pictorial, characters were chosen. The notation for accidentals is:
_B | B flat |
=A | A natural |
^G | G sharp |
The usual rule should be followed: an accidental applies to that note for the rest of the measure, unless changed by another accidental. However, it is common to use occasional unnecessary accidentals for emphasis. And if you're hanging out with the Early Music crowd, or with modern atonal musicians, you should probably treat accidentals as only for that one note. In accompaniment ("guitar") chords, the characters # and b are used for sharps and flats, so "Bb" means a B-flat chord, and "F#m7" means an F-sharp minor 7th chord. The same thing is done in key signatures, so K:Bb means the key of B flat, and K:F#m means F sharp minor. This is inconsistent with accidentals on notes, but printed music is often inconsistent in similar ways.
You can produces chords, that is, multiple notes on a single
stem, by putting them within square brackets [...]
.
So [GBdg]
is a 4-note G chord. The order doesn't much matter,
so [gdBG]
comes out the same on paper. But there is some
music-playing software that will treat the first note as the
"melody" note, so if this is important, you should put the
main note first.
ABC notation allows each note in the chord to have its own
length. You can say things like [D4F3A2d3/2]
. Music-playing
software can honor such things with ease. But standard music
notation can't represent all of this, and on paper you'll
get something much simpler. Much music-printing software
will just use the length of the first note for the entire
chord, and the above example and [D4FAd]
will both come
out the same as [D4F4A4d4]
.
X: 1
T: Chord
M: 2/4
L: 1/8
|[GBdg][dgGB] [D4F3A2d3/2]|[D4F3A2d3/2] XXXX|
produces:
Symbol | Description |
---|---|
| | simple bar line |
|| | double bar line |
[| | thick+thin bar line |
|] | thin+thick bar line |
|: | start of repeat |
:| | end of repeat |
|1 | start of first ending |
|2 | start of second ending |
:: | shorthand for :||: |
The default note length is specified by the L:
in the
header. You can add a multiplier after the note. A simple
fraction is the basic notation. So A3/2
means a note
1.5 times as long as the basic length.
You can omit /1, of course, so d4 means a note four times as long as the basic length.
You can also omit a numerator of 1 or a denominator of 2. So F1/2, F/2 and F/ all mean the same thing, an F note half as long as the L: length in the header.
Since all notes are in terms of the L: length, you can quickly change the meter of a tune by merely modifying the M: and L: lines in the header.
There is a shorthand notation for dotting: the characters
<
and >
transfer half the value of the note on one
side to the other side. The <
is a "snap", with a short
first note, so A<B
is shorthand for A1/2B3/2
. The >
is
a long-short, so A>B
is shorthand for A3/2B1/2
. You
can double these symbols to get a double dot.
X: 1
T: Timing
M: 4/4
L: 1/8
K: C
|:A2<B2 B>A|EBBA B2 EB|B2 AB defg
|afe^c dBAF|DEFD E2:|
produces this:
Within a measure, spaces are used to separate groups of notes
that are to be beamed together (if possible). So |DFA dAF|
is a bar with two groups of three notes (probably a jig),
while |DF Ad AF|
is a bar with three groups of two notes
(possibly a waltz).
Parentheses are used for slurs. AB(cd) means to draw a slur from the c to the d. Slurs can be drawn between arbitrary notes (though there may be problems with slurs that go from one staff to another).
A tie is indicated by a hyphen (-) after the first note. So A4- A is two A's tied together.
Most music notation doesn't really distinguish slurs and ties, and ABC is no exception. You'll see A-B, which should really be (AB). This probably isn't a big deal, except to the rare people who get excited about such things. Also, some ABC software will complain if you tie two different notes together. But the software should usually do the right thing, and treat it to a slur.
X: 1
T: Slurs and Ties
M: 4/4
L: 1/8
|AB(cd)|A4-A|A-B|(AB)|XX|
produces:
ABC has a several notations for ornaments. If you put notes
in curly braces {}
they will be treated as grace notes.
When printed, they will be tiny notes just before the note
that follows. You can use this to write out rather complex
ornaments. {gded^c}d
will give a d with all five little
notes before it.
There are also some special symbols that can be put before
a note. A dot produces the usual staccato: .d
means a
d with a dot below or above it. You can use ~
to indicate
a turn, so ~D
means a turned D. Some software has options
to say how to draw such ornaments. There are also some
ornaments that some programs recognize and others don't.
Thus T is recognized by some to produce the usual italic
tr symbol above the next note. M (for "emphasis") is
recognized by some to produce a little horizontal line
above or below the note. Most software recognizes H as
a "hold" (fermata). And so on.
Decorations | Meaning |
---|---|
{abc} |
grace notes |
. |
staccato |
M |
tenuto |
L |
loud |
R |
roll |
H , !fermata! |
fermata |
~ |
ornament |
T , trill |
trill |
u |
up-bow |
v |
down-bow |
' , !breath! |
breath |
O |
coda |
P |
upper mordent |
S |
segno |
!_symbol_! |
access to all special symbols |
Special Signals | Meaning |
---|---|
!crescendo(! |
beginning of a crescendo (visual only) |
!crescendo)! |
ending of a crescendo (visual only) |
!diminuendo(! |
beginning of a diminuendo (visual only) |
!diminuendo)! |
ending of a diminuendo (visual only) |
!ppp!-!p! |
gradations of quiet |
!mp!-!mf! |
variations on middle volume |
!f!-!fff! |
variations on loud |
!chordattack num! |
set a small delay between notes of a chord |
!bendstring n1 n2 n3 n4 etc! |
override the default note-bend scheme. |
!bendstringex n1 n2 n3 n4 etc! |
override the default note-bend scheme. (smoothed) |
!bend! |
trigger note-bend. |
!ped! |
trigger foot-pedal. |
!ped-up! |
release foot-pedal |
!CC m val! |
set MIDI CC, m, to the value specified (immediate). Becomes the default. |
!CCx m a b, c ...! |
define MIDI control signal automation (piecewise-constant, triggered by !shape! ) |
!shape! |
triggers previous CCx for the ensuing note. Requires that a CCx precede it. |
This example:
|{gded^c}d.e {g}F ~D2 TG2 MA2 HB2/3 XX|
produces:
The treble clef is the default. You can specify the clef in the K: header line.
K:Gm bass
means the key is G minor, and the clef is bass.
Unless you say otherwise, K:C
treble is assumed. (Some
software will give a warning if there is no K:
line, and
will then use this default.) One quandary with ABC was how
letters map to staff notes in alto and bass clefs.
You can state what note goes on the middle line. So you
might write: K:Gm bass middle=d
.
This puts the letters GABcdefga on the staff, and makes
for easy typing. If you prefer the other scheme, you can say:
K:Gm bass middle=D
,
It's a good idea to always include the middle= item for bass clef, so that the software knows where you want the notes on the staff. If you don't, some software will draw the notes in different octaves than you intended.
You could also use middle= to change the mapping for the treble clef. This could be useful, for exmple, to convert an alto vocal line to an instrumental line with the notes drawn an octave higher. Another example is with alto recorder music, which historically has been printed in two different octaves. In ABC terms, printers treat the instrument's range as F,, … g or F, … g'. Such music, when transcribed to ABC, can easily be printed in staff notation in either octave by merely adding a middle=B or middle=b term to the K: header line.
X: 1
T: Clef
M: 2/4
L: 1/8
K: Gm bass middle=D
|[,G,B,d,g][,d,g,G,B] [D4F3A2d3/2]|[D4F3A2d3/2] XXX|
produces:
Refers to the names of chords, to be placed above or below
the staff. They go in double quotes, just before the note.
So "G"dBAG
would be a G chord above/below the d note.
You can actually put any text inside the double quotes,
so long chord names are possible. People also use this
for other musical directions, but that isn't really correct.
DbABC/abc2midi can auto-generate accompaniment based on the chords decribed here.
Parts and Patterns are achieved through the P:
label. When found within
the tune body the P:
defines an individual part and in this case must be
a single capital letter between A and Z. When found in the tune header, it
represents a sequence of parts. Now the value is a sequence of letters
with optional repeat values, eg: AB3
. More complex patterns can
be created by introducing parentheses.
P:A(AB)6
is equivalent toP:AABABABABABAB
.
DbABC has extended this notation to allow for the element of chance.
P:A[A|A|A|B|C]6
might produceAABAACB
([A5|B]BC)3
producesAAAAABCAAAAABCAAAAABC
orBBCBBCBBC