Filled with the code of Doom
I've been having a look at this out of idle curiosity. GUS cards could have either 256K, 512K, 768K or 1024K of memory on-board, so the file has effectively four configurations, one for each. You can only load a certain number of patches depending on the amount of memory available on your card, so you have to reuse the same patch for multiple instruments. For example, here are the bass instruments from the standard ULTRAMID.INI:
32, 39, 32, 32, 32, acbass
33, 39, 32, 32, 32, fngrbass
34, 39, 32, 32, 34, pickbass
35, 39, 32, 32, 32, fretless
36, 39, 36, 36, 36, slapbas1
37, 39, 36, 36, 36, slapbas2
38, 39, 36, 36, 32, synbass1
39, 39, 36, 36, 32, synbass2
On the 256K configuration, the same patch is used for all 8 instruments (#39 = synbass2). If you upgrade to 512K you get two patches instead (#32, #36). If you max the card out to 1024K you get three (#32, #34, #36).
It seems Doom originally used a copy of standard ULTRAMID.INI that comes with the drivers. This was improved by Tom Klok in gus1m.zip (already mentioned). This was mentioned in the Doom FAQ and it seems Id took the updated config and incorporated it into later versions of the IWAD files (with some modifications? Comments in the DMXGUS lump refer to it as "gus1mx"). Doom 2 uses DMXGUSC which is slightly different to Doom 1's DMXGUS - presumably tweaked for Doom 2's music.
If we want a config for Freedoom, it has to be completely original. A good config would prioritise the patches, so that there would be a variety of distinct patches for the instruments used often in Doom 2's music, with reused/shared patches for the instruments that are less used. It could probably be calculated and generated by an automatic script, using a statistical analysis of Doom 2's instruments as a source. It would also need a list of sets of "similar patches" to work out which ones to combine together.
Testing is an issue because DOSbox's GUS emulation has 1024K of RAM with no option to change it. It could probably be changed by recompiling though.