ABC notation is a shorthand musical notation for computers using letter notations. It was originally developed in the late 1990s for French bagpipes but gradually expanded to music generally. The files are simple text files that are read by software and either played on the computer speaker or rendered into sheet music. There are similarities to LaTeX. From Andrew Lenz's website, there is the abc notation for a tune:
X:1
T:The Brown Haired Maiden
N:Very common tune.
Z:Transcribed Sept. 28, 2003 by Andrew T. Lenz, Jr.
C:Traditional, Arr. PM Jay Salter
R:March
M:2/4
L:1/8
Q:1/4=80
K:HP
|: A | {Gdc}d3/2c/2 {g}B{G}A | {Gdc}d2 {e} A3/2{Gdc}d/2 | {g}fd {gf}gf | {g}fe {A} e{gf}g |
\
|f/2a3/2 {fg}fa | A2 {Gdc}d3/2e/2 | {g}f2 {gf}ge | {Gdc}d2 {gdG}d :|
\
|{gf}g | f/2a3/2 {fg}fa | A2 {Gdc}d3/2e/2 | {g}fd {gf}gf | {g}fe {A} e{gf}g |
\
|f/2a3/2 {fg}fa | A2 {Gdc}d3/2e/2 | {g}f2 {gf}ge | {Gdc}d2 {gdG}d{gf}g |
\
|f/2a3/2 {fg}fa | A2 {Gdc}d3/2e/2 | {g}fd {gf}gf | {g}fe {A} e{gf}g |
\
|a3/2g/2 {fg}fa | A2 {Gdc}d3/2e/2 | {g}f2 {gf}ge | {Gdc}d2 {gdG}d |]
The notes are defined as shown in the figure above. In the code the default is an eighth note (L: 1/8). So if one rights d , one rights a d eighth note. The code above generates the following sheet music:
All of this is opensource. Most commercial programs are based on a similar approach. The software is downloadable at: https://sourceforge.net/projects/easyabc/ .
Sources: