Talk:Development: Formats/IT

From OpenMPT Wiki
Jump to navigation Jump to search

I recommend that you reserve the codes 7xxx for programs that store the version number elsewhere (such as instrument names, or extra data in the file). ITMCK uses 7000, so your other programs doing so might be 7001 and so on. --24.207.49.17 19:23, 24 June 2012 (UTC)

I don't think it's a good idea to diverge from the default version numbering scheme here, especially several trackers should not share the same tracker ID (which is 7 in this case). Abusing things like instrument names for storing the version information is also a very bad idea. Why don't you simply use the version field as all other trackers do? OpenMPT writes a shortened version number there (e.g. just "1.20" instead of "1.20.01.00", because the full version number doesn't fit in the version field), but it writes the full version information in its own IT extensions. That way, any tracker can determine the major version of OpenMPT that was used to create the file, and if you want to know the full version, you can still scan through OpenMPT's extension chunk. You could even use the "reserved" field in the IT header for this, or put some custom data after the macro / edit history block, or at the end of the file or whatever. --Saga Musix (talk) 22:34, 24 June 2012 (UTC)
OK, I can understand you. But, if the high nybble is use for tracker ID, then there can only be sixteen programs. You are free to not use this suggestion (and use the tracker ID high nybble for the tracker and others for the version number), however if there is any reason you do not want to use the 12-bit version number, and want ASCII or something instead, you can use the 7xxx scheme for this purpose. ITMCK version 0.1 will store the ASCII string "ITMCK v0.1" in the first instrument name and leave the rest of the sample and instrument names blank (actual instrument names will probably be written as ; comments, which are not written to the .IT file). (If you want comments, you can use comments starting with " which will be copied to the song message; comments starting with ; are discarded just like in PPMCK.) (If you have other objections, questions, or comments, please write them down; I may pay attention too.) --24.207.49.17 22:48, 24 June 2012 (UTC)
Given that Impulse Tracker 1 was initially released around 1995 and we are at tracker ID 7 now (after more than 15 years!), I don't think that tracker IDs will reach the maximum ID anytime soon (if ever). And if we really get that far, we could still make up a "reserved ID" (such as 0000) for any future trackers. What is this ITMCK thing anyway, and why does it clear instrument names? That doesn't sound like it is a traditional tracker or something. I'd suggest you to use the 7xyy version scheme (e.g. 7001 for version 0.1) and then you can still use your instrument hack if you think it's necessary. Not that I'm an authority on the IT format that could force you to do anything, but it's better if we just keep using existing practices that have been employed in the last 15 years regarding the IT format. --Saga Musix (talk) 23:34, 24 June 2012 (UTC)
OK. Thanks for your idea. I will change that (the program is not released yet, although I have written most of it; when it is I can show you on your user talk page or whatever). ITMCK is licensed under GNU GPL, written in C, has no GUI, is cross-platform, reads a text input file (which can import samples, as well as synthesize samples) to compile into .IT output. It does not clear instrument names; it simply doesn't use them (it doesn't use sample names either) because it never reads .IT files as input; the only input format is text (which, as I described above, may contain ; comments which are ignored by the compiler, and " comments which appear in the song message). It is a similar idea to PPMCK (which read text input file and produces .NSF (NES/Famicom music files) on output), so you are correct it is not a traditional tracker, since it is a MML program. --24.207.49.17 00:08, 25 June 2012 (UTC)
Fair enough. And yep, that 7xyz scheme looks a lot better already. That way, it's far less painful for an application that extracts tracker versions to identify the exact program version (just decoding a 16-bit value as opposed to reading instrument parapointers, then following the first parapointer and parsing the name string). --Saga Musix (talk) 14:49, 25 June 2012 (UTC)