[Fix] <js> Avoid VSTi notes to stack up in XM files due to missing NNA handling (no, you should still not use VSTis in XM).
This fix got me thinking about a possible externalized program to coexist with openMPT...
Since you fixed this problem with XM files that are using VSTi's, I assume you do that strictly for backward compatibility. So...
I don't know if it would be helpful, but what if there was a separate program which does all the necessary conversions to STANDARD formats? This would allow for backward (and "hacked MPT") compatibility, while reducing code bloat, and perhaps speed, in ModPlug itself. So for example, if a user loads an XM file that uses VSTi's, perhaps created from a previous hack of MPT, the application asks the user if they want to convert the module to a format which normally does allow VSTi's in its standard format. The backward and hack compatibility would remain in the convertor program, allowing the devs to remove the conversion functions from the main code, cleaning it up a bit and making it more efficacious when working with it.
We assume the non-standard file format the user is opening or editing was probably created with a previous MPT hack that allowed the non-standard treatment (such as in this case, XM files using VSTi's). Therefore they would benefit from the conversion into MPTM or some other workable standardized format. (I think the only reason they would not convert is because they're used to the XM commands.)
Like I said, I don't know if the work involved (extracting the conversion methods in the main executable) would be less than keeping up with constant hack compatibility. But it is an idea that should be considered...