Midi Hacking: use soundfonts with any soundcard

A bit of background: midi is a sound format used heavily prior to around 6 years ago when computers and storage became powerful enough to handle MP3 or OGG formats. The advantage to .mid files is that they were incredibly small. A 20 minutes song will often weigh in at less than 120kb. The way this was done is to store the instruments on the sound card, the result was that some sound cards sounded a whole lot better than others. Soundblaster cards introduced a format called soundfonts that allowed one to replace the instruments on the card through software. Until now, there were only a handful of third party solutions like wingroove and a yamaha softsynth to experience decent sounding midi on a cheap or integrated sound card.

My solution is to basically hack the directmusic driver.

If you run dxdiag and go to the directmusic tab, it says “general midi dls collection: C:\WINDOWS\system32\drivers\gm.dls “. On an x64 system it will say “C:\WINDOWS\system32\drivers\etc\gm.dls” The dls file basically contains the samples for each midi instrument. What you need to do is replace that file with a better sounding dls file.

This introduces a problem in that there are no repositories of dls files. The solution to this is to download soundfonts instead and then convert them to dls version 1. SF2 soundfont files can be found in lots of locations all over the internet, googleing for sf2 midi is a good place to start.

Then use a program like awave studio (not free) or Extreme Sample Converter to convert the SF2 to a version 1 dls file and then use it to replace the gm.dls file. But wait, 3 seconds later the original file returns. This is due to windows file protection. For some reason M$ thought their incredibly poor midi file was worth protecting (along with freecell apparently). You can either google for an in-depth solution, or go to c:\windows\system32\dllcache and erase gm.dls from there. Of course, that file also has WFP on it. The easiest way to get rid of it is by using the recovery console on the windows disk, a boot disk like BartPE or Xandros Linux. Now when you replace the file in etc or drivers, windows will complain about an incompatible file but won’t be able to auto-replace it with their inferior one.

Enjoy great sounding midi on your cheap/integrated sound card! I have done this on windows xp64, as well as 32-bit XP.

~ by krakenx on January 31, 2007.

Leave a Reply