Midi files are rather special files:
Quote: "
Musical Instrument Digital Interface, or MIDI, is an industry-standard electronic communications protocol that defines each musical note in an electronic musical instrument such as a synthesizer, precisely and concisely, allowing electronic musical instruments and computers to exchange data, or "talk", with each other. MIDI does not transmit audio - it simply transmits digital information about a music performance."
You really can't code music in any standard audio format into a midi file - you have to compose it in midi. There are a few convertors out there, but they are awful, as they generally try to synthesize your (say) .mp3 file in a single instrument, which just doesn't work!
"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library
First you Dream, then you ... - Neil Gaiman, 2001