XMidi Home Page

Contents


Introduction

I have recently been learning about XML. Since I have backgrounds in both music and computers, it seemed a natural choice to write an XML application for music.

Actually I have thought of two music apps for XML. This, XMidi, is the first. The other, XMusic, is still in an early stage.

By the way, let me introduce myself. My name is Peter Loeb. I have been a professional programmer for over 20 years and a professional musician for more years than I care to count. This is my first XML application. Contact information is included in the closing section.

What is XMidi, Anyway?

XMidi is an XML application for MIDI. What does this mean?

What is MIDI

MIDI (Musical Instrument Digital Interface) is really two things.
  1. MIDI is a way for electronic (musical) instruments to communicate. In this context, a computer can be a musical instrument. This form of MIDI is simply signals going through cables. This was the "original" form of MIDI.

    When a MIDI instrument is connected to a computer, running the right kind of software (a sequencer), a MIDI "stream" (the signals going through the cable) can be "captured" and recorded into a computer file. This is called a midi file.

  2. MIDI can exist as a file on a computer. This is the form I am interested in here. The MIDI file format has become the de-facto industry standard for music programs of various kinds.

    A MIDI file is a "binary" file. This means that, unlike a text file (.txt), it is not easily read by "normal" programs, and not easily read by humans. Try opening a MIDI file (.mid) in Notepad!

What is XML

XML (eXtensible Markup Language) is intended to do for data interchange what HTML has done for presentation on the web. If you want to know more about XML (or HTML, or a lot of other things for that matter), I suggest you look at the
W3C (World Wide Web Consortium) web page.

Briefly, XML is a way of formatting data so that it can be understood by humans and computers, and so that it can be easily shared by a variety of different programs.

What is XMidi

XMidi is an XML application I wrote to handle MIDI files. It is "open source" software. There are three basic parts:
  1. MX - a program to convert a midi file to XMidi format.
  2. XM - a program to convert XMidi format to a midi file.
  3. XMidi.dtd - a DTD (Document Type Definition) to "validate" an XMidi document.

Why XMidi?

There are several issues to address.

Music Notation

XMidi doesn't deal with music notation, yet. That will be the realm of
XMusic. However, it is a big issue, here. Music notation evolved over hundreds of years into its present (somewhat chaotic) form. Although there are books which attempt to define rules for notation, the experts do not entirely agree.

Further, there are numerous "splinter" groups, each of which have different notational needs.

Certain things are quite clear:

MIDI

MIDI allows electronic musical instruments to communicate with each other. This is a truly awesome accomplishment and should not be underestimated. However, in order to do that, it was necessary to make it user-hostile.

MIDI files are not easy to read, even for computer programs! Having written some programs which deal with MIDI, I can attest to that.

XMidi

XMidi is a first step towards bridging the gap between electronic musical instruments (including computers) and traditional music notation. The second step will be XMusic.

Despite the fact that I am quite far from reaching the above goal, yet, I believe that even in its present form, XMidi may prove to be quite useful. Some of the potential uses that I see (aside from the above) include:

The XMidi package

The XMidi files can be downloaded in
one zip file which contains these pieces: The silfide.jar file can be used as an XML parser. It works fine. You may want to get a more up-to-date version at the author's website. Support for several parsers is built-in. See the javadoc, particularly the overall package description.

Since I find it annoying to download software which doesn't tell you how to use it, I have tried to include all the information you need in the javadoc. If you un-zip the zip file to a subdirectory called "base", then you can open base/doc/index.html in your browser and the rest should be self-explanatory.

Licensing

Each piece of source code contains a copy of the MIT Licence. My intent is that this should be "open source" software. See OSI for a description of what that means.

I hope that this idea (along with its companion, XMusic, will be picked up by some of the commercial software companies so that people will be able to transfer "documents" (music) from one program to another easily.

Closing

If you have questions, comments, suggestions, etc. you may contact me at peter@palserv.com.

Enjoy...

Last updated Jan 9, 2001.