<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openmpt.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Uyjulian</id>
	<title>OpenMPT Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openmpt.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Uyjulian"/>
	<link rel="alternate" type="text/html" href="https://wiki.openmpt.org/Special:Contributions/Uyjulian"/>
	<updated>2026-10-15T09:44:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.10</generator>
	<entry>
		<id>https://wiki.openmpt.org/index.php?title=Development:_Formats/IT&amp;diff=2301</id>
		<title>Development: Formats/IT</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmpt.org/index.php?title=Development:_Formats/IT&amp;diff=2301"/>
		<updated>2015-05-10T17:44:22Z</updated>

		<summary type="html">&lt;p&gt;Uyjulian: /* OpenSPC conversions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;General information concerning the IT file format. Any variable names in this document refer to the original variable names from [http://schismtracker.org/wiki/ITTECH.TXT ITTECH.TXT]. Variable names and hexadecimal numbers (in little-endian formats) are indicated by a &amp;lt;tt&amp;gt;monospace font&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note: Impulse tracker is now open source! You can grab the [https://bitbucket.org/jthlim/impulsetracker source code] at Bitbucket.&lt;br /&gt;
&lt;br /&gt;
== Tracker IDs ==&lt;br /&gt;
&lt;br /&gt;
The IT header contains a field, &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt;, which is used to identify the application that was used to create the file.&lt;br /&gt;
The following custom tracker IDs (read as little-endian hexadecimal numbers) are known to be found in the &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; field:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;0xyy&amp;lt;/tt&amp;gt; - Impulse Tracker x.yy - Many other trackers, like ModPlug Tracker, disguise as various versions of Impulse Tracker, so this is &amp;lt;strong&amp;gt;not&amp;lt;/strong&amp;gt; a reliable way to tell if a file was really made with Impulse Tracker. See [[#Detecting other trackers|below]] for detecting such trackers.&lt;br /&gt;
* &amp;lt;tt&amp;gt;1xyy&amp;lt;/tt&amp;gt; - Schism Tracker x.yy (up to Schism Tracker v0.50, later versions encode a timestamp in the version number - see Schism Tracker’s &amp;lt;tt&amp;gt;[http://schismtracker.org/hg/file/tip/schism/version.c version.c]&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* &amp;lt;tt&amp;gt;4xyy&amp;lt;/tt&amp;gt; - pyIT x.yy&lt;br /&gt;
* &amp;lt;tt&amp;gt;5xyy&amp;lt;/tt&amp;gt; - OpenMPT x.yy&lt;br /&gt;
* &amp;lt;tt&amp;gt;6xyy&amp;lt;/tt&amp;gt; - BeRoTracker x.yy&lt;br /&gt;
* &amp;lt;tt&amp;gt;7xyz&amp;lt;/tt&amp;gt; - ITMCK x.y.z (N.B. the user can override the value of the &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; header by the &amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt; command-line switch or the &amp;lt;tt&amp;gt;#TRACKER-VERSION&amp;lt;/tt&amp;gt; command in the input file)&lt;br /&gt;
* &amp;lt;tt&amp;gt;DAEB&amp;lt;/tt&amp;gt; - spc2it (after commit d3d1b524032f668be8ee20d25339e1c635fb9bcf)&lt;br /&gt;
&lt;br /&gt;
Are you a tracker developer and you tracker can save IT files? Please add your Tracker ID to this list!&lt;br /&gt;
&lt;br /&gt;
== Detecting other trackers ==&lt;br /&gt;
&lt;br /&gt;
Some trackers disguise as Impulse Tracker 2, but there are ways to uncover this diguise:&lt;br /&gt;
&lt;br /&gt;
=== BeRoTracker ===&lt;br /&gt;
&lt;br /&gt;
Earlier versions of BeRoTracker, which did not use the tracker ID described above, can be identified by the four byte &amp;lt;tt&amp;gt;MODU&amp;lt;/tt&amp;gt; magic which can be found after the Edit History / MIDI Macro block.&lt;br /&gt;
&lt;br /&gt;
=== ChibiTracker ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; are both &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; reads &amp;lt;tt&amp;gt;CHBI&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Further interesting criteria: Sample data is stored directly after header. All sample and instrument filenames read &amp;lt;tt&amp;gt;-DEPRECATED-&amp;lt;/tt&amp;gt; (obviously this should not be used as a detection criteria, as files re-saved with other trackers will still have these filenames). ChibiTracker also uses a line feed character (&amp;lt;tt&amp;gt;0A&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;\n&amp;lt;/tt&amp;gt;) instead of a carriage return (&amp;lt;tt&amp;gt;0D&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;\r&amp;lt;/tt&amp;gt;) in the song message.&lt;br /&gt;
&lt;br /&gt;
=== ModPlug Tracker ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ModPlug Tracker 1.00a5&#039;&#039;&#039;: &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0200&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;. Instruments are 560 bytes apart.&lt;br /&gt;
* &#039;&#039;&#039;ModPlug Tracker 1.00b3.3 - 1.07&#039;&#039;&#039;: &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0202&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;. Instruments are 557 bytes apart.&lt;br /&gt;
* Newer versions of &#039;&#039;&#039;ModPlug Tracker&#039;&#039;&#039;, &#039;&#039;&#039;OpenMPT 1.17 in compatible mode&#039;&#039;&#039;: &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0217&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0200&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;. If there are any instruments in the file, the instrument &amp;lt;tt&amp;gt;TrkVers&amp;lt;/tt&amp;gt; field is &amp;lt;tt&amp;gt;0211&amp;lt;/tt&amp;gt; for ModPlug Tracker and &amp;lt;tt&amp;gt;0220&amp;lt;/tt&amp;gt; for OpenMPT. ModPlug Tracker writes &amp;lt;tt&amp;gt;FF&amp;lt;/tt&amp;gt; for unused channels in the panning map, OpenMPT never does this.&lt;br /&gt;
&lt;br /&gt;
=== OpenMPT ===&lt;br /&gt;
&lt;br /&gt;
OpenMPT 1.17 wrote the value &amp;lt;tt&amp;gt;0888&amp;lt;/tt&amp;gt; in both the &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; fields.&lt;br /&gt;
&lt;br /&gt;
Later versions of OpenMPT use the tracker ID provided above. In that case, the &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; field reads &amp;lt;tt&amp;gt;OMPT&amp;lt;/tt&amp;gt; if the file was saved in normal mode, and is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt; if it was saved in compatible mode.&lt;br /&gt;
&lt;br /&gt;
=== OpenSPC conversions ===&lt;br /&gt;
&lt;br /&gt;
OpenSPC is a tool to convert SNES music from the SPC format to the IT format. If all the following conditions are true, you can be fairly sure that a module was written with OpenSPC:&lt;br /&gt;
* &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0200&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;Flags&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;09&amp;lt;/tt&amp;gt; (Linear Slides, Stereo Playback).&lt;br /&gt;
* &amp;lt;tt&amp;gt;Special&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Both pattern highlight values are &amp;lt;tt&amp;gt;00&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* No instruments are used.&lt;br /&gt;
* &amp;lt;tt&amp;gt;PatNum&amp;lt;/tt&amp;gt; + 1 == &amp;lt;tt&amp;gt;OrdNum&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Global volume is 128 decimal.&lt;br /&gt;
* Master volume is 100 decimal.&lt;br /&gt;
* Initial Speed is 1.&lt;br /&gt;
* Pan Separation is 128 (decimal).&lt;br /&gt;
* Pitch wheel depth is 0.&lt;br /&gt;
* There is no song message, i.e. message length and offset are 0.&lt;br /&gt;
* &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; is 0.&lt;br /&gt;
&lt;br /&gt;
Earlier versions of spc2it (before commit d3d1b524032f668be8ee20d25339e1c635fb9bcf) will be mis-identified as OpenSPC, as the tool closely follows the way its predecessor writes out IT files.&lt;br /&gt;
&lt;br /&gt;
=== UNMO3 ===&lt;br /&gt;
&lt;br /&gt;
UNMO3 is a tool to convert an MO3-compressed module file back into its original format.&lt;br /&gt;
&lt;br /&gt;
In IT files created with UNMO3, &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;Special&amp;lt;/tt&amp;gt; bit 2 (embed row highlights) is never set.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: UNMO3 older than version 2.4.0.1 does not set the edit history flag, but writes two edit history length bytes (zeroes) in the file anyway. Keep this in mind, as MIDI Macros will not load properly if you don’t. A fairly reliable (but not perfect) way to detect such malformed IT files would be to try to read the edit history length if all of the above conditions are fulfilled &#039;&#039;&#039;and&#039;&#039;&#039; the edit history flag is not set. For these old versions of UNMO3, you should read two zero bytes. If that is the case, it means that the first MIDI macro would be empty. This cannot happen in our case because UNMO3 writes out default values for the nine global macros, and the first default value is “FF” (MIDI Start), so it is clear that the two zero bytes belong to the (empty) edit history.&lt;br /&gt;
&lt;br /&gt;
Later version of UNMO3 set the correct header flag for the edit history and write the two zero length bytes.&lt;br /&gt;
&lt;br /&gt;
== Special Header Flags ==&lt;br /&gt;
&lt;br /&gt;
The following &amp;quot;Special&amp;quot; flags are not documented:&lt;br /&gt;
&lt;br /&gt;
* Bit 1 (&amp;lt;tt&amp;gt;02&amp;lt;/tt&amp;gt;): If set, edit history information (see [[#Edit History|below]]) is present.&lt;br /&gt;
* Bit 2 (&amp;lt;tt&amp;gt;04&amp;lt;/tt&amp;gt;): If set, the row highlights (at offset &amp;lt;tt&amp;gt;1E&amp;lt;/tt&amp;gt; - &amp;lt;tt&amp;gt;1F&amp;lt;/tt&amp;gt;) should be read. If not set, they should be ignored.&lt;br /&gt;
&lt;br /&gt;
== Edit History ==&lt;br /&gt;
    &lt;br /&gt;
It is little known that the latest versions of Impulse Tracker keep track of when an IT file is opened and how long it is left open.&lt;br /&gt;
The edit history can be found directly after the IT header and before the possibly present MIDI macro configuration.&lt;br /&gt;
&lt;br /&gt;
A 16-Bit integer &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt; tells how many edit history blocks are present. Every block is 8 bytes long, so the 16-bit integer is followed by &amp;lt;tt&amp;gt;8 * num&amp;lt;/tt&amp;gt; bytes of edit history information.&lt;br /&gt;
&lt;br /&gt;
Each history block consists of a 16-Bit FAT date, a 16-Bit FAT time and a 32-Bit DOS timer, which contains the time how long the file was open in the editor, in 1/18.2th seconds.&lt;br /&gt;
Information on how to decode the FAT date and time stamps can be found on the [http://msdn.microsoft.com/en-us/library/windows/desktop/ms724247%28v=vs.85%29.aspx MSDN].&lt;br /&gt;
&lt;br /&gt;
Note: Many programs don’t write an edit history, but they set the edit history flag in the header and write the two zero bytes for the history length. Many of them also ignore the edit history flag when loading files and always read the two &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt; num bytes (ignoring the special flag), so if you want to write out an IT file that does not have an edit history and do not mind about the two extra bytes, the safest (most compatible) way is to set the edit history flag and write two zero bytes for &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Also note that none of this is really relevant if you are sure that you never write out the MIDI macro configuration or ModPlug extensions, since these are the only two things that could normally follow the edit history. So if you have no MIDI macros and no ModPlug extensions, it is always safe to not set the special flag and not write the two extra bytes.&lt;br /&gt;
&lt;br /&gt;
== Proposed way to store compressed stereo samples ==&lt;br /&gt;
&lt;br /&gt;
Since Impulse Tracker itself does not support stereo samples, a common way of how to decode compressed stereo samples had to be found - After all, it is possible to just treat them as one continuous stream (not stopping the encoding / decoding process after the end of the left channel), or to treat them as two separate, consecutive streams. GreaseMonkey has decided to follow [http://www.un4seen.com/forum/?topic=12448.msg86479#msg86479 XMPlay&#039;s way] of decoding compressed stereo samples by treating them as two streams of the same length, so OpenMPT follows this example. If you intend to add IT sample compression support in your application, you should do the same to ensure compatibility across as many applications as possible.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development|Formats/IT]]&lt;br /&gt;
[[Category:IT Format|Format Specification]]&lt;/div&gt;</summary>
		<author><name>Uyjulian</name></author>
	</entry>
	<entry>
		<id>https://wiki.openmpt.org/index.php?title=Development:_Formats/IT&amp;diff=2251</id>
		<title>Development: Formats/IT</title>
		<link rel="alternate" type="text/html" href="https://wiki.openmpt.org/index.php?title=Development:_Formats/IT&amp;diff=2251"/>
		<updated>2015-03-18T00:54:18Z</updated>

		<summary type="html">&lt;p&gt;Uyjulian: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;General information concerning the IT file format. Any variable names in this document refer to the original variable names from [http://schismtracker.org/wiki/ITTECH.TXT ITTECH.TXT]. Variable names and hexadecimal numbers (in little-endian formats) are indicated by a &amp;lt;tt&amp;gt;monospace font&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note: Impulse tracker is now open source! You can grab the [https://bitbucket.org/jthlim/impulsetracker source code] at Bitbucket.&lt;br /&gt;
&lt;br /&gt;
== Tracker IDs ==&lt;br /&gt;
&lt;br /&gt;
The IT header contains a field, &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt;, which is used to identify the application that was used to create the file.&lt;br /&gt;
The following custom tracker IDs (read as little-endian hexadecimal numbers) are known to be found in the &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; field:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;0xyy&amp;lt;/tt&amp;gt; - Impulse Tracker x.yy - Many other trackers, like ModPlug Tracker, disguise as various versions of Impulse Tracker, so this is &amp;lt;strong&amp;gt;not&amp;lt;/strong&amp;gt; a reliable way to tell if a file was really made with Impulse Tracker. See [[#Detecting other trackers|below]] for detecting such trackers.&lt;br /&gt;
* &amp;lt;tt&amp;gt;1xyy&amp;lt;/tt&amp;gt; - Schism Tracker x.yy (up to Schism Tracker v0.50, later versions encode a timestamp in the version number - see Schism Tracker’s &amp;lt;tt&amp;gt;[http://schismtracker.org/hg/file/tip/schism/version.c version.c]&amp;lt;/tt&amp;gt;)&lt;br /&gt;
* &amp;lt;tt&amp;gt;4xyy&amp;lt;/tt&amp;gt; - pyIT x.yy&lt;br /&gt;
* &amp;lt;tt&amp;gt;5xyy&amp;lt;/tt&amp;gt; - OpenMPT x.yy&lt;br /&gt;
* &amp;lt;tt&amp;gt;6xyy&amp;lt;/tt&amp;gt; - BeRoTracker x.yy&lt;br /&gt;
* &amp;lt;tt&amp;gt;7xyz&amp;lt;/tt&amp;gt; - ITMCK x.y.z (N.B. the user can override the value of the &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; header by the &amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt; command-line switch or the &amp;lt;tt&amp;gt;#TRACKER-VERSION&amp;lt;/tt&amp;gt; command in the input file)&lt;br /&gt;
* &amp;lt;tt&amp;gt;DAEB&amp;lt;/tt&amp;gt; - spc2it (after commit d3d1b524032f668be8ee20d25339e1c635fb9bcf)&lt;br /&gt;
&lt;br /&gt;
Are you a tracker developer and you tracker can save IT files? Please add your Tracker ID to this list!&lt;br /&gt;
&lt;br /&gt;
== Detecting other trackers ==&lt;br /&gt;
&lt;br /&gt;
Some trackers disguise as Impulse Tracker 2, but there are ways to uncover this diguise:&lt;br /&gt;
&lt;br /&gt;
=== BeRoTracker ===&lt;br /&gt;
&lt;br /&gt;
Earlier versions of BeRoTracker, which did not use the tracker ID described above, can be identified by the four byte &amp;lt;tt&amp;gt;MODU&amp;lt;/tt&amp;gt; magic which can be found after the Edit History / MIDI Macro block.&lt;br /&gt;
&lt;br /&gt;
=== ChibiTracker ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; are both &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; reads &amp;lt;tt&amp;gt;CHBI&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Further interesting criteria: Sample data is stored directly after header. All sample and instrument filenames read &amp;lt;tt&amp;gt;-DEPRECATED-&amp;lt;/tt&amp;gt; (obviously this should not be used as a detection criteria, as files re-saved with other trackers will still have these filenames). ChibiTracker also uses a line feed character (&amp;lt;tt&amp;gt;0A&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;\n&amp;lt;/tt&amp;gt;) instead of a carriage return (&amp;lt;tt&amp;gt;0D&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;\r&amp;lt;/tt&amp;gt;) in the song message.&lt;br /&gt;
&lt;br /&gt;
=== ModPlug Tracker ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ModPlug Tracker 1.00a5&#039;&#039;&#039;: &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0200&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;. Instruments are 560 bytes apart.&lt;br /&gt;
* &#039;&#039;&#039;ModPlug Tracker 1.00b3.3 - 1.07&#039;&#039;&#039;: &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0202&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;. Instruments are 557 bytes apart.&lt;br /&gt;
* Newer versions of &#039;&#039;&#039;ModPlug Tracker&#039;&#039;&#039;, &#039;&#039;&#039;OpenMPT 1.17 in compatible mode&#039;&#039;&#039;: &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0217&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0200&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;. If there are any instruments in the file, the instrument &amp;lt;tt&amp;gt;TrkVers&amp;lt;/tt&amp;gt; field is &amp;lt;tt&amp;gt;0211&amp;lt;/tt&amp;gt; for ModPlug Tracker and &amp;lt;tt&amp;gt;0220&amp;lt;/tt&amp;gt; for OpenMPT. ModPlug Tracker writes &amp;lt;tt&amp;gt;FF&amp;lt;/tt&amp;gt; for unused channels in the panning map, OpenMPT never does this.&lt;br /&gt;
&lt;br /&gt;
=== OpenMPT ===&lt;br /&gt;
&lt;br /&gt;
OpenMPT 1.17 wrote the value &amp;lt;tt&amp;gt;0888&amp;lt;/tt&amp;gt; in both the &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; fields.&lt;br /&gt;
&lt;br /&gt;
Later versions of OpenMPT use the tracker ID provided above. In that case, the &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; field reads &amp;lt;tt&amp;gt;OMPT&amp;lt;/tt&amp;gt; if the file was saved in normal mode, and is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt; if it was saved in compatible mode.&lt;br /&gt;
&lt;br /&gt;
=== OpenSPC conversions ===&lt;br /&gt;
&lt;br /&gt;
OpenSPC is a tool to convert SNES music from the SPC format to the IT format. If all the following conditions are true, you can be fairly sure that a module was written with OpenSPC:&lt;br /&gt;
* &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0200&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;Flags&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;09&amp;lt;/tt&amp;gt; (Linear Slides, Stereo Playback).&lt;br /&gt;
* &amp;lt;tt&amp;gt;Special&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Both pattern highlight values are &amp;lt;tt&amp;gt;00&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* No instruments are used.&lt;br /&gt;
* &amp;lt;tt&amp;gt;PatNum&amp;lt;/tt&amp;gt; + 1 == &amp;lt;tt&amp;gt;OrdNum&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Global volume is 128 decimal.&lt;br /&gt;
* Master volume is 100 decimal.&lt;br /&gt;
* Initial Speed is 1.&lt;br /&gt;
* Pan Separation is 128 (decimal).&lt;br /&gt;
* Pitch wheel depth is 0.&lt;br /&gt;
* There is no song message, i.e. message length and offset are 0.&lt;br /&gt;
* &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; is 0.&lt;br /&gt;
&lt;br /&gt;
=== UNMO3 ===&lt;br /&gt;
&lt;br /&gt;
UNMO3 is a tool to convert an MO3-compressed module file back into its original format.&lt;br /&gt;
&lt;br /&gt;
In IT files created with UNMO3, &amp;lt;tt&amp;gt;Cwt/v&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Cmwt&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0214&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;reserved&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;Special&amp;lt;/tt&amp;gt; bit 2 (embed row highlights) is never set.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: UNMO3 older than version 2.4.0.1 does not set the edit history flag, but writes two edit history length bytes (zeroes) in the file anyway. Keep this in mind, as MIDI Macros will not load properly if you don’t. A fairly reliable (but not perfect) way to detect such malformed IT files would be to try to read the edit history length if all of the above conditions are fulfilled &#039;&#039;&#039;and&#039;&#039;&#039; the edit history flag is not set. For these old versions of UNMO3, you should read two zero bytes. If that is the case, it means that the first MIDI macro would be empty. This cannot happen in our case because UNMO3 writes out default values for the nine global macros, and the first default value is “FF” (MIDI Start), so it is clear that the two zero bytes belong to the (empty) edit history.&lt;br /&gt;
&lt;br /&gt;
Later version of UNMO3 set the correct header flag for the edit history and write the two zero length bytes.&lt;br /&gt;
&lt;br /&gt;
== Special Header Flags ==&lt;br /&gt;
&lt;br /&gt;
The following &amp;quot;Special&amp;quot; flags are not documented:&lt;br /&gt;
&lt;br /&gt;
* Bit 1 (&amp;lt;tt&amp;gt;02&amp;lt;/tt&amp;gt;): If set, edit history information (see [[#Edit History|below]]) is present.&lt;br /&gt;
* Bit 2 (&amp;lt;tt&amp;gt;04&amp;lt;/tt&amp;gt;): If set, the row highlights (at offset &amp;lt;tt&amp;gt;1E&amp;lt;/tt&amp;gt; - &amp;lt;tt&amp;gt;1F&amp;lt;/tt&amp;gt;) should be read. If not set, they should be ignored.&lt;br /&gt;
&lt;br /&gt;
== Edit History ==&lt;br /&gt;
    &lt;br /&gt;
It is little known that the latest versions of Impulse Tracker keep track of when an IT file is opened and how long it is left open.&lt;br /&gt;
The edit history can be found directly after the IT header and before the possibly present MIDI macro configuration.&lt;br /&gt;
&lt;br /&gt;
A 16-Bit integer &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt; tells how many edit history blocks are present. Every block is 8 bytes long, so the 16-bit integer is followed by &amp;lt;tt&amp;gt;8 * num&amp;lt;/tt&amp;gt; bytes of edit history information.&lt;br /&gt;
&lt;br /&gt;
Each history block consists of a 16-Bit FAT date, a 16-Bit FAT time and a 32-Bit DOS timer, which contains the time how long the file was open in the editor, in 1/18.2th seconds.&lt;br /&gt;
Information on how to decode the FAT date and time stamps can be found on the [http://msdn.microsoft.com/en-us/library/windows/desktop/ms724247%28v=vs.85%29.aspx MSDN].&lt;br /&gt;
&lt;br /&gt;
Note: Many programs don’t write an edit history, but they set the edit history flag in the header and write the two zero bytes for the history length. Many of them also ignore the edit history flag when loading files and always read the two &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt; num bytes (ignoring the special flag), so if you want to write out an IT file that does not have an edit history and do not mind about the two extra bytes, the safest (most compatible) way is to set the edit history flag and write two zero bytes for &amp;lt;tt&amp;gt;num&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Proposed way to store compressed stereo samples ==&lt;br /&gt;
&lt;br /&gt;
Since Impulse Tracker itself does not support stereo samples, a common way of how to decode compressed stereo samples had to be found - After all, it is possible to just treat them as one continuous stream (not stopping the encoding / decoding process after the end of the left channel), or to treat them as two separate, consecutive streams. GreaseMonkey has decided to follow [http://www.un4seen.com/forum/?topic=12448.msg86479#msg86479 XMPlay&#039;s way] of decoding compressed stereo samples by treating them as two streams of the same length, so OpenMPT follows this example. If you intend to add IT sample compression support in your application, you should do the same to ensure compatibility across as many applications as possible.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development|Formats/IT]]&lt;br /&gt;
[[Category:IT Format|Format Specification]]&lt;/div&gt;</summary>
		<author><name>Uyjulian</name></author>
	</entry>
</feed>