Humdrum Online Command
xml2hum

The xml2hum command converts MusicXML data into Humdrum data.

Input
Data
First, specify the location of the data to be processed in one of the fields below. Note that the data format for input is the MusicXML file format which is text-based.

Upload a file from your computer:

Or, paste the contents of the data file here:
Or, specify a data file URL:


Process
Data
Click on one of the submit buttons below to process the file above using the options given in the section below.
    or

Options
By default, the program will assemble the complete Humdrum score from all parts found in the MusicXML file. If there is an error in the assembly of the score, then you will have to extract the parts individually, and assemble them manually. If you want only a single part extracted from the file, then type the number of the part below (1=lowest part). Leave the parameter empty to extract all parts from the file.
Extract only part number:

If you need to know how many parts are in the file, then select the following option to read the MusicXML header to see how many parts are in the file.
Display only header information: no, yes

Sometimes, extracting a single part is not successful. Choose the debugging option to get the best state of the data that the program could generate so you can fix it by hand.
Debugging information: no, yes

Dynamics can be extracted from a part and placed in a **dynam spine to the immediate right of the part's humdrum file spine.
Convert dynamics: no, yes

Stem directions in the original MusicXML data can be represented in the Humdrum **kern data, or they can be omitted for better readability of the data.
Encode stem directions: no, yes

Note beaming in the original MusicXML data can be represented in the Humdrum **kern data, or they can be omitted for better readability of the data.
Encode beams: no, yes

If you generated the MusicXML file from a MIDI file (Through a notation program such as Finale), then you can fix some of the common accidental errors by selecting the following option.
Fix MIDI accidentals: no, yes



Examples
Convert a MusicXML version of Twinkle, Twinkle, Little Star into the Humdrum data format by first copying the URL below and then pasting it into the URL field for the input data section above:

Here is a more complex example which contains a two-staff piano part with dynamics plus a vocal part with two voices on one staff (converted file; graphic music).

MusicXML Examples from Recordare.com:

Beethoven An die ferne Geliebte, Op. 98, Page 1: (does not yet convert):

Brahms, Wie Melodien zieht es mir, Op. 105, No. 1, Page 1: (does not yet convert):

Debussy, Mandoline, Page 1: (does not yet convert):

Fauré, Aprés un rêve, Op. 7, No. 1, Page 1: (does not yet convert):

Mahler, Lieder eines fahrenden Gesellen: No. 4: Die zwei blauen Augen, Page 1: (does not yet convert):

Mozart, Das Veilchen, K. 476 Page 1: (converts correctly):

Mozart, An Chloe, K. 524, Page 1: (does not yet convert):

Schubert, Ave Maria (Ellen's Gesang III), D. 839 Page 1: (does not convert)

Schumann, Dichterliebe, Op. 48, No. 1: Im wunderschnen Monat Mai (does not yet convert):

Mozart Clarinet Quintet, K. 581 ("Mozart Trio") (converts correctly):

Mozart Piano Sonata in A Major, K. 331 (does not yet convert):

Anonymous, Saltarello (converts):

Telemann "Liebe! Liebe! Was ist schner als die Liebe?" (does not yet convert):

Anonymous, Chant "Quem queritis" (does not yet convert):

Binchois, Magnificat (does not yet convert):



Sample Results

Below is a sample conversion into Humdrum data from the first URL example above for the song Twinkle, Twinkle, Little Star.

**kern
=1-
*clefG2
*k[]
*M4/4
4c/
4c/
4g/
4g/
=2
4a/
4a/
2g/
=3
4f/
4f/
4e/
4e/
=4
4d/
4d/
2c/
==
*-

The graphical reprentation of the same music:



Binaries
Below are binaries for the xml2hum program. Simple usage documentation is also available.

  • xml2hum for Red Hat 9.0 Linux (always the most recent working versions) -- compiled for the Linux Operating System, using Red Hat 9.0.
    • assemble2 -- useful for combining individual parts without using the timebase command with the classic assemble command. Try the command assemble2 staff2.krn staff1.krn.
    • rcheck -- useful for finding rhythm errors (and places where rhythms are misinterpreted by the xml2hum program) Try the command: rcheck file.krn | grep = to view the duration of each measure in the file.
    • tiefix -- useful for fixing ties in output from Sibelius Dolet 1.1 for OS X. Try the command tiefix file.krn.
  • xml2hum for Apple OS X -- (version: 27 June 2004) compiled for the Apple OS X Operating System. Other conversion utility programs:
    • assemble2 (version: 27 June 2004) -- useful for combining individual parts without using the timebase command with the classic assemble command. Try the command assemble2 staff2.krn staff1.krn.
    • rcheck (version: 27 June 2004) -- useful for finding rhythm errors (and places where rhythms are misinterpreted by the xml2hum program) Try the command: rcheck file.krn | grep = to view the duration of each measure in the file.
    • tiefix (version: 27 June 2004) -- useful for fixing ties in output from Sibelius Dolet 1.1 for OS X. Try the command tiefix file.krn.
  • xml2hum.exe for cygwin in Microsoft Windows (version: 27 June 2004) -- Other conversion utility programs:
    • assemble2.exe (version: 27 Jun 2004) -- useful for combining individual parts without using the timebase command with the classic assemble command. Try the command assemble2 staff2.krn staff1.krn.
    • rcheck.exe (version: 27 June 2004) -- useful for finding rhythm errors (and places where rhythms are misinterpreted by the xml2hum program) Try the command: rcheck file.krn | grep = to view the duration of each measure in the file.
    • tiefix.exe (version: 27 June 2004) -- useful for fixing ties in output from Sibelius Dolet 1.1. Try the command tiefix file.krn.