Can I convert to standard XM?

Started by Devsman, January 02, 2023, 07:47:56

Previous topic - Next topic

Devsman

There's a long story that goes with my question, so the tl;dr is at the bottom.

I am writing some custom code to load some tracks I made in OpenMPT for playback with SDL's native audio functionality. There are a number of reasons I want the loading to be custom, including that it gives me better flexibility of the playback than common SDL extensions provide. There are also reasons I want to use the mod-type audio rather than wave or compressed audio formats. So I'm afraid I wouldn't be interested in solutions like, use such and such extension or export as wav.

I actually completed most of my code according to the XM format specification I found at https://www.celersms.com/doc/XM_file_format.pdf, and was surprised to find that there's nothing in the spec that allows instruments to be associated to plugins as in the OpenMPT UI, and that the file also didn't have any samples specified for instruments.

After a bit of digging, I found that OpenMPT actually extends the XM format:

https://wiki.openmpt.org/Development:_OpenMPT_Format_Extensions#FX00.2C_..._FX99.2C_F100.2C_..._F255

I could probably work with that, but it has a lot of downsides for my use case, since I would have to distribute third-party plugins, as well as learn and implement the spec for VST also.

I should have done more research first, but I've been playing with OpenMPT and xm for years and assumed I knew more about them than I did.

So, I was wondering if there's any sort of built-in functionality in OpenMPT to handle this sort of thing automatically--perhaps export with extensions disabled and automatically generate samples for used notes, or maybe convert the instruments in my xm to a sample-based format.

tl;dr: OpenMPT-made xms are actually an extension of the specification, and I was wondering what options I have to take one that I made using VST plugin instruments and export it as the base spec.

Thanks!

Saga Musix

#1
You can use the Compatibility Export menu entry to remove any non-standard features from XM or IT files. However, all it does is removing them - it will not work around the missing features by rendering plugins or the like, but at least you can see that way where the problems are.
OpenMPT doesn't have an automatic plugin to instrument converter (although it would be great to have one eventually), but there's other software out there that can help with that. Unfortunately all of the choices I'm aware of are either commercial (Extreme Sample Converter, Renoise) or no longer available (VDumper). Extreme Sample Converter is a very handy tool but while you can still buy it, development seems to have ceased so it might not be a good thing to invest time and money into (plus newer plugins might not work well with it). I think SampleRobot might also do the trick but it's even more expensive. If you can hunt down a copy of VDumper, that might be your best bet for now, although I have faint recollections that it also had issues. There's probably other software that I'm not aware of that can do the same job, too.

Edit: This Reaper script might also do the trick: https://forum.cockos.com/showthread.php?t=245500
» 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.

Devsman

Quote from: Saga Musix on January 02, 2023, 11:12:12You can use the Compatibility Export menu entry to remove any non-standard features from XM or IT files. However, all it does is removing them - it will not work around the missing features by rendering plugins or the like, but at least you can see that way where the problems are.
OpenMPT doesn't have an automatic plugin to instrument converter (although it would be great to have one eventually), but there's other software out there that can help with that. Unfortunately all of the choices I'm aware of are either commercial (Extreme Sample Converter, Renoise) or no longer available (VDumper). Extreme Sample Converter is a very handy tool but while you can still buy it, development seems to have ceased so it might not be a good thing to invest time and money into (plus newer plugins might not work well with it). I think SampleRobot might also do the trick but it's even more expensive. If you can hunt down a copy of VDumper, that might be your best bet for now, although I have faint recollections that it also had issues. There's probably other software that I'm not aware of that can do the same job, too.

Edit: This Reaper script might also do the trick: https://forum.cockos.com/showthread.php?t=245500
I found VDumper, and taking a look at how it works, I can't believe I didn't think of it myself. Seems really useful. Thanks!