Ah, an Ask Xorlak question:
"You can record sounds from almost any game (including ROMs) without any extra software. From your computer's master volume control (usually you can get to it by double clicking the sound icon next to the clock) goto 'options' -> 'properties', then click on the recording bullet and make sure 'mono mix' and/or 'stereo mix' is checked below. Click okay. Now at the bottom of each recording device there should be a place where you can check that says 'select'. Check either mono or stereo mix and make sure its volume isn't too high (or the recording will be distorted). When you're done, open up sound recorder (under the accessories menu) and you should be able to record WAVs of almost anything."
Once you get the WAV file, you can convert it into an MP3 using software like "WAV to MP3 encoder", which you can probably find through Google. If you want to turn it into a MIDI though, I don't think it's that easy.