I converted an ImpulseTracker file to MML, as part of learning how to port, and the resulting file was >120KB, absolutely massive.
I then found that IT2AMK's output roughly puts IT patterns on individual lines.
I figured I could shrink the file significantly by consolidating re-used patterns into 1x loops with labels.
The result of 10 mins work by sleep-deprived me, is this:
A strictly whole-line-based file-shrinker for IT2AMK output. I regret calling the project Quick n Dirty "Optimiser", because the output is hardly optimised, just smaller. ~75% smaller in my case, but still probably way larger than it needs to be.
Don't use only this if you want to submit your music to this website. I made it because my text file kept causing AddMusicK to say "out of ROM space", and I didn't want to spend hours and hours hand-optimising just to find out I didn't like the outcome.
Download exe here: https://github.com/RetroSwimAU/QnDoptimiser/releases/tag/1.0.0
Requires .NET Framework 4.7.2
Usage: Drag-n-drop the MML file from the IT2AMK output folder on to QnDoptimiser.exe, or run "qndoptimiser (full path to file)" at the command prompt.
Providing this as-is, such that it might get somebody out of a pinch. I don't plan to improve it or add features. Maybe in the future I'll attempt a more robust dictionary-based algorithm. One day.