Mod Archive Forums Mod Archive Forums
Advanced search  

News:

Please note: Your main modarchive.org account will not work here, you must create a forum account to post on the forums.

Pages: [1]   Go Down

Author Topic: XI Instrument File Format  (Read 113 times)

0 Members and 1 Guest are viewing this topic.

EverlastingBuffoon

  • New User
  • Offline Offline
  • Posts: 2
    • View Profile
XI Instrument File Format
« 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!
Logged

tema5002

  • New User
  • Offline Offline
  • Posts: 5
  • i eat sand
    • View Profile
Re: XI Instrument File Format
« Reply #1 on: April 25, 2025, 08:32:07 »

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 ...
Logged

tema5002

  • New User
  • Offline Offline
  • Posts: 5
  • i eat sand
    • View Profile
Re: XI Instrument File Format
« Reply #2 on: April 25, 2025, 08:51:24 »

found it in original quality
Logged

EverlastingBuffoon

  • New User
  • Offline Offline
  • Posts: 2
    • View Profile
Re: XI Instrument File Format
« Reply #3 on: April 25, 2025, 17:23:01 »

Oh, this looks perfect!
I'll try it out and I'll update here when I have something to show
Thank you :D
Logged
Pages: [1]   Go Up