Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

ABC Notation Examples: Difference between revisions

From JustChords Wiki
Created page with "= ABC Notation Examples = This page collects ready-to-use ABC notation snippets. Copy any example into a song's ABC field in JustChords and it will render as a musical score. For an overview of what ABC notation is, see ABC Notation. == A minimal melody == The smallest useful score: a few notes with a title, meter, and default note length. <pre> X:1 T:Simple Scale M:4/4 L:1/4 K:C C D E F | G A B c | </pre> * '''X:''' tune number — '''T:''' title — '''M:''' m..."
 
No edit summary
 
Line 32: Line 32:


* <code>G2</code> = half note, <code>B4</code> = whole note, <code>c/2</code> = eighth note, <code>z2</code> = half rest.
* <code>G2</code> = half note, <code>B4</code> = whole note, <code>c/2</code> = eighth note, <code>z2</code> = half rest.
Note lengths and rests are '''relative to the default note length''' set with <code>L:</code>, so the same number means a different duration depending on <code>L:</code>:
* With <code>L:1/4</code>, <code>z2</code> is a half-note rest (1/4 × 2).
* With <code>L:1/8</code>, <code>z4</code> is a half-note rest (1/8 × 4).


== Sharps, flats, and octaves ==
== Sharps, flats, and octaves ==
Line 44: Line 49:


* <code>^</code> sharp, <code>_</code> flat, <code>=</code> natural.
* <code>^</code> sharp, <code>_</code> flat, <code>=</code> natural.
* A comma lowers an octave (<code>C,</code>); an apostrophe raises one (<code>c'</code>).
 
'''Octaves:''' uppercase <code>C</code> is Middle C. A comma after a note lowers it one octave (<code>C,</code> is the octave below Middle C), and a lowercase letter is one octave above (<code>c</code> is the octave above Middle C). So <code>C, C c</code> covers three octaves.


== Chord symbols above the staff ==
== Chord symbols above the staff ==
Line 57: Line 63:
"C"C E G c | "G"B, D G B | "Am"A, C E A | "F"F, A c F |
"C"C E G c | "G"B, D G B | "Am"A, C E A | "F"F, A c F |
</pre>
</pre>
== Chords (stacked notes) ==
Chords — what classical Western notation shows as multiple note heads on a single stem — are written by enclosing the notes in square brackets <code>[ ]</code>, with no spaces inside the brackets. Length and pitch modifiers can be included as needed, and by convention the notes are listed in ascending order, for example <code>[Acea]</code>.
Chords can be arranged into beamed groups using spaces, exactly like individual notes:
<pre>
X:1
T:Chords
M:2/4
K:C
[CEGc] [C2G2] [CE][DF] | [D2F2][EG][FA] [A4d4]|]
</pre>
Note the difference from the section above: <code>"C"</code> is a chord ''name'' printed above the staff, while <code>[CEG]</code> is a chord ''played'' as stacked notes on the staff.


== Lyrics under the melody ==
== Lyrics under the melody ==

Latest revision as of 12:30, 3 July 2026

ABC Notation Examples

This page collects ready-to-use ABC notation snippets. Copy any example into a song's ABC field in JustChords and it will render as a musical score. For an overview of what ABC notation is, see ABC Notation.

A minimal melody

The smallest useful score: a few notes with a title, meter, and default note length.

X:1
T:Simple Scale
M:4/4
L:1/4
K:C
C D E F | G A B c |
  • X: tune number — T: title — M: meter — L: default note length — K: key.
  • Letters A–G are notes; lowercase letters are one octave higher.

Note lengths and rests

Numbers lengthen a note, a slash shortens it, and z is a rest.

X:1
M:4/4
L:1/4
K:G
G2 A2 | B4 | c/2 c/2 d/2 d/2 e2 | z2 d2 |
  • G2 = half note, B4 = whole note, c/2 = eighth note, z2 = half rest.

Note lengths and rests are relative to the default note length set with L:, so the same number means a different duration depending on L::

  • With L:1/4, z2 is a half-note rest (1/4 × 2).
  • With L:1/8, z4 is a half-note rest (1/8 × 4).

Sharps, flats, and octaves

X:1
M:4/4
L:1/4
K:D
^F _B =C C, | c' d' |
  • ^ sharp, _ flat, = natural.

Octaves: uppercase C is Middle C. A comma after a note lowers it one octave (C, is the octave below Middle C), and a lowercase letter is one octave above (c is the octave above Middle C). So C, C c covers three octaves.

Chord symbols above the staff

Chord names in quotes appear above the notes, so the score doubles as a lead sheet.

X:1
M:4/4
L:1/4
K:C
"C"C E G c | "G"B, D G B | "Am"A, C E A | "F"F, A c F |

Chords (stacked notes)

Chords — what classical Western notation shows as multiple note heads on a single stem — are written by enclosing the notes in square brackets [ ], with no spaces inside the brackets. Length and pitch modifiers can be included as needed, and by convention the notes are listed in ascending order, for example [Acea].

Chords can be arranged into beamed groups using spaces, exactly like individual notes:

X:1
T:Chords
M:2/4
K:C
[CEGc] [C2G2] [CE][DF] | [D2F2][EG][FA] [A4d4]|]

Note the difference from the section above: "C" is a chord name printed above the staff, while [CEG] is a chord played as stacked notes on the staff.

Lyrics under the melody

A w: line aligns syllables to the notes above it. Use a hyphen to split a word across notes and a space to move to the next note.

X:1
M:4/4
L:1/4
K:C
C C G G | A A G2 |
w: Twin-kle twin-kle lit-tle star

Multiple verses

Stack several w: lines to add more verses; each renders on its own row beneath the staff.

X:1
M:3/4
L:1/8
K:A
z2 "A"E E | F E3 | z2 "F#m"F E | F A3 |
w: 1.~Al-most Hea-ven. West Vir-gin-ia.
w: 2.~All my mem'-ries gath-er round her.
  • ~ keeps a syllable and the following word joined under one note.

Repeats and bar lines

X:1
M:4/4
L:1/4
K:G
|: G A B c | d c B A :| G4 |]
  • |: and :| mark a repeated section; |] is a final bar line.

Tips

  • JustChords can generate guitar tablature automatically from any of these examples — enable it in the song's notation settings.
  • Keep each staff line short so the score stays readable on smaller screens.
  • You can freely mix chord symbols, lyrics, and multiple verses in the same tune.

Online ABC editors

These free web editors let you type ABC notation and see the score update live — handy for drafting and checking a tune before pasting it into JustChords. Because JustChords renders with the abcjs engine, the abcjs-based editors will most closely match how your score looks in the app.