For MIDI, yes.
http://www.finalemusic.com/notepad/
.Mid files are basically the "schematics" of a song - it contains note position, pitch, length, velocity, and also what MIDI instrument and channel each note uses. It actually contains no audio information. It uses whatever sounds are assigned to it (when a MIDI file is played in Windows Media Player, it uses the default sound set provided by Windows or your sound card software).
Think of MIDI as blueprint, and the WAV or MP3 as the final product. I don't know of any way to extract the same information from WAV or MP3 files, other than transcribing it yourself.