File Formats Wiki
No edit summary
Tag: Visual edit
No edit summary
Tag: Visual edit
(3 intermediate revisions by the same user not shown)
Line 7: Line 7:
   
 
* Header
 
* Header
  +
**Edit history
  +
**MIDI macros
  +
**Pattern names (OMPT only)
  +
**Channel names (OMPT only)
  +
**Plug-ins (OMPT only)
  +
**Message
 
* Instrument
 
* Instrument
 
* Sample Header
 
* Sample Header
 
* Pattern data
 
* Pattern data
  +
*Sample Data
  +
*Author (OMPT only)
   
 
=== Header: ===
 
=== Header: ===
 
{| class="article-table"
 
{| class="article-table"
|+Header code (IMPI) Size varies
+
|+Header code (IMPI) 4 bytes at start
 
!Name
 
!Name
 
!Length
 
!Length
Line 120: Line 128:
 
|1 byte
 
|1 byte
 
|Pitch wheel depth for MIDI controllers
 
|Pitch wheel depth for MIDI controllers
  +
|-
  +
|Message Length
  +
|1 short
  +
(2 bytes)
  +
|Length of attached message
  +
|-
  +
|Message offset
  +
|1 int
  +
(4 bytes)
  +
|Offset of message in file
  +
|-
  +
|Reserved
  +
|4 bytes
  +
|Open MPT writes "OMPT" here if it is an interpreted
  +
Mod Plug file
  +
|-
  +
|Initial channel volume
  +
|64 bytes
  +
|Each byte is a channel volume (0-64)
  +
|-
  +
|Initial channel pan
  +
|64 bytes
  +
|Each byte is a pan value (examples: 0 is left pan, 128 is centre pan
  +
and 255 is right pan) (0-255)
  +
|-
  +
|Orders
  +
|Length is order
  +
number
  +
|0-199 are valid patterns,
  +
254 is seperator and 255 is song end.
  +
|-
  +
|Instrument offsets
  +
|Length is instrument
  +
number * 4
  +
|Each offset is an integer offset to Instrument in file
  +
|-
  +
|Sample Header offsets
  +
|Length is sample
  +
number * 4
  +
|Each offset is an integer offset to sample header in file
  +
|-
  +
|Instrument offsets
  +
|Length is pattern
  +
number * 4
  +
|Each offset is an integer offset to pattern in file
  +
|}
  +
  +
==== Edit history: ====
  +
{| class="article-table"
  +
|+Edit history para-pointer
  +
!Name
  +
!Length
  +
!Discription
  +
|-
  +
|Edit History number
  +
|short
  +
(2 bytes)
  +
|Number of contained edit histories
  +
|-
  +
|Edit histories
  +
|8 bytes per history
  +
|Explained below
  +
|}
  +
{| class="article-table"
  +
|+Edit history (8 bytes)
  +
!Name
  +
!Length
  +
!Discription
  +
|-
  +
|Fat date
  +
|short
  +
(2 bytes)
  +
|Date of edit in Microsoft Fat date format
  +
|-
  +
|Fat time
  +
|short
  +
(2 bytes)
  +
|Time of edit in Microsoft Fat date format
  +
|-
  +
|Run time
  +
|int
  +
(4 bytes)
  +
|Runtime in MS-DOS ticks
  +
(1/18.2 of a second)
  +
|}
  +
  +
==== MIDI macros ====
  +
There are three groups of MIDI macros an IT file can contain. These are only present if either bit 7 of flags or bit 3 of special flags are on.
  +
  +
* 9 Global (9 * 32 bytes)
  +
* 16 Parametric and (16 * 32 bytes)
  +
* 128 Fixed (128 * 32 bytes)
  +
  +
{| class="article-table"
  +
|+
  +
Macro structure
  +
!Name
  +
!Length
  +
!Discription
  +
|-
  +
|Macro String
  +
|32 byte
  +
|Holds 32 characters
  +
|}
  +
MIDI macros are a total of 4896 bytes long.
  +
  +
==== Pattern Names ====
  +
{| class="article-table"
  +
|+Pattern names (PNAN)
  +
!Name
  +
!Size
  +
!Discription
  +
|-
  +
|Length
  +
|int
  +
(4 bytes)
  +
|Length of pattern names
  +
(Name count is Length / 32)
  +
|-
  +
|Pattern name
  +
|32 bytes
  +
per name
  +
|Name of pattern
  +
|}
  +
  +
==== Channel Names ====
  +
{| class="article-table"
  +
|+Channel names (CNAN)
  +
!Name
  +
!Size
  +
!Discription
  +
|-
  +
|Length
  +
|int
  +
(4 bytes)
  +
|Length of pattern names
  +
(Name count is Length / 20)
  +
|-
  +
|Channel name
  +
|32 bytes
  +
per name
  +
|Name of channel
  +
|}
  +
  +
==== Message ====
  +
{| class="article-table"
  +
|+Message
  +
!Name
  +
!Size
  +
!Discription
  +
|-
  +
|Message
  +
|defined in message length
  +
|The message string
 
|}
 
|}

Revision as of 01:30, 23 April 2021

Impulse tracker is a type of music tracker format that was created by Jeffery Lim in 1998. It was based off the scream tracker 3 format but added addition features such as instruments, 16-bit sample, stereo sample support and new note actions. Songs of this format are saved under the extention (.it)

Format

The impulse tracker is written in Little Endian byte order

The impulse tracker format is split into four main parts. these include

  • Header
    • Edit history
    • MIDI macros
    • Pattern names (OMPT only)
    • Channel names (OMPT only)
    • Plug-ins (OMPT only)
    • Message
  • Instrument
  • Sample Header
  • Pattern data
  • Sample Data
  • Author (OMPT only)

Header:

Header code (IMPI) 4 bytes at start
Name Length Discription
Song name 26 bytes

(including nulls)

Name of song
Pattern hilight 2 bytes Byte 1 is rows per beat

Byte 2 is rows per mesaure

(Only used in editing)

Order Number 1 short

(2 bytes)

Number of sequenced patterns in song
Instrument Number 1 short

(2 bytes)

Number of instruments in song
Sample Number 1 short

(2 bytes)

Number of samples in song
Pattern Number 1 short

(2 bytes)

Number of patterns in song
Created with tracker 1 short

(2 bytes)

ID of tracker that made this

(Impulse tracker is 1.0 to 2.17)

encoded as hexadecimal so 1.0

becomes 0x0100

Compatible with tracker 1 short

(2 bytes)

1.0 to 2.17

(encoded as hexadecimal)

Flags 1 short

(2 bytes)

  • Bit 0, Stereo if on; mono if off
  • Bit 1, Mixing (obsolete since 1.04)
  • Bit 2, Use instruments if on, use samples if off
  • Bit 3, Use linear slides if on, use Amiga slides if off
  • Bit 4, Use Old effects of on, use IT effects of off
  • Bit 5, Link G effect with E and F memory if on
  • Bit 6, MIDI pitch controlled if on
  • Bit 7, Request Embedded MIDI Macros if on

Bit 8-15 are reserved

Special 1 short

(2 bytes)

  • Bit 0, Song message attached if on
  • Bit 1, Edit history embedded if on*
  • Bit 2, Highlight embedded if on
  • Bit 3, Embedded MIDI Macro

Bit 4-15 are reserved

*Some versions of Schism tracker set this off even if

there is embedded history.

Global volume 1 byte Global volume of song (0-128)
Mix volume 1 byte Mixing volume of song (0-128)
Initial speed 1 byte Starting tick speed of song
Initial tempo 1 byte Starting beats Per minute of song
Pan separation 1 byte Panning separation between channels (0-128)
Pitch wheel depth 1 byte Pitch wheel depth for MIDI controllers
Message Length 1 short

(2 bytes)

Length of attached message
Message offset 1 int

(4 bytes)

Offset of message in file
Reserved 4 bytes Open MPT writes "OMPT" here if it is an interpreted

Mod Plug file

Initial channel volume 64 bytes Each byte is a channel volume (0-64)
Initial channel pan 64 bytes Each byte is a pan value (examples: 0 is left pan, 128 is centre pan

and 255 is right pan) (0-255)

Orders Length is order

number

0-199 are valid patterns,

254 is seperator and 255 is song end.

Instrument offsets Length is instrument

number * 4

Each offset is an integer offset to Instrument in file
Sample Header offsets Length is sample

number * 4

Each offset is an integer offset to sample header in file
Instrument offsets Length is pattern

number * 4

Each offset is an integer offset to pattern in file

Edit history:

Edit history para-pointer
Name Length Discription
Edit History number short

(2 bytes)

Number of contained edit histories
Edit histories 8 bytes per history Explained below
Edit history (8 bytes)
Name Length Discription
Fat date short

(2 bytes)

Date of edit in Microsoft Fat date format
Fat time short

(2 bytes)

Time of edit in Microsoft Fat date format
Run time int

(4 bytes)

Runtime in MS-DOS ticks

(1/18.2 of a second)

MIDI macros

There are three groups of MIDI macros an IT file can contain. These are only present if either bit 7 of flags or bit 3 of special flags are on.

  • 9 Global (9 * 32 bytes)
  • 16 Parametric and (16 * 32 bytes)
  • 128 Fixed (128 * 32 bytes)
Macro structure
Name Length Discription
Macro String 32 byte Holds 32 characters

MIDI macros are a total of 4896 bytes long.

Pattern Names

Pattern names (PNAN)
Name Size Discription
Length int

(4 bytes)

Length of pattern names

(Name count is Length / 32)

Pattern name 32 bytes

per name

Name of pattern

Channel Names

Channel names (CNAN)
Name Size Discription
Length int

(4 bytes)

Length of pattern names

(Name count is Length / 20)

Channel name 32 bytes

per name

Name of channel

Message

Message
Name Size Discription
Message defined in message length The message string