How to Reduce File Size?
BotB Academy n00b s0z
Level 13 Grafxicist
post #112462 :: 2019.07.07 5:45am
I don't think I've ever made a 64k module that has fit within the file size limits of this website. I've been wanting to submit a file to Summer Chip IX, but it's over 1 MB. Where is the "bulk" of the data in an MPTM file? I've converted the samples to 8 bit, minimized the amount of samples, even got rid of plugins but the file is still too big. Do I have to compress the samples?
The file is 1.78 MB and has 8 channels, 10 instruments and 43 samples.
Level 30 Chipist
post #112463 :: 2019.07.07 6:40am
43 samples sounds like a lot, even if you set them all to 8bit and mono.

try to use pattern jumpin techniques together with channel mut/unmute commands (something like its done here:
apart from that: use maybe? though i dont think it will reduce a file from over 1MB down to 64k :/
Level 13 Grafxicist
post #112474 :: 2019.07.07 3:47pm
The weird thing is, some of the samples are "empty"? And I don't know how to get rid of them? Like I used the "remove unused samples" option in OpenMPT but there are still just random blank samples for no reason.
Level 30 Chipist
post #112475 :: 2019.07.07 4:05pm
empty samples doesnt affect the file size in any way, so that should be no problem
Level 27 Chipist
post #112491 :: 2019.07.08 9:02am :: edit 2019.07.08 9:22am
  Blue_Christmas and kleeder liēkd this
You'd be likely converting that over to Impulse Tracker... thus, the MPTM format itself is not always a reliable indicator of filesize.

My own techniques involve taking advantage of the auto-optimization techniques regarding exact matches of effect, instrument and volume/pan IDs. Each time this happens, you save bytes on a per-pattern basis (and in the case blank rows, they essentially cause those rows to become essentially free, since they take up a byte by default), since the Impulse Tracker file format has flags that carry the values over from a last defined row in the pattern.

If there are random blank samples in there, maybe they're literally samples that are just blocks of silence. I'd delete them manually, and sort the samples that you do use without gaps into the lowest IDs.

I would also strongly recommend a lot of downsampling... and making sure the samples are not in stereo, since that's double memory consumption.

I'll give you an example with my own 64K entry. I'm going to also give raw row counts, since that's more reliable than a pattern count (but I will also do that).

All of my samples were 8-bit to start with. Although I had leftovers at the end, my total "length" (in this case, bytes, since one sample is 8 bits=byte, not counting headers required for the samples themselves) is 27,604 bytes (that's also the total length). This also doesn't count the original Impulse Tracker's compression that can be applied to the samples, on that note... I opted out this time. I used a total of 10 samples: the largest was 8500 bytes, the smallest a mere 384 bytes (you can go even smaller, just watch the interpolation since smaller samples and lower pitches are much more noticeably affected by interpolation, and specify if you need either no interpolation. I also used 13 instrument slots for my samples.

In addition, I made my song in 26 patterns. Of those, 6 of those were 64 rows: the rest of them were 32 rows per pattern. In the end, I used 1024 rows, and at most 29 channels.
Level 13 Grafxicist
post #112496 :: 2019.07.08 10:07am
  KungFuFurby liēkd this
Thanks, very helpful :)
I am very new to having any sort of memory limitations, so this is very useful information to me. Unfortunately I feel like I'll have to start a new song from scratch so that I can have something that sounds like what I want while also being within these limitations... I think my problem was that I found out what 64k meant too late lol

LOGIN or REGISTER to add your own comments!