Because I'm using IMF Creator to create songs for Wolfenstein 3D, and they become too long because there's too many unused instruments.
Details: I'm using premade midis to make IMF files, but it turns out they're too long, and I need to remove the unneeded instruments.
MIDI files don't contain instrument data. IMF files, however, probably contain Adlib patches. You can only make those smaller by acutally using less instruments. I assume you're using modplug for creating those midi files, so all you'd have to do then is using less instruments in MIDI export. But ModPlug is not exactly the swiss knife of MIDI, so you don't have many possibilites to creater smaller MIDI files in it.
Checking the IMF specs (http://www.shikadi.net/moddingwiki/IMF), it doesn't look like there's some arbitrary file size limit for IMF files, though.
Yeah, but I wonder: "What does remove instruments from midis?"
using less different instruments? I can imagine that you can just use 9 instruments in a IMF file because the OPL2 chip has only 9 voices. But I don't know how voices are assigned when converting from MID to IMF, so I cannot tell. I have never modded those games myself.