misc

A collection of small scripts and guides I keep handy—for myself and anyone who might find them useful.

View on GitHub

ABC Notation Summary

The ABC notation is a plain text musical notation for use in computers.

Information Fields

Out of these, it’s recommended to have, at least, X, T, M, L and K.

These are not the only existing fields. Check the standard for more info.

The Tune Body

To place the notes and other elements (like bars or accidentals) the following notation is used.

Pitch

Accidentals

Note Lengths

When writing a note, the default length will be the one set in the L:.

For other lengths, add a division or multiplication after the note. e.g. A/2 is half the L: duration, A/4 a fourth, and A3/2 is half but dotted, A2 is double the length.

Rests

Rests can be indicated by using zn, where n: uint. e.g. z2 is a rest of double the L: length. Lengths are applied the same way as in notes.

Bars

From the standard:

Symbol Meaning
| bar line
|] thin-thick double bar line
|| thin-thin double bar line
[| thick-thin double bar line
|: start of repeated section
:| end of repeated section
:: start & end of two repeated sections

Ties and Slurs

By placing multiple notes between parentheses, these will appear tied.

Sheet Example

X:1
T:Happy birthday to you
M:3/4
L:1/4
Q:1/4=120
K:G clef=treble
D3/4D/4 | E D G | F2 D3/4D/4 | E D A | G2 D3/4D/4 |
d B G | (F HE) c3/4c/4 | B G A | G2 |]

Sources & Useful Resources