MIDI to MusicXML

One of the problems of sharing music with people who prefer
some other music notation software is that until recently the
best available way to do it was MIDI. MIDI has many fine
qualities, but it doesn’t save the same information that printed
notation needs.

There’s a fairly well-thought-of standard exchange format
called MusicXML. Lots of programs (including lilypond)
implement an import of MusicXML, but export is a lot less
common, so most people (including me) who put their work up on
the web can’t give you MusicXML from their source. Finale users
could, but mostly don’t.

The reason I call it an exchange format is that while it
captures all or most of the information any of the notation
programs save, it doesn’t do it in a way anyone would want to
work with. For instance, here’s the information for one note (a
g quarter note in the second octave above middle C) in

<step>G </step>
<octave>5 </octave>
<duration>96 </duration>
<voice>1 </voice>
<type>quarter </type>
<notehead>normal </notehead>

In lilypond, you would normally enter that “g4” (or just “g” if
it were in a string of other quarter notes) and in ABC it
would usually be “g”. So you can see why people would rather
type ABC or lilypond.

Earlier this week, I wanted to transcribe a piece
by Antony
. The whole book this piece is in has been
transcribed, and is on the web at the Werner
Icking Archive.
But the person who did this did it in a
notation program called Capella 5, which I
don’t have. He did provide sources, as well as PDF and MIDI
files, so I tried importing the MIDI file into lilypond, and
decided it would be easier to just enter the lilypond.

One reason I decided this was that midi2ly had decided to spell
all the MIDI pitches that are a half note below B and a half
note above A as A♯ instead of B♭. (The MIDI format only records
what the pitch is in terms of how many half steps from 0
(roughly the bottom of the piano) it is, it doesn’t know
anything about how a notation system would want to write that

So I was excited when I read in a newsletter from Noteflight that they now
have MIDI import. Noteflight is a web-based notation system
that seemed promising when I looked at it a few months ago, but
hadn’t yet implemented anything I was particularly interested in

So I ran the next of the Holborne MIDI files through it, and
was gratified to see that it spelled the notes between B and A
as B♭ instead of A♯. Unfortunately, it spells the ones between
F and G as G♭ instead of F♯. But you can import the MIDI file,
export the XML file, and import the XML file into lilypond and
get something you can work with more easily in several ways than
the direct import of MIDI into lilypond, which is fairly
orphaned. And it may well be that some of the manipulation
you’re going to have to do to the score can be done more easily
in noteflight than in lilypond, although I can’t tell you that
from personal experience.

So if you’re looking for a web-based music notation software,
or a fairly clean way to get MIDI files into MusicXML, look into

Here’s the Holborne Galliard as I imported it from the MIDI
file. I think the only thing I did was to change the key
signature and edit one G♭ into an F♯.


2 thoughts on “MIDI to MusicXML”

  1. Couldn’t you have just used a text editor to replace all instances of “as” (or “ais”) with “bf” (or “bes”), etc.? Were there other issues besides enharmonics that discouraged you from midi2ly? Just curious. I haven’t used it myself.

  2. Even starting with a lilypond file that was entered by a competent transcriptionist, there’s still a fair amount of work to put it in the form I need for my barless editions. In the case of these Holborne files, I would need to edit them so that the repeated sections are displayed correctly, and so that notes tied across barlines have the right value.

    On the other side of the ledger, these files have been competently proofread, and errors in the facsimile corrected.

    But the ledger is pretty evenly balanced, and having to deal with a lot of spelling errors tends to put the balance on the side of doing the note entry myself.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s