Mod Archive Forums
Music Production => MilkyTracker => Tracking => MilkyTracker Community => Topic started by: EverlastingBuffoon on April 24, 2025, 21:12:14
-
Hey there,
I am in the process of creating a script that takes .wav files and some additional data (such as loop points) and automatically creates .xi instrument files. The problem is, I don't have a good idea of what the format of an .xi file looks like. Besides this forum post (https://modarchive.org/forums/index.php?topic=3112.0), which details the header of the file & links to the .xm file format (which includes the instruments), I don't have a clear picture of the actual file format (i.e. what comes after this header, which information from the original xm instrument header to keep, etc.). I've tried to compare the binaries of .xi files to the documentation, but I can't draw any conclusions.
Any pointers to documentation or other sources are greatly appreciated!
Cheers!
-
made this thing once
i did some mistakes so here is some mistakes like extended instrument size and how samples work so he is some corrected stuff:
"Extended Instrument: " (21 bytes)
instrument name (22 bytes)
0x1A (magic number)
program name (20 bytes)
0x02 0x01 (format version, its the latest one, no idea how other work)
instrument header (everything on the image)
samples amount (2 byte)
sample header 1 (everything except pcm data in "SAMPLE")
sample header 2
sample header 3
sample header ...
pcm data for sample 1
pcm data for sample 2
pcm data for sample 3
pcm data for sample ...
-
found it in original quality
-
Oh, this looks perfect!
I'll try it out and I'll update here when I have something to show
Thank you :D