Last updated: February 2001
NOTE
Although the markup follows music notation, MML is not primarily intended for
notation. Delivery should also be possible through synthetic devices.
The images serve as reference only to facilitate understanding of MML.
View this example as an XML file.
The markup below is only for the first page of the score. Markup is thus done as if the first page is the complete score.
<?xml version="1.0"?>
<?xml-stylesheet href="../../style/music.css" type="text/css"?>
<mml xmlns="http://www.musicmarkup.info/dtd">
<head>
<title>Chopin's Trois Nocturne</title>
<meta http-equiv="Content-Type" content="text/mml; charset=iso-8859-1" />
<meta name="composer" content="Fr_ric Chopin" />
<meta lang="fr" name="title" content="Trois Nocturnes" />
<meta lang="fr" name="subtitle" content="A Madame Camille Pleyel" />
<meta name="number" content="Op 9 Nr1" />
<sync match="treb" with="bass" />
</head>
The sync element is used for synchronizing different musical phrases that are to be rendered as units. For audio they need to be played together, for notation they are to be displayed in parallel.
mml | head | title | meta | link | sync
<song tempo="116BMP"
key="Bb Eb Ab Db Gb"
noteset="4"
note="4">
song
clef | key | octave | note | tempo
Markup below is for F Clef (ie right hand) only.

<div match="treb">
<notation clef="C">
</notation>
<upbeat id="first">5(B C D An B) G
<notation>
<bindbegin id="bind1" beat="1" />
<bindend end ="bind1" beat="3.5" />
<slurbegin beat="1" id="slur1" />
</notation>
</upbeat>
<bar barid="treb-1">[F:4]4 G F E C F
<notation>
<bindbegin id="bind2" beat="5" />
<bindend end="bind2" beat="6.5" />
<slurend beat="3" id="slur1" />
<slurbegin id="slur2" beat="4" />
<text>Larghetto</text>
</notation>
</bar>
<bar barid="treb-2">D:2 B:4 5(B C D An B A Gs A C B Gb) C
<notation>
<slurend beat="3" end="slur2" />
<slurbegin id="slur3" beat="4" />
<slurend end="slur3" beat="4.7" />
<bindbegin id="b3" beat="4" />
<bindend end="b3" beat="4.7" />
</notation>
</bar>
bar | bind
| div | slur | text | upbeat
beat | clef | id | match

<bar barid="treb-3">F G En F 5(B An Ab) Gn
Gb F Eb Dn Db C D C Bn C F En Eb C F
<notation>
<bindbegin id="bind4" beat="1" />
<bindend end="bind4" beat="8.5" />
<slurbegin id="slur4" beat="1" />
</notation>
</bar>
<bar barid="treb-4">D:2 B:4 5(B:4)3 D
<notation>
<slurbegin id="slur5" beat="4" />
<slurend end="slur5" beat="6" />
</notation>
</bar>

<bar barid="treb-5">5A2 D:4B C D G
<notation>
<bindbegin id="bind5" beat="3.5" note="B" />
<bindend end="bind5" beat="3.7" note="G" />
<bindbegin id="bind6" beat="3.56" note="B" />
<bindend end="bind6" beat="3.7" note="G" />
<bindbegin id="bind7" beat="6" />
<bindend end="bind7" beat="6.7" />
<slurbegin id="slur6" beat="1" />
<slurend end="slur6" beat="3" />
<slurbegin id="slur7" beat="3" />
<slurend end="slur7" beat="6.5" />
<slurbegin id="slur8" beat="5" />
</notation>
</bar>
<bar barid="treb-6"> F2. E F E D Bbb
<notation>
<slurend end="slur8" beat="3" />
<bindbegin id="bind8" beat="5" />
<bindend end="bind8" beat="6.5" />
</notation>
</bar>
<bar barid="treb-7">A2 D:4 E:4 F E D E
<notation>
<slurend end="" beat="1" />
<bindbegin id="bind9" beat="4" />
<bindend end="bind9" beat="6.5" />
<slurbegin id="slur9" beat="4"/>
</notation>
</bar>

<bar barid="treb-8">F:2 5(B C D An /C:16/ B) G 5B
<notation>
<bindbegin id="bind10" beat="4" />
<bindend end="bind10" beat="6.5" />
<slurend end="slur9" beat="3" />
<slurbegin beat="4" id="slur10" />
</notation>
</bar>
<bar barid="treb-9"> (F:4)4 G F E C F F
<notation>
<slurend beat="3" id="slur10" />
<bindbegin beat="4" id="bind11" />
<bindend beat="6.7" end="bind11" />
</notation>
</bar>
<bar barid="treb-10" beat="4" repeat="one">D:2 B:4
<notation>
<slurend end="" />
<bindbegin id="bind12" beat="1" />
<bindend end="bind12" beat="1.7" />
<bindbegin id="bind13" beat="2" />
<bindend end="bind13" beat="2.7" />
<bindbegin id="bind14" beat="3" />
<bindend end="bind14" beat="3.7" />
<bindbegin id="bind15" beat="4" />
<bindend end="bind15" beat="4.7" />
<bindbegin id="bind16" beat="5" />
<bindend end="bind16" beat="5.7" />
<bindbegin id="bind17" beat="6" />
<bindend end="bind17" beat="6.7" />
<slurbegin id="slur11" beat="1.5" />
</notation>
</bar>

<bar barid="treb-11"> F 5(3F En Eb D C Eb D
C B) G 5(En Eb D C B An G F C
<notation>
<slurend end="slur11" beat="3" />
</notation>
</bar>
<bar barid="treb-12"> D:2 D (5B:2)3
</bar>
</div>
Here is the markup for the left hand (F Clef):

<div id="bass">
<notation clef="bass">
</notation>
<upbeat id="bass">R:2 R:4
</upbeat>
<bar barid="bass-1">B F 3(D B) 4A F B F 3(E An) 4A F
<notation>
<bindbegin begin="1" end="5" />
<bindend begin="5" id="three" />
<slurbegin begin="1" end="5" />
<slurend begin="6" end="10" />
</notation>
</bar>
<bar barid="bass-2" repeat="two"> B F 3(D B F) F
<notation>
<bindbegin="1" id="four" end="4" />
<slurbegin="1" end="4" />
</notation>
</bar>
bar | beat
| bind | div | slur | upbeat
clef | id | match

<bar barid="bass-3" repeat="two, three"> </bar> <bar barid="bass-4" repeat="two, four"> </bar>

<bar barid="bass-5">1D F 3(D F) F 1G D 3B G 3D D
<notation>
<bindbegin begin="1" id="five" />
<bindend begin="5" />
<slurbegin begin="1" end="4" />
<slurend begin="5" end="10" />
</notation>
</bar>
<bar barid="bass-6" repeat="five">1G D 3Bbb G 3D D
<notation>
<bindbegin begin="1" end="6" />
<slurbegin begin="1" end="6" />
</notation>
</bar>
<bar barid="bass-7" repeat="five, six" beat="4">
</bar>

<bar barid="bass-8" beat="4" repeat="four">1F C 3An F 3(E A)
<notation>
<bindend begin="1" end="5" />
<slurend begin="1" end="5" />
</notation>
</bar>
<bar barid="bass-9" repeat="four, three">
</bar>
<bar barid="bass-10" repeat="four">
</bar>

<bar barid="bass-11" repeat="four, three"> </bar> <bar barid="bass-12" repeat="two"> </bar> </div> </song> </mml>
1999, 2000, 2001 © Jacques Steyn