Package com.palserv.XMidi

XMidi

See:
          Description

Interface Summary
iTag Provide the Tag interface.
 

Class Summary
ByteLen internal class
CmdLineArgs internal class
MX Convert a midi file to an XMidi (XML) file.
State Hold state data for calls to Tag subclasses.
Tag Base class for all Tag classes.
TagAFTER Implement the AFTER tag.
TagAttr Convenience class to represent the name/value pair of an XML attribute.
TagCHANNEL Implement the CHANNEL tag.
TagCHUNK Implement the CHUNK tag.
TagContent Base class for all TagContent classes.
TagContentEDATA Handle the content of the EDATA tag.
TagContentFORMAT Handle the content of the FORMAT tag.
TagContentHEXDATA Handle the content of the HEXDATA tag.
TagContentPPNQ Handle the content of the PPNQ tag.
TagContentTRACKS Handle the content of the TRACKS tag.
TagCONTROL Implement the CONTROL tag.
TagDELTA Implement the DELTA tag.
TagEDATA Implement the EDATA tag.
TagFORMAT Implement the FORMAT tag.
TagHEXDATA Implement the HEXDATA tag.
TagMThd Implement the MThd tag.
TagMTrk Implement the MTrk tag.
TagNOTE_OFF Implement the NOTE_OFF tag.
TagNOTE_ON Implement the NOTE_ON tag.
TagPPNQ Implement the PPNQ tag.
TagPRESSURE Implement the PRESSURE tag.
TagPROGRAM Implement the PROGRAM tag.
TagSTATUS Implement the STATUS tag.
TagTIME_SIG Implement the TIME_SIG tag.
TagTRACKS Implement the TRACKS tag.
TagWHEEL Implement the WHEEL tag.
TagXMidi Implement the XMidi tag.
Util internal utilities
Version This class does nothing but provide the "global" version number.
XM Convert an XMidi file (XML) to a midi file.
 

Package com.palserv.XMidi Description

XMidi

Author: Peter Arthur Loeb

2005-03-16

Version 1.4

The XMidi package contains two programs, MX, and XM, which allow conversion between the midi file format and an XML format which I call XMidi. I gave it the name XMidi for what I hope are obvious reasons, but in retrospect, it was probably a poor choice; the name has been used elsewhere for other purposes. My choice has caused a slight bit of confusion. Sorry.

In general, both programs may be executed from the command line, or from another Java program. In both cases, there are two kinds of arguments, options and non-options. Options are distinguished by their leading hyphen, may occur in any order, and may be interspersed with non-option arguments. Non-option arguments occur in order: input_file and output_file. For details about the command line, see Util.getCmdLine. For details about execution from another program, see XM and MX.

For simple usage, both MX and XM take two arguments, an input file and an output file. MX takes a MIDI file and converts it to an XMidi file. XM takes an XMidi file and converts it to a MIDI file. The runMX.cmd and runXM.cmd files show how to invoke the programs in Windows, but these can be modified to include classpath, etc.

As an example, we will convert ex01.mid to ex01.xml in verbose mode, the default.

runMX ex01.mid ex01.xml

My intent is for this program to be "open source" in the sense of Open Source Initiative (OSI). I hope that explains it.

In the meantime, Mark Leicester has modified some of the code (from Version 1.3) so it could be used in the Apache Cocoon project. This is very gratifying to me. Thanks, Mark.

The earlier version (1.3) allowed -p and -q flags, which are no longer supported. However, they are no longer needed.

Any and all feedback should go to me.