Jump to content
Tuts 4 You
LCF-AT

How to convert XM files?

Rate this topic

Recommended Posts

LCF-AT

Hi guys,

I was playing around and found some MASM effect sources / KeyGen Templates etc.So in one of them it was playing some music using a ufmod lib.If I see it right then it can just play some XM (extended module) format files.Now I would like to ask how to convert audio files like mp3 / wav etc to a XM files (or both to XM and XM to other audio)?Is there also any RE tool or something like this I can use?Just looking for converter only (free).

Next question I have is,are there any sources on internet who have XM songs to hear and download?Maybe just some old game music stuff or something like that.Similar like emulator games you can download and play in any emulator. :)

greetz

Share this post


Link to post
Share on other sites
Kurapica

XM to MP3 and other formats is possible, it's like converting a Photoshop image which is made up of several layers and objects into a JPG or BMP, a lossy process, not necessarily in terms of quality

we call this rasterization.

XM is made up of several small chunks or parts of audio, so it's modular just like that Photoshop image which is made up of several layers and objects.

MP3 to XM is not possible as far as I know due to the differences in the 2 files structures as I have explained earlier.

https://en.wikipedia.org/wiki/Module_file

  • Like 1

Share this post


Link to post
Share on other sites
Progman

The opposite process of rasterization is called vectorization and is certainly possible, these are just mathematical transformations.

Please try to use OpenMPT to convert WAV to XM (converting MP3 to WAV is trivial):

http://openmpt.org/download

Just open your WAV file with it and click Song Properties, and set the type to FastTrackerXM.

  • Like 1

Share this post


Link to post
Share on other sites
Kurapica

No idea how satisfying the result will be when going from MP3 to XM, " vectorization" is not always a 100% mirror of the object state before rasterization.

Try "vectorization" on a JPG back to PSD with layers and smart objects and all that mess, not even doable.

Edited by Kurapica (see edit history)
  • Like 2

Share this post


Link to post
Share on other sites
Progman

I agree it is probably quite lossy but maybe worth a try :D.  Somewhat like doing a Fourier transform to the frequency domain and then converting back to the time domain.  If you are not extremely precise in the converted format, then of course going backward becomes a mathematical approximation which can be unacceptable in many contexts.

  • Like 1

Share this post


Link to post
Share on other sites
LCF-AT

Hi guys,

thanks for feedbacks.Ok,I tried the OpenMPT tool to convert any short wav sample to XM and it seems to work. :) Also found this small description...

https://theinfopark.blogspot.com/2014/05/mp3-wav-to-xm-it-conversion.html

...ony  problem I see is that the created XM file has almost same or higher size than the wav file.I thought it would be make it a lot smaller.Maybe I need to play around with some more settings in the tool itself.I found a XM file which has a duration of 1:05 minutes and has only 33 KB (44.1 Khz & Stereo).I also wanna  build something like this to get a very low size XM file out if possible.

About the Keygen music site.So if I see it right then I cant make a preview hearing and just can DL the music.Do you know some more sources with preview hearing?

Thanks again

EDIT: So I see the OpenMPT tool dosent load mp3 files and also dosent export mp3 files.

Opening "123.mp3" failed. This can happen if no more modules can be opened or if the file type was not recognised. If the former is true, it is recommended to close some modules as otherwise a crash is likely (currently there are 0 documents open).

How to handle that?Does it need any mp3 module which I need to download extra or something like that?

Edited by LCF-AT
Forgot something (see edit history)

Share this post


Link to post
Share on other sites
kao
14 minutes ago, LCF-AT said:

I also wanna  build something like this to get a very low size XM file out if possible.

You can't. It doesn't work that way.

In a very very simplified manner:
* XM is a module file. It contains instructions like: "play piano quietly for 20 seconds, then add drums with speed X for Y seconds, add a wind sound effect at time Z". That's why it's so small.
* WAV is a sound file. It contains a sampled audio - recorded signal values X times (usually-44100 or 48000) per second. It's a good quality but obviously has a lot of data.
* MP3 is a compressed sound file. It uses fact that humans don't have perfect hearing, so it takes sampled audio (eg. WAV), simplifies it a lot, and then compresses the result. In a badly compressed AVI/MP4, you see squares and blurred picture. Similarly, in a badly compressed MP3 (64kbits) you hear different noises and it sounds like coming from a tin box. That's the price you pay to get a small filesize.

To convert XM to WAV, you just process the module instructions and record the resulting audio. It's very very simple.
But there is no real tool that can take WAV and split it into real, quality instructions for different audio tracker modules. That would be like taking a compiled EXE file and splitting it back into C code with comments, variable names and everything - great idea but just impossible.

  • Like 3
  • Sad 1

Share this post


Link to post
Share on other sites
LCF-AT

Hi again,

ah ok,thanks for this infos kao.So I think at the end its not very sensfull to convert any normal MP3 (from CD etc) audio to XM so in this case I should better use bass lib to play mp3 itself.

greetz

Share this post


Link to post
Share on other sites
Xyl2k

check punchIt from arteam also :p http://185.62.190.110/accessroot/arteam/site/download.php?view.252

  • Like 1

Share this post


Link to post
Share on other sites
Progman

Audio is encoded and played back through an interface easily described by a mathematical function.  Any encoding format is translated to this output format.  Given that no known one-way functions exist, it is always possible to go between encoding formats though not always practical and not without loss as some formats utilize irreversible approximations (truncation).  Obviously we cannot practically reverse some cryptographic primitives but generally audio and video formats cannot utilize such constructs for encoding given the computation expense that would result.  As for the irrelevant metadata in such formats, of course it can be lost since it was never vital in producing the final output, it was just notes or commentary as source code variables are.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...