musicxml2mid


NAME

musicxml2mid - Perl script to convert MusicXML to MIDI


SYNOPSIS

 musicxml2mid Example.xml > Example.mid
 musicxml2mid Example.xml | aplaymidi -
 musicxml2mid -v      # prints version number


DESCRIPTION

This script converts a musical score in MusicXML format into a MIDI file. It uses the XML::Parser module to read the xml input, and the MIDI-Perl module to put together the midi output.

It was written to assist in debugging "muscript -xml".

It handles both partwise and timewise scores, and seems to work correctly on all the sample MusicXML files at www.recordare.com, and on all output from "muscript -xml".

There is (was ?) a Python script called musicxml2midi on Sourceforge, so this script has no final "i", to reduce the amount of confusion...


OPTIONS

-d
Generates Debugging output.
-v
Prints Version number.


INSTALL

The current version of musicxml2mid is available by http at www.pjb.com.au/midi/free/musicxml2mid (save it to disc, make it executable, and move it into your $PATH),
or as part of www.pjb.com.au/midi/free/midiscripts.tar.gz (unpack the tar archive somewhere in your $PATH).
If necessary, edit the first lines to reflect where perl is installed on your system.

You'll also need to install the MIDI-Perl module, the XML::Parser module and the Archive::Zip module.


CHANGES


2.3, 20211224, to get a karaoke file from Finale (Eric Slutz)
2.2, 20210910, replace E2 80 99 with ' in the raw XML
2.1, 20210909, use Archive::Zip to extract from zip input
2.0, 20210908, defend against time_signature = 0/0
1.9, 20210906, defend against time = <senza-misura/>
1.8, 20200829, workaround to suppress wide characters
1.7, 20090205, add lyric events, as suggested by Albert Frantz www.key-notes.com
1.6, 20070301, fix bug with a timesig after the start
1.5, 20070301, fix bug in rests
1.4, 20070228, Char handler copes with multiple calls in a single string
1.3, 20070227, correct MIDI Type (format=1) if multiple parts (thanks to Pete in comp.music.midi)
1.2, 20070225, handles timewise musicxml, different <divisions> in each <part>, grace notes, and short bars
1.1, 20070222, handles channels in recordare and muscript files


AUTHOR

Peter J Billam   www.pjb.com.au/comp/contact.html


CREDITS

Based on Larry Wall's XML::Parser module and Sean Burke's MIDI module.


SEE ALSO

www.pjb.com.au/muscript
www.pjb.com.au/midi/bassline.html
www.pjb.com.au/midi/mididump.html
www.pjb.com.au/midi/midiecho.html
www.pjb.com.au/midi/midiedit.html
www.pjb.com.au/midi