Please see my comment to the question. There is no such thing as "convert".
I want to explain to you at least the part of the problem. First of all, why the formulation of this problem makes no sense at all in general case? This is simple: MIDI operates with modern European 12-tone tonal system in
equal temperament:
http://en.wikipedia.org/wiki/Equal_temperament[
^].
Essentially, MIDI data is the set of events over the
notes of this system and different instruments with different
timbres: note start (relative volume and instrument is specified), note ends; special notation for
percussion exists, there is data for
bending. Pretty much, that's all. These events are note sounds themselves; the MIDI is pretty much a form of traditional
music notation.
In general audio record, there is no such thing. There are no notes at all; there is a complicated dynamic audio wave form. Even if you break it into some time frames and perform
Fourier transform, you will find frequencies which don't fit any tonal system or any rules at all. Now, the trick is:
this is pretty much so even if this is music. (!)
Even for record we typically perceive as music, the situation remains uncertain. In many recorded music pieces, there is a lot of noise, string timber of voice and instruments smudges the tones; and the tones themselves could be strongly bended. I don't even want to discuss the situation when alternative temperaments are used, such as
microtonal; and this is the big part of music of different culture, and also modern microtonal music, including rock:
http://en.wikipedia.org/wiki/Microtonal_music[
^].
How about modern classic music performed cleanly, with distinct tones using the "standard" tonal system I described above? Theoretically speaking, it make the situation resolvable: there are "notes". Only
this is extremely difficult problem. Let me put it this way: all open-source tools I found so far were unsatisfactory. Want to storm a huge problem? Well, you would need to learn a lot in the physics of waves, functional analysis, Fourier transform and Fourier analysis, and, more importantly, get the general understanding of all the problems. Even this minimum means serious education. To see what is it all about, you can start with
http://en.wikipedia.org/wiki/Wave[
^],
http://en.wikipedia.org/wiki/Functional_analysis[
^],
http://en.wikipedia.org/wiki/Fourier_transform[
^].
—SA