Author Topic: IT-compressed samples  (Read 2739 times)

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,108
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
IT-compressed samples
« on: February 19, 2013, 14:44:31 »
So, OpenMPT recently got support for saving IT-compressed samples in IT and MPTM files (since v1.21.01.15). Since it is experimental and will break older versions of OpenMPT in some way or another, it is not enabled by default. Here's what you need to know about IT compression:

You can change the following settings in the Advanced Settings:

Misc.ITCompressionMono=x: Enables IT-compressed mono samples when saving IT/MPTM files. x is a combination of format flags: Normal IT = 1, Compatible export IT = 2, MPTM = 4. Add the numbers up to enable saving in the formats you want to (e.g. 6 will save IT-compressed samples in compatible ITs and MPTM files).
Misc.ITCompressionStereo=x: Enables IT-compressed stereo samples when saving IT/MPTM files.

Since various applications (like all versions of OpenMPT prior to have trouble reading stereo samples, there are two options for mono and stereo samples. If you want to write a tune that plays correctly in older versions of OpenMPT, MadTracker 2, ChibiTracker, SchismTracker and older versions of BeRoTracker (and a few others which I haven't tested), don't enable stereo compression.

Also, due to how (Open)MPT previously decoded IT-compressed samples, older versions (again, all versions prior to will fail to load the extended instrument and song settings if there are any compressed samples. This means that if you use any OpenMPT hacks (this does not include the original MPT hacks like VST plugins or channel / pattern names) in your song, they will not load properly in older versions. Obviously, this doesn't matter if you are using compatibility export, because then these options are gone anyway.

Summary: I'd suggest the values ITCompressionMono=7 and  ITCompressionStereo=6 for backwards compatibility with a large number of software while still maintaining small file sizes.

Oh, and there's one good thing about this, too: GreaseMonkey's IT compression code (which I have translated from Python to C++ for OpenMPT) actually compresses samples slightly better than the original Impulse Tracker did!
It's also worth mentioning that e.g. zipping an IT-compressed file will still produce smaller results than just zipping the uncompressed file, which isn't all that common when applying more than one compression algorithm on some data.
« Last Edit: October 09, 2015, 12:51:09 by Saga Musix »
ยป No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.