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

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,231
  • 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 1.21.01.15) 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 the following software, don't enable stereo compression:
  • OpenMPT versions prior to 1.12.01.15
  • ModPlug Player / ModPlug Tracker
  • Players based on libmodplug (e.g. VLC)
  • MadTracker 2
  • ChibiTracker
  • Schism Tracker versions before 2014-03-04
  • older versions of BeRoTracker
  • some other software I haven't tested

Also, due to how (Open)MPT previously decoded IT-compressed samples, older versions (again, all versions prior to 1.21.01.15) 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: August 01, 2017, 19:33:47 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.