To give a flavor of MusicXML, here is an encoding of the beginning of the voice part of Robert Schumann’s Op. 35 setting of Kerner’s “Frage,” illustrated in Figure 1.
<?xml version="1.0" standalone="no"?> <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> <score-partwise> <part-list> <score-part id="P1"> <part-name>Voice</part-name> </score-part> </part-list> <part id="P1"> <measure number="0" implicit="yes"> <attributes> <divisions>4</divisions> <key> <fifths>-3</fifths> <mode>major</mode> </key> <time> <beats>2</beats> <beat-type>4</beat-type> </time> <clef> <sign>G</sign> <line>2</line> </clef> <directive>Langsam, innig.</directive> </attributes> <note> <pitch> <step>G</step> <octave>4</octave> </pitch> <duration>2</duration> <type>eighth</type> <stem>up</stem> <notations> <dynamics> <p/> </dynamics> </notations> <lyric> <syllabic>single</syllabic> <text>Wärst</text> </lyric> </note> </measure> <measure number="1"> <note> <pitch> <step>F</step> <octave>4</octave> </pitch> <duration>3</duration> <type>eighth</type> <dot/> <stem>up</stem> <lyric> <syllabic>single</syllabic> <text>du</text> </lyric> </note> <note> <pitch> <step>E</step> <alter>-1</alter> <octave>4</octave> </pitch> <duration>1</duration> <type>16th</type> <stem>up</stem> <lyric> <syllabic>single</syllabic> <text>nicht,</text> </lyric> </note> <note> <pitch> <step>E</step> <alter>-1</alter> <octave>4</octave> </pitch> <duration>2</duration> <type>eighth</type> <stem>up</stem> <lyric> <syllabic>begin</syllabic> <text>heil</text> </lyric> </note> <note> <pitch> <step>B</step> <alter>-1</alter> <octave>4</octave> </pitch> <duration>1</duration> <type>16th</type> <stem>up</stem> <beam number="1">begin</beam> <beam number="2">begin</beam> <notations> <slur type="start" number="1"/> </notations> <lyric> <syllabic>end</syllabic> <text>ger</text> <extend/> </lyric> </note> <note> <pitch> <step>G</step> <octave>4</octave> </pitch> <duration>1</duration> <type>16th</type> <stem>up</stem> <beam number="1">end</beam> <beam number="2">end</beam> <notations> <slur type="stop" number="1"/> </notations> <lyric> <extend/> </lyric> </note> </measure> </part> </score-partwise>
clear
MusicXML score files do not represent presentation concepts such as pages and systems. The details of formatting will change based on different paper and display sizes. In the XML environment, formatting is handled separately from structure and semantics. The same applies for detailed interpretive performance information. Separate XML languages could be developed to represent individual printings and performances.
Each MusicXML score file represents a single movement. Multi-movement works and collections are represented in a MusicXML opus file, based on a separate DTD for linking and musicological data.
MusicXML documents are larger than previous text formats such as MuseData and Humdrum. However, XML documents compress well, and zip compression typically reduces the size of MusicXML files by a factor of 30. MusicXML files that are seven times larger than MuseData files when uncompressed are only twice as large when compressed.