I wanted to add to my music collection some tracks from very old games, for example, Prehistorik. I searched the web and I found a really cool site with the tracks as MID, but they don't sound at all as I want them to. I tried recording the sound directly from DOSBox as a WAV and it worked, but it's a really tedious thing to do, I have to pay attention when the track starts, ends, play the game, wait while the complete track plays, edit the WAV with Audacity, etc. I want to know if there is any way to make a MID file sound like as if was play through a PC speaker, or a converter to transform that MID into a MP3, WAV, FLAC, whatever audio file so I can listen to the "version" I want to listen when I want to.

Okayy.......you have to understand the idea behind PCM, and FM sound. The more electricity being used, more better the sound. That being said adding an extra line or independent line for that instrument is vital. Reason why sound is scratchy when loud is because there is a small amount of room for that sound to be heard.

11khz 22khz or even 44khz sound usually is where videogames are in. The volume of the machine is set to have the game sound at it's most loudest or most reasonable. This is true with all Arcade machines. Another example is how red-book audio might be more and more louder with more earlier technology, as there is less given room, but the sound will come out smooth.

Once you start hearing a scratchiness to digital or analog music, it has past the point where it is aloud to sound smooth. Basically in earlier OS like Windows 98, you could get soft and hard beautiful music at low sample rates but with later OS they have a spectrum that goes beyond that. It is the same reason why graphics from Early 2000 games ( like a GBA game, or regular TV ) looks terrible on a HD display. Because the HD display is using pixels to gain. However graphics from a DOS game from the 1980's ( even most arcade games ) looks beautiful on almost all HD games. Using IMAGES over pixels decreases appearance of images, and decreases sharpness. This is why original television technology is more sophisticated even while cheaper at displaying images.

So think about your sound issue as with HD television. They on purposely rigged the OS to have a higher spectrum/sampling rate. ( Like take a PCE vs a Sega Saturn playing a CD ). The same issue could be heard on a PSX playing "Megaman Legends" as the background music made specifically for the SONY encoded music, is compressed but comes out with any annoying high pitch/frequency sound when it is too loud.

There is nothing wrong with the midi. The midi you got is either poorly constructed or the machine it was stripped from is using different technology. A good example is how the SNES will always have clear beautiful sounds, that echo's. This is because SNES is using SONY sound chipds and sometimes the music encoded is also using the MODE 7 chip to play as well.
That with a great sound system will provide over excellent sound.

While the PC can emulate and run the sound with sharpness, or even enhance it. IT WILL NEVER SOUND THE SAME NO MATTER WHAT. Same with an n64 game like "Perfect Dark" ( Or Super Mario RPG ) that uses commercial music that is compressed for the N64 but is made for various music formats.

Machine + Music + Speaker device + Electricity = the sound you want or do not want to hear.