Author Topic: Detection of Saved With Info for files Extracted with Old unmo3 Versions  (Read 1526 times)

Offline Slender

  • Shy artist
  • Posts: 3
Perhaps may not be appropriate for this forum? This is somewhat related to an earlier bug report of mine, https://bugs.openmpt.org/view.php?id=1132. I noticed that IT files generated by old versions of unmo3 appear to report unknown in the last saved with field, similar to the module in that bug report. TO reproduce, run the depack script in this music disk, which has unmo3 version 0.3 bundled with it. http://armagon.org/mods/buried/musicdisk/BuriED%20-%20Warfare.zip. Is it possible to detect those versions of unmo3? Or is there basically not much that can be done to detect them?
« Last Edit: July 06, 2019, 06:00:04 by Slender »

Offline manx

  • OpenMPT Developers
  • *****
  • Posts: 237
Maybe.


   const bool possiblyUNMO3 = fileHeader.cmwt == 0x0214 && fileHeader.cwtv == 0x0214 && fileHeader.highlight_major == 0 && fileHeader.highlight_minor == 0
      && fileHeader.pwd == 0 && fileHeader.reserved == 0 && (fileHeader.flags & (ITFileHeader::useMIDIPitchController | ITFileHeader::reqEmbeddedMIDIConfig)) == 0;


This version of unmo3 sets fileHeader.cwtv = 0, which causes us to skip all unmo3 detection logic.

I am not familiar enough with the IT format to come to any final conclusion here though.

Saga Musix?

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,072
    • http://lpchip.nl
  • Operating System: Windows 10 Pro x64
This is a wild guess here, and Saga Musix is probably gonna shoot me for this, so take this with a grain of salt (unless I got it spot on, then yay!)

If I remember correctly, IT file does have compression but not using the MO3 format, and that was added later. I wouldn't be surprised if this bit is set for backwards compatibility.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline manx

  • OpenMPT Developers
  • *****
  • Posts: 237
Sorry, LPChip, but you are completely missing the point here ???

This has nothing to do with IT sample compression, or with MO3 sample compression (which does not even exist in IT files, but is native to MO3 files). The problem concerns the tracker that OpenMPT detects as having saved the IT file in question. It gets detected as unkown, if this particular old version of unmo3 wrote the IT file (decompressing it from a MO3 file).

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,072
    • http://lpchip.nl
  • Operating System: Windows 10 Pro x64
Thanks for the heads up... It would've been shocking if I actually had gotten it right... :nuts: Oh well.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,763
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
On first sight it does indeed seem like the file from bug report linked above was uncompressed with the same (or similarly old) UNMO3 version. The sample frequencies are all a couple of Hz off compared to the 8-bit version, which is a big hint that this IT file used to be an MO3 file (early MO3 format revisions didn't allow for the sample frequency in IT files to be stored accurately, it was an approximation similar to XM). I will have a more thorough look later or tomorrow, but I'm relatively certain that your observation is spot-on, and we can update our special case for v0.00 files to say UNMO3 instead of Unknown.
» 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.

Offline Slender

  • Shy artist
  • Posts: 3
If you do end up updating that special case, it would possibly be safer to just say unmo3 rather than trying to guess the version, unmo3 1.x also wrote 0s, as demonstrated by this disk. http://www.armagon.org/mods/infernal%20mods%20-%20a%20tribute%20to%20death%20(compilation)/Infernal%20Mods.zip

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,763
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
The files posted in this thread and also in that bug report are now all detected as UNMO3-ed files.
» 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.