Is there any way to script converting a file between formats?

Started by bribri, August 31, 2024, 19:44:44

Previous topic - Next topic

bribri

I'm working on a hobbyist game engine that supports a couple of different old platforms. One of the things the engine will support is playing tracker music, and different platforms will require different module formats (like mod, s3m, etc.).

I've found that OpenMPT is great at converting from one format to another while preserving quality as best as possible, so it's ideal for taking a song authored in a later, more capable format and converting down to something simpler. I'd love to include this as an automatic build step for my engine, which means scripting OpenMPT in some way to do the export.

Is there any way to do that currently?

I suppose one option is to hack the feature in myself (maybe using a command line argument), or figure out how to extract this bit of functionality from OpenMPT and turn it into a command line tool just for conversion, though that's probably more work than it's worth!

Saga Musix

There's no automatic way to do that currently, but I guess it could be hacked in easily. But I would also strongly advise for always checking each converted song manually, since a lot of things can simply not be converted cleanly, and some manual fixes may be necessary.
» 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.

bribri

Quote from: Saga Musix on August 31, 2024, 20:49:03There's no automatic way to do that currently, but I guess it could be hacked in easily. But I would also strongly advise for always checking each converted song manually, since a lot of things can simply not be converted cleanly, and some manual fixes may be necessary.
That's a good point. Part of my plan and part of the challenge is to create files that do convert down correctly to the formats I want. Right now I'm just doing s3m to mod, which I'm finding is relatively safe.