Author Topic: XM file playback bug  (Read 1216 times)


  • Posts: 39
XM file playback bug
« on: 7 Dec '20 - 20:15 »
Here's the XM file. It's a bit of an iffy one especially when looping. But something strange happens near the end of order 31 where some bad noise is present.


  • Posts: 2565
Re: XM file playback bug
« Reply #1 on: 7 Dec '20 - 21:08 »
That file was made with a very old version of OpenMPT, ( which back then did not implement several FT2 quicks, while XMPlay enables those quirks unconditionally. Technically does nothing wrong here (it just plays the file like FastTracker 2 would), but maybe this particular playback quirk could be disabled if it detects that the file was made with an old version of ModPlug / OpenMPT. OpenMPT is the first version implementing this quirk correctly.
I think BASS/XMPlay currently does not explicitly detect such ModPlug-made XM files, as earlier versions don't identify themselves in the XM header. But what XMPlay could do is check if any ModPlug-specific chunks (text, MIDI, PNAM, CNAM, XTPM, STPM) can be found at the end of the file and then assume the file was made with ModPlug and disable this quirk. Later OpenMPT versions identify themselves in the XM header's tracker string (e.g. "OpenMPT", which is the first OpenMPT version doing that), so the required version information can be parsed from the XM header.

The fact that the file is not loopable is also not a bug - it doesn't cut previously playing notes on the first pattern, and trackers typically don't do that automatically (except for very old ModPlug versions).