I think I might have come up with a way to make it do-able, but of course, I don't have the skills - or the source - to add to.
MikMod, its been mentioned, supports XM files.
XM files containt the samples they're using.
So what you do is create 1 XM file with 128 instruments in, roughly parallelingn the General Midi set.
Each instrument would only have a scale from, say, 4 octaves below middle C to 4 octaves above middle C wthin that file.
What you then have, effectively, is a wavetable you can use to play midis. I.E. A midi file is read, a note is seen, and since the XM is a solid-state file in that its always going to contain the same data, its pretty easy to work out where that note is within the XM file. And you play that and loop the sound long enough to get the same length of note in the mid.
Any points on whether this would work (apart, of course, from the fact that mikmod is closed source; although I'm told CHN may be planning to add XM support to his mod-library sometime in the future)? Only problem I can see with it is a potentially huge file with all the samples in, but even then I doubt it'd be too bad considering the length of most of them. The reason, btw, I say use XM files over standard MOD files is because they can have a lot more channels. 16, in fact. Like midi. Whereas mod only has 4, so you could easily run into a few problems using that for conversion.