Site Tools

New release available: 2013-12-08 "Binky". upgrade now! [43] (what's this?)
New release candidate available: 2013-11-18 "Binky" RC2. upgrade now! [42] (what's this?)
New release candidate available: 2013-10-28 "Binky" RC1. upgrade now! [41] (what's this?)

exmid

exmid (Epeios MIDI to XML and XML to MIDI converter)

Introduction

exmid converts a MIDI file to an XML file and resulting XML file back to MIDI. The initial and final MIDI files are strictly identical.

The main purpose od tihs tool is to allow tools such as CVS to better handle MIDI files. MIDI files are binary files, which can only be handled by CVS using the --kb option, which presents some withdraws. To prevent the use of this option, exmid can be used to convert the MIDI file to XML, which is a text format, before putting it to CVS repository.

Regarding CVS, you can put the $Id$ tag, or other CVS tags, in the MIDI file comment tag, for example, using your favorite MIDI sequencer (or other MIDI handling tool). In other words, the content of the meta MIDI events which data are ASCII text (such as the one of id 01h) can be modified in the resulting XML file ; it is correctly handled when converted back to MIDI.

Licences

This tool (and the underlying libraries) are released under the GNU General Public License. This is the default licence, but, under some circumstances, other licences (with less restrictions, like GNU Lesser General Public License) are possible. Please contact me for more details.

Status

  • Last stable release : 0.1.2 (2009-10-14)

How to use

To convert a MIDI file to XML

This is done using following command line :

exmid -x|--MIDToX <MIDI-source-file> [XMID-target-file]

where MIDI-source-file is the MIDI file to convert to XML and XMID-target-file the file where the resulting XML is put. When XMID-target-file is not given, the resulting XML is written to the console.

If XMID-target-file already exists, it sees his name appended with .bak before the new file is written.

To convert the XML file back to MIDI

This is done using following command line :

exmid -m|--XToMID <XMID-source-file> <MID-target-file>

where XMID-source-file is the XML file previously generated by this tool and MIDI-target-file the resulting MIDI file.

If MIDI-target-file already exists, it sees his name appended with .bak before the new file is written.

To do automatic conversion

To simplify the use of exmid in a script, or in some other contexts, there is a command which deduces which conversion is to do based on the extension of the file to convert. If the file has a .mid or .MID extension, the file is assumed as a MIDI file and the conversion is stored in a file with same name, but with respectively .xmid or .XMID extension. If the file has a .xmid or .XMID extension, the file is assumed as an XML file and the conversion is stored in a file with same name, but with respectively .mid or .MID extension.

This is done using following command line :

exmid -a|--automatic <source-file>

where source-file is the file to convert to.

Resources

exmid.txt · Last modified: 2009/10/14 16:50 by 192.168.5.10