Language…
13 users online: 1337doom, AbuseFreakHacker,  BeeKaay, ben15420, Gorry, Green, LadiesMan217, OrangeBronzeDaisy, playagmes169, Rykon-V73, ShoopDaWhoop, signature_steve,  YouFailMe - Guests: 282 - Bots: 542
Users: 64,795 (2,369 active)
Latest user: mathew

IT2AMK output shrinker

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:

https://github.com/RetroSwimAU/QnDoptimiser

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. :P
Honestly, this could be quite useful. I haven't actively hacked in literal years, but I remember trying to get some IT music into my hack back in the days, and I remember how impossible it seemed. This might actually come in handy for people how don't care about ROM consumption and just want to get some music into their hacks quickly.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Originally posted by RPG Hacker
This might actually come in handy for people how don't care about ROM consumption and just want to get some music into their hacks quickly.


That's basically where my mind was at when I wrote it.

Thanks for the kind words! :)
I know I've done this basic optimization process multiple times by hand, and while pretty easy, it's also tedious, so having an automated way to do it is pretty cool!
Originally posted by KevinM
I know I've done this basic optimization process multiple times by hand, and while pretty easy, it's also tedious, so having an automated way to do it is pretty cool!


Cheers! :)

I should mention that if people find bugs, I'm happy to go in and fix them. I just don't have the time right now to deep-dive in to what would effectively be a rudimentary dictionary-based compression algorithm! :P
I might go ahead and try it as long as I can start porting music very soon. This tool designed for optimizing music looks very promising!
The Hacking of PuyoPuyo. Come join the fun, friends. 『いけいけ団長、頑張れ頑張れ団長!』
Help us raise funds for the Armed Forces of Ukraine. #ДопомагаємоРазом / #HelpTogether
“Even if you personally are so dissatisfied with life that you want the world to end, surely the cruel reality is that it will continue on, unchanging. All the better for someone perfectly content, like me.”
Aya Shameimaru, Touhou Suzunaan ~ Forbidden Scrollery
This is so cool! I might have to use it.