MusicXML

October 17, 20111 Comment

Recordare

XML Sheet Music

XML is not just used to organize text. It can be used as the framework to store scalable vector graphics (SVGs) and even sheet music.  Yes, xml sheet music.  This open file format known as MusicXML was developed by Recordare of Los Altos, California.

Because there are several approaches to conceptualize music, MusicXML has six different DTDs:

  • timewise.dtd (top-level element, time-based)
  • partwise.dtd (top-level element, based on the different parts of a score)
  • container.dtd
  • opus.dtd (connects multiple scores together into an opus)
  • midixml.dtd (represents a MIDI file)
  • sounds.dtd (defines whether or not a sound is solo or an ensemble)

There is a free download that contains all of these DTD files as well as several .XSD files and .XSL stylesheets. There are also .XSLT files that can be used to transform a score between the timewise and partwise DTDs.

This format has been developed quite well, and there are even ways to used XML to draw guitar tab and guitar chords as well as percussion notation. It is the hope of Recordare that HTML5 will be able to natively display the .MXL file type or at least will be a step in the right direction. Because .MXL files have to describe rhythm, pitch, time, harmony and sound, each individual measure of music can be a quite large chunk of code.  You can imagine how large a simple song file can be, not to mention a symphony. But XML is sturdy; if it conforms to the DTD it won’t break, and as a single document (as opposed to relational data) its performance and scalability is the right tool for the task.

It will be interesting to see how this technology is integrated into the lives of real, live, breathing musicians.  The possibilities are exciting to imagine.

Leave a Reply

1 Trackback

  1. Math XML | MathML Intelligent Writing

    [...] 29, 2011Leave a replyIn an earlier post I gave a primer on MusicXML as a way to create XML sheet music. Another way that XML can be used to structure and display specialized character types is MathML. [...]