]> 4ch.mooo.com Git - 16.git/blob - 16/PCGPE10/UT.TXT
modified: 16/modex16/pcxtest.exe
[16.git] / 16 / PCGPE10 / UT.TXT
1 \r
2 UltraTracker 1.5\r
3 ----------------\r
4 <From the IBM "ultra150.zip" archive by Marc Schallehn, text file by\r
5 Muchael J. Sutter and update comments added by Marc Schallehn. -JH>\r
6 \r
7                Mysterious's ULTRA TRACKER File Format\r
8                   by FreeJack of The Elven Nation\r
9    (some additional infos on the new format (V1.4/5) by MAS -> * marked)\r
10 \r
11 I've done my best to document the file format of Ultra Tracker (UT).\r
12 If you find any errors please contact me.\r
13 The file format has stayed consistent through the first four public releases.\r
14 At the time of this writting, Ultra Tracker is up to version 1.3\r
15 (* With version V1.4/5 there are some changes done in the format. *)\r
16 \r
17 Thanks go to :\r
18 SoJa of YLYSY for help translating stuff.\r
19 \r
20 Marc Andr\82 Schallehn\r
21 Thanks for putting out this GREAT program.\r
22 Also thanks for the info on 16bit samples.\r
23 \r
24 With all this crap out of the way lets get to the format.\r
25 \r
26 \r
27 Sample Structure :\r
28 ______________________________________________________________________________\r
29 Samplename : 32 bytes (Sample name)\r
30 DosName    : 12 bytes (when you load a sample into UT,\r
31                       it records the file name here)\r
32 LoopStart  : dbl word (loop start point)\r
33 LoopEnd    : dbl word (loop end point)\r
34 SizeStart  : dbl word (see below)\r
35 SizeEnd    : dbl word (see below)\r
36 volume     : byte (UT uses a logarithmic volume setting, ranging from 0-255)\r
37              (* V1.4: uses linear Volume ranging from 0-255 *)\r
38 Bidi Loop  : byte (see below)\r
39 FineTune   : word (Fine tune setting, uses full word value)\r
40 ______________________________________________________________________________\r
41 \r
42 8 Bit Samples  :\r
43 \r
44 SizeStart  :\r
45 The SizeStart is the starting offset of the sample. \r
46 This seems to tell UT how to load the sample into the Gus's onboard memory. \r
47 All the files I have worked with start with a value of 32 for the first sample, \r
48 and the previous SizeEnd value for all sample after that. (See Example below)\r
49 If the previous sample was 16bit, then SizeStart = (Last SizeEnd * 2)\r
50 SizeEnd : \r
51 Like the SizeStart, SizeEnd seems to tell UT where to load the sample into the \r
52 Gus's onboard memory. SizeEnd equal SizeStart + the length of the sample.\r
53 \r
54 Example :\r
55 If a UT file had 3 samples, 1st 12000 bytes, 2nd 5600  bytes, 3rd 8000 byte. \r
56 The SizeStart and SizeEnd would look like this:\r
57 \r
58 Sample        SizeStart         SizeEnd\r
59 1st            32                12032\r
60 2nd            12032             17632\r
61 3rd            17632             25632\r
62 \r
63 ***Note***\r
64 Samples may NOT cross 256k boundaries. If a sample is too large to fit into the\r
65 remaining space, its Sizestart will equal the start of the next 256k boundary.\r
66 UT does keep track of the free space at the top of the 256k boundaries, and\r
67 will load a sample in there if it will fit.\r
68 Example : EndSize = 252144\r
69 If the next sample was 12000 bytes, its SizeStart would be 262144, not 252144.\r
70 Note that this leaves 10000 bytes unused. If any of the following sample could\r
71 fit between 252144 and 262144, its Sizestart would be 252144.\r
72 Say that 2 samples after the 12000 byte sample we had a sample that was only\r
73 5000 bytes long. Its SizeStart would be 252144 and its SizeEnd would be 257144.\r
74 This also applies to 16 Bit Samples.\r
75 \r
76 16 Bit Samples :\r
77 16 bit samples are handled a little different then 8 bit samples.\r
78 The SizeStart variable is calculated by dividing offset (last SizeEnd)\r
79 by 2. The SizeEnd variable equals SizeStart + (SampleLength / 2).\r
80 If the first sample is 16bit, then SizeStart = 16.\r
81 Example :\r
82           sample1 = 8bit, 1000 bytes\r
83           sample2 = 16bit, 5000 bytes\r
84 \r
85           sample1 SizeStart = 32\r
86                   SizeEnd   = 1032 (32 + 1000)\r
87 \r
88           sample2 SizeStart = 516 (offset (1032) / 2)\r
89                   SizeEnd   = 3016 (516 + (5000/2))\r
90 \r
91 ***Note***\r
92 If a 16bit sample is loaded into banks 2,3, or 4\r
93 the SizeStart variable will be\r
94 (offset / 2) + 262144 (bank 2)\r
95 (offset / 2) + 524288 (bank 3)\r
96 (offset / 2) + 786432 (bank 4)\r
97 The SizeEnd variable will be\r
98 SizeStart + (SampleLength / 2) + 262144 (bank 2)\r
99 SizeStart + (SampleLength / 2) + 524288 (bank 3)\r
100 SizeStart + (SampleLength / 2) + 786432 (bank 4)\r
101 \r
102 BiDi Loop : (Bidirectional Loop)\r
103 UT takes advantage of the Gus's ability to loop a sample in several different\r
104 ways. By setting the Bidi Loop, the sample can be played forward or backwards,\r
105 looped or not looped. The Bidi variable also tracks the sample\r
106 resolution (8 or 16 bit).\r
107 \r
108 The following table shows the possible values of the Bidi Loop.\r
109 Bidi = 0  : No looping, forward playback,  8bit sample\r
110 Bidi = 4  : No Looping, forward playback, 16bit sample\r
111 Bidi = 8  : Loop Sample, forward playback, 8bit sample\r
112 Bidi = 12 : Loop Sample, forward playback, 16bit sample\r
113 Bidi = 24 : Loop Sample, reverse playback 8bit sample\r
114 Bidi = 28 : Loop Sample, reverse playback, 16bit sample\r
115 ______________________________________________________________________________\r
116 Event Structure:\r
117 ______________________________________________________________________________\r
118 Note                : byte (See note table below)\r
119 SampleNumber        : byte (Sample Number)\r
120 Effect1             : nib (Effect1)\r
121 Effect2             : nib (Effect2)\r
122 EffectVar           : word (Effect variables)\r
123 \r
124 The High order byte of EffectVar is the Effect variable for Effect1.\r
125 The Low order byte of EffectVar is the Effect variable for Effect2.\r
126 ***(Note)***\r
127 UT uses a form of compression on repetitive events. Say we read in the first\r
128 byte, if it = $FC then this signifies a repeat block. The next byte is the\r
129 repeat count. followed by the event structure to repeat.\r
130 If the first byte read does NOT = $FC then this is the note of the event.\r
131 So repeat blocks will be 7 bytes long : RepFlag      : byte ($FC)\r
132                                         RepCount     : byte\r
133                                         note         : byte\r
134                                         samplenumber : byte\r
135                                         effect1      : nib\r
136                                         effect2      : nib\r
137                                         effectVar    : word\r
138 \r
139 Repeat blocks do NOT bridge patterns. \r
140 ______________________________________________________________________________\r
141 Note Table:\r
142 ______________________________________________________________________________\r
143 note value of 0 = pause\r
144 C-0 to B-0    1 to 12\r
145 C-1 to B-1    13 to 24\r
146 C-2 to B-2    26 to 36\r
147 C-3 to B-3    39 to 48\r
148 C-4 to B-4    52 to 60\r
149 ______________________________________________________________________________\r
150 Offset     Bytes            Type                   Description\r
151 ______________________________________________________________________________\r
152 0             15           byte           ID block : should contain\r
153                                                      'MAS_UTrack_V001'\r
154                                           \r
155                                           (* V1.4: 'MAS_UTrack_V002')\r
156 \r
157                                           (* V1.5: 'MAS_UTrack_V003')\r
158 \r
159 15            32           AsciiZ         Song Title\r
160 47            1            reserved       This byte is reserved and\r
161                                           always contain 0;\r
162 \r
163                                           (* V1.4: jump-value: reserved * 32; \r
164                                            space between is used for song\r
165                                            text;\r
166                                            [reserved * 32] = RES ! )\r
167 \r
168 48+RES        1            byte           Number of Samples (NOS)\r
169 49+RES        NOS * 64     SampleStruct   Sample Struct (see Sample Structure)\r
170 \r
171 Patt_Seq = 48 + (NOS * 64) + RES\r
172                        \r
173 Patt_Seq          256        byte            Pattern Sequence\r
174 Patt_Seq+256      1          byte            Number Of Channels (NOC) Base 0\r
175 Patt_Seq+257      1          byte            Number Of patterns (NOP) Base 0\r
176 \r
177                                              (* V1.5: PAN-Position Table\r
178                                               Length: NOC * 1byte\r
179                                               [0 left] - [0F right] )\r
180 \r
181 NOC+Patt_Seq+258      varies     EventStruct     Pattern Data (See Event\r
182 Structure)\r
183 \r
184 ______________________________________________________________________________\r
185 The remainder of the file is the raw sample data. (signed)\r
186 ______________________________________________________________________________\r
187 \r
188 That should about cover it. If you have any questions, feel free to e-mail\r
189 me at freejack@shell.portal.com\r
190 \r
191 I can also be contacted on The UltraSound Connection   (813) 787-8644 \r
192 The UltraSound Connection is a BBS dedicated to the Gravis Ultrasound Card.\r
193 \r
194 Also I'm the author of Ripper and Gvoc. If anyone has any questions or\r
195 problems, please contact me.\r