Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4 | lvd | 1 | Path: pdxgate!usenet.ee.pdx.edu!ogicse!network.ucsd.edu!usc!wupost!uunet!pipex!marble.uknet.ac.uk!uknet!edcastle!iantw |
2 | From: iantw@castle.ed.ac.uk (Ian Tweedie) |
||
3 | Newsgroups: comp.sys.ibm.pc.demos |
||
4 | Subject: Re: Does anyone have the MOD file format? |
||
5 | Message-ID: <33868@castle.ed.ac.uk> |
||
6 | Date: 5 Apr 93 11:48:50 GMT |
||
7 | References: <lru8ebINN79h@earth.cs.utexas.edu> <LESHER.93Apr4142851@vega.cs.bucknell.edu> |
||
8 | Organization: Edinburgh University |
||
9 | Lines: 542 |
||
10 | |||
11 | lesher@vega.cs.bucknell.edu (Tim Lesher) writes: |
||
12 | |||
13 | >I don't have it, but I seem to remember that there's a really good |
||
14 | >tutorial packaged with the Mac mod player "The Sound Trecker". You |
||
15 | >can get if from wuarchive.wustl.edu, /mirrors/info-mac/sound/st. |
||
16 | |||
17 | Here is the Amiga (ProTracker) module format document. The first part |
||
18 | I got from a BBS, the second part I got from Mark Cox (author of |
||
19 | ModPlay, etc). |
||
20 | |||
21 | ********************************************************************* |
||
22 | |||
23 | |||
24 | Protracker 1.1B Song/Module Format: |
||
25 | |||
26 | Offset Bytes Description |
||
27 | |||
28 | |||
29 | Information for sample 1-31: |
||
30 | |||
31 | Offset Bytes Description |
||
32 | 20 22 Samplename for sample 1. Pad with null bytes. |
||
33 | 42 2 Samplelength for sample 1. Stored as number of words. |
||
34 | Multiply by two to get real sample length in bytes. |
||
35 | 44 1 Lower four bits are the finetune value, stored as a signed |
||
36 | four bit number. The upper four bits are not used, and |
||
37 | should be set to zero. |
||
38 | Value: Finetune: |
||
39 | |||
40 | 1 +1 |
||
41 | 2 +2 |
||
42 | 3 +3 |
||
43 | 4 +4 |
||
44 | 5 +5 |
||
45 | 6 +6 |
||
46 | 7 +7 |
||
47 | 8 -8 |
||
48 | 9 -7 |
||
49 | A -6 |
||
50 | B -5 |
||
51 | C -4 |
||
52 | D -3 |
||
53 | E -2 |
||
54 | F -1 |
||
55 | |||
56 | 45 1 Volume for sample 1. Range is $00-$40, or 0-64 decimal. |
||
57 | 46 2 Repeat point for sample 1. Stored as number of words offset |
||
58 | from start of sample. Multiply by two to get offset in bytes. |
||
59 | 48 2 Repeat Length for sample 1. Stored as number of words in |
||
60 | loop. Multiply by two to get replen in bytes. |
||
61 | |||
62 | Information for the next 30 samples starts here. It's just like the info for |
||
63 | sample 1. |
||
64 | |||
65 | Offset Bytes Description |
||
66 | 50 30 Sample 2... |
||
67 | 80 30 Sample 3... |
||
68 | . |
||
69 | . |
||
70 | . |
||
71 | 890 30 Sample 30... |
||
72 | 920 30 Sample 31... |
||
73 | |||
74 | Offset Bytes Description |
||
75 | 950 1 Songlength. Range is 1-128. |
||
76 | 951 1 Well... this little byte here is set to 127, so that old |
||
77 | trackers will search through all patterns when loading. |
||
78 | Noisetracker uses this byte for restart, but we don't. |
||
79 | 952 128 Song positions 0-127. Each hold a number from 0-63 that |
||
80 | tells the tracker what pattern to play at that position. |
||
81 | 1080 4 The four letters "M.K." - This is something Mahoney & Kaktus |
||
82 | inserted when they increased the number of samples from |
||
83 | 15 to 31. If it's not there, the module/song uses 15 samples |
||
84 | or the text has been removed to make the module harder to |
||
85 | rip. Startrekker puts "FLT4" or "FLT8" there instead. |
||
86 | |||
87 | Offset Bytes Description |
||
88 | 1084 1024 Data for pattern 00. |
||
89 | . |
||
90 | . |
||
91 | . |
||
92 | xxxx Number of patterns stored is equal to the highest patternnumber |
||
93 | in the song position table (at offset 952-1079). |
||
94 | |||
95 | Each note is stored as 4 bytes, and all four notes at each position in |
||
96 | the pattern are stored after each other. |
||
97 | |||
98 | 00 - chan1 chan2 chan3 chan4 |
||
99 | 01 - chan1 chan2 chan3 chan4 |
||
100 | 02 - chan1 chan2 chan3 chan4 |
||
101 | etc. |
||
102 | |||
103 | Info for each note: |
||
104 | |||
105 | _____byte 1_____ byte2_ _____byte 3_____ byte4_ |
||
106 | / / / / |
||
107 | 0000 0000-00000000 0000 0000-00000000 |
||
108 | |||
109 | Upper four 12 bits for Lower four Effect command. |
||
110 | bits of sam- note period. bits of sam- |
||
111 | ple number. ple number. |
||
112 | |||
113 | Periodtable for Tuning 0, Normal |
||
114 | C-1 to B-1 : 856,808,762,720,678,640,604,570,538,508,480,453 |
||
115 | C-2 to B-2 : 428,404,381,360,339,320,302,285,269,254,240,226 |
||
116 | C-3 to B-3 : 214,202,190,180,170,160,151,143,135,127,120,113 |
||
117 | |||
118 | To determine what note to show, scan through the table until you find |
||
119 | the same period as the one stored in byte 1-2. Use the index to look |
||
120 | up in a notenames table. |
||
121 | |||
122 | This is the data stored in a normal song. A packed song starts with the |
||
123 | four letters "PACK", but i don't know how the song is packed: You can |
||
124 | get the source code for the cruncher/decruncher from us if you need it, |
||
125 | but I don't understand it; I've just ripped it from another tracker... |
||
126 | |||
127 | In a module, all the samples are stored right after the patterndata. |
||
128 | To determine where a sample starts and stops, you use the sampleinfo |
||
129 | structures in the beginning of the file (from offset 20). Take a look |
||
130 | at the mt_init routine in the playroutine, and you'll see just how it |
||
131 | is done. |
||
132 | |||
133 | Lars "ZAP" Hamre/Amiga Freelancers |
||
134 | |||
135 | -------------------------- |
||
136 | |||
137 | Found that document... |
||
138 | |||
139 | Mark J Cox ------------------------------------------- m.j.h.cox@bradford.ac.uk |
||
140 | University of Bradford ---------------------------- bc732@cleveland.freenet.edu |
||
141 | Mark |
||
142 | |||
143 | EFFECT COMMANDS |
||
144 | --------------- |
||
145 | Effect commands on protracker should |
||
146 | be compatible with all other trackers. |
||
147 | |||
148 | 1 - Portamento Up 9 - SampleOffset |
||
149 | 2 - Portamento Down A - VolumeSlide |
||
150 | 3 - TonePortamento B - PositionJump |
||
151 | 4 - Vibrato C - Set Volume |
||
152 | 5 - ToneP + VolSlide D - PatternBreak |
||
153 | 6 - Vibra + VolSlide E - Misc. Cmds |
||
154 | 7 - Tremolo F - Set Speed |
||
155 | |||
156 | |||
157 | E - COMMANDS |
||
158 | ------------ |
||
159 | The E command has been altered to |
||
160 | contain more commands than one. |
||
161 | E0- Filter On/Off E8- * NOT USED * |
||
162 | E1- Fineslide Up E9- Retrig Note |
||
163 | E2- Fineslide Down EA- FineVol Up |
||
164 | E3- Glissando Control EB- FineVol Down |
||
165 | E4- Vibrato Control EC- NoteCut |
||
166 | E5- Set Finetune ED- NoteDelay |
||
167 | E6- Patternloop EE- PatternDelay |
||
168 | E7- Tremolo Control EF- Invert Loop |
||
169 | |||
170 | |||
171 | Cmd 0. Arpeggio [Range:$0-$F/$0-$F] |
||
172 | ----------------------------------- |
||
173 | Usage: $0 + 1st halfnote add |
||
174 | + 2nd halfnote add |
||
175 | Arpeggio is used to simulate chords. |
||
176 | This is done by rapidly changing the |
||
177 | pitch between 3(or 2) different notes. |
||
178 | It sounds very noisy and grainy on |
||
179 | most samples, but ok on monotone ones. |
||
180 | Example: C-300047 C-major chord: |
||
181 | (C+E+G or C+4+7 halfnotes) |
||
182 | C-300037 C-minor chord: |
||
183 | (C+D#+G or C+3+7 halfnotes) |
||
184 | |||
185 | |||
186 | Cmd 1. Portamento up [Speed:$00-$FF] |
||
187 | ------------------------------------ |
||
188 | Usage: $1 + portamento speed |
||
189 | Portamento up will simply slide the |
||
190 | sample pitch up. You can NOT slide |
||
191 | higher than B-3! (Period 113) |
||
192 | Example: C-300103 1 is the command, |
||
193 | 3 is the portamentospeed. |
||
194 | NOTE: The portamento will be called as |
||
195 | many times as the speed of the song. |
||
196 | This means that you'll sometimes have |
||
197 | trouble sliding accuratly. If you |
||
198 | change the speed without changing the |
||
199 | sliderates, it will sound bad... |
||
200 | |||
201 | |||
202 | Cmd 2. Portamento down [Speed:$00-FF] |
||
203 | ------------------------------------- |
||
204 | Usage: $2 + portamento speed |
||
205 | Just like command 1, except that this |
||
206 | one slides the pitch down instead. |
||
207 | (Adds to the period). |
||
208 | You can NOT slide lower than C-1! |
||
209 | (Period 856) |
||
210 | Example: C-300203 2 is the command, |
||
211 | 3 is the portamentospeed. |
||
212 | |||
213 | |||
214 | Cmd 3. Tone-portamento [Speed:$00-$FF] |
||
215 | -------------------------------------- |
||
216 | Usage: Dest-note + $3 + slidespeed |
||
217 | This command will automatically slide |
||
218 | from the old note to the new. |
||
219 | You don't have to worry about which |
||
220 | direction to slide, you need only set |
||
221 | the slide speed. To keep on sliding, |
||
222 | just select the command $3 + 00. |
||
223 | Example: A-200000 First play a note. |
||
224 | C-300305 C-3 is the note to |
||
225 | slide to, 3 the command, |
||
226 | and 5 the speed. |
||
227 | |||
228 | |||
229 | Cmd 4. Vibrato [Rate:$0-$F,Dpth:$0-$F] |
||
230 | -------------------------------------- |
||
231 | Usage: $4 + vibratorate + vibratodepth |
||
232 | Example: C-300481 4 is the command, |
||
233 | 8 is the speed of the vibrato, |
||
234 | and 1 is the depth of the vibrato. |
||
235 | To keep on vibrating, just select |
||
236 | the command $4 + 00. To change the |
||
237 | vibrato, you can alter the rate, |
||
238 | depth or both. Use command E4- to |
||
239 | change the vibrato-waveform. |
||
240 | |||
241 | |||
242 | Cmd 5. ToneP + Volsl [Spd:$0-$F/$0-$F] |
||
243 | -------------------------------------- |
||
244 | Usage: $5 + upspeed + downspeed |
||
245 | This command will continue the current |
||
246 | toneportamento and slide the volume |
||
247 | at the same time. Stolen from NT2.0. |
||
248 | Example: C-300503 3 is the speed to |
||
249 | turn the volume down. |
||
250 | C-300540 4 is the speed to |
||
251 | slide it up. |
||
252 | |||
253 | |||
254 | Cmd 6. Vibra + Volsl [Spd:$0-$F/$0-$F] |
||
255 | -------------------------------------- |
||
256 | Usage: $6 + upspeed + downspeed |
||
257 | This command will continue the current |
||
258 | vibrato and slide the volume at the |
||
259 | same time. Stolen from NT2.0. |
||
260 | Example: C-300605 5 is the speed to |
||
261 | turn the volume down. |
||
262 | C-300640 4 is the speed to |
||
263 | slide it up. |
||
264 | |||
265 | |||
266 | Cmd 7. Tremolo [Rate:$0-$F,Dpth:$0-$F] |
||
267 | -------------------------------------- |
||
268 | Usage: $7 + tremolorate + tremolodepth |
||
269 | Tremolo vibrates the volume. |
||
270 | Example: C-300794 7 is the command, |
||
271 | 9 is the speed of the tremolo, |
||
272 | and 4 is the depth of the tremolo. |
||
273 | To keep on tremoling, just select |
||
274 | the command $7 + 00. To change the |
||
275 | tremolo, you can alter the rate, |
||
276 | depth or both. Use command E7- to |
||
277 | change the tremolo-waveform. |
||
278 | |||
279 | |||
280 | Cmd 9. Set SampleOffset [Offs:$00-$FF] |
||
281 | -------------------------------------- |
||
282 | Usage: $9 + Sampleoffset |
||
283 | This command will play from a chosen |
||
284 | position in the sample, and not from |
||
285 | the beginning. The two numbers equal |
||
286 | the two first numbers in the length |
||
287 | of the sample. Handy for speech- |
||
288 | samples. |
||
289 | Example: C-300923 Play sample from |
||
290 | offset $2300. |
||
291 | |||
292 | |||
293 | Cmd A. Volumeslide [Speed:$0-$F/$0-$F] |
||
294 | -------------------------------------- |
||
295 | Usage: $A + upspeed + downspeed |
||
296 | Example: C-300A05 5 is the speed to |
||
297 | turn the volume down. |
||
298 | C-300A40 4 is the speed to |
||
299 | slide it up. |
||
300 | NOTE: The slide will be called as |
||
301 | many times as the speed of the song. |
||
302 | The slower the song, the more the |
||
303 | volume will be changed on each note. |
||
304 | |||
305 | |||
306 | Cmd B. Position-jump [Pos:$00-$7F] |
||
307 | ---------------------------------- |
||
308 | Usage: $B + position to continue at |
||
309 | Example: C-300B01 B is the command, |
||
310 | 1 is the position to |
||
311 | restart the song at. |
||
312 | This command will also perform a |
||
313 | pattern-break (see 2 pages below). |
||
314 | You can use this command instead of |
||
315 | restart as on noisetracker, but you |
||
316 | must enter the position in hex! |
||
317 | |||
318 | |||
319 | Cmd C. Set volume [Volume:$00-$40] |
||
320 | ---------------------------------- |
||
321 | Usage: $C + new volume |
||
322 | Well, this old familiar command will |
||
323 | set the current volume to your own |
||
324 | selected. The highest volume is $40. |
||
325 | All volumes are represented in hex. |
||
326 | (Programmers do it in hex, you know!) |
||
327 | Example: C-300C10 C is the command, |
||
328 | 10 is the volume (16 decimal). |
||
329 | |||
330 | |||
331 | Cmd D. Pattern-break |
||
332 | [Pattern-pos:00-63, decimal] |
||
333 | ---------------------------- |
||
334 | Usage: $D + pattern-position |
||
335 | This command just jumps to the next |
||
336 | song-position, and continues play |
||
337 | from the patternposition you specify. |
||
338 | Example: C-300D00 Jump to the next |
||
339 | song-position and continue play |
||
340 | from patternposition 00. |
||
341 | Or: C-300D32 Jump to the next |
||
342 | song-position and continue play |
||
343 | from patternposition 32 instead. |
||
344 | |||
345 | |||
346 | Cmd E0. Set filter [Range:$0-$1] |
||
347 | -------------------------------- |
||
348 | Usage: $E0 + filter-status |
||
349 | This command jerks around with the |
||
350 | sound-filter on some A500 + A2000. |
||
351 | All other Amiga-users should keep out |
||
352 | of playing around with it. |
||
353 | Example: C-300E01 disconnects filter |
||
354 | (turns power LED off) |
||
355 | C-300E00 connects filter |
||
356 | (turns power LED on) |
||
357 | |||
358 | |||
359 | Cmd E1. Fineslide up [Range:$0-$F] |
||
360 | ---------------------------------- |
||
361 | Usage: $E1 + value |
||
362 | This command works just like the |
||
363 | normal portamento up, except that |
||
364 | it only slides up once. It does not |
||
365 | continue sliding during the length of |
||
366 | the note. |
||
367 | Example: C-300E11 Slide up 1 at the |
||
368 | beginning of the note. |
||
369 | (Great for creating chorus effects) |
||
370 | |||
371 | |||
372 | Cmd E2. Fineslide down [Range:$0-$F] |
||
373 | ------------------------------------ |
||
374 | Usage: $E2 + value |
||
375 | This command works just like the |
||
376 | normal portamento down, except that |
||
377 | it only slides down once. It does not |
||
378 | continue sliding during the length of |
||
379 | the note. |
||
380 | Example: C-300E26 Slide up 6 at the |
||
381 | beginning of the note. |
||
382 | |||
383 | |||
384 | Cmd E3. Glissando Ctrl [Range:$0-$1] |
||
385 | ------------------------------------ |
||
386 | Usage: $E3 + Glissando-Status |
||
387 | Glissando must be used with the tone- |
||
388 | portamento command. When glissando is |
||
389 | activated, toneportamento will slide |
||
390 | a halfnote at a time, instead of a |
||
391 | straight slide. |
||
392 | Example: C-300E31 Turn Glissando on. |
||
393 | C-300E30 Turn Glissando off. |
||
394 | |||
395 | |||
396 | Cmd E4. Set vibrato waveform |
||
397 | [Range:$0-$3] |
||
398 | ---------------------------- |
||
399 | Usage: $E4 + vibrato-waveform |
||
400 | Example: C-300E40 Set sine(default) |
||
401 | E44 Don't retrig WF |
||
402 | C-300E41 Set Ramp Down |
||
403 | E45 Don't retrig WF |
||
404 | C-300E42 Set Squarewave |
||
405 | E46 Don't retrig WF |
||
406 | C-300E43 Set Random |
||
407 | E47 Don't retrig WF |
||
408 | |||
409 | |||
410 | Cmd E5. Set finetune [Range:$0-$F] |
||
411 | ---------------------------------- |
||
412 | Usage: $E5 + finetune-value |
||
413 | Example: C-300E51 Set finetune to 1. |
||
414 | Use these tables to figure out the |
||
415 | finetune-value. |
||
416 | Finetune: +7 +6 +5 +4 +3 +2 +1 0 |
||
417 | Value: 7 6 5 4 3 2 1 0 |
||
418 | Finetune: -1 -2 -3 -4 -5 -6 -7 -8 |
||
419 | Value: F E D C B A 9 8 |
||
420 | |||
421 | |||
422 | Cmd E6. PatternLoop [Loops:$0-$F] |
||
423 | ---------------------------------- |
||
424 | Usage: $E6 + number of loops |
||
425 | This command will loop a part of a |
||
426 | pattern. |
||
427 | Example: C-300E60 Set loopstart. |
||
428 | C-300E63 Jump to loop 3 |
||
429 | times before playing on. |
||
430 | |||
431 | |||
432 | Cmd E7. Set tremolo waveform |
||
433 | [Range:$0-$3] |
||
434 | ---------------------------- |
||
435 | Usage: $E7 + tremolo-waveform |
||
436 | Example: C-300E70 Set sine(default) |
||
437 | E74 Don't retrig WF |
||
438 | C-300E71 Set Ramp Down |
||
439 | E75 Don't retrig WF |
||
440 | C-300E72 Set Squarewave |
||
441 | E76 Don't retrig WF |
||
442 | C-300E73 Set Random |
||
443 | E77 Don't retrig WF |
||
444 | |||
445 | |||
446 | Cmd E9. Retrig note [Value:$0-$F] |
||
447 | --------------------------------- |
||
448 | Usage: $E9 + Tick to Retrig note at. |
||
449 | This command will retrig the same note |
||
450 | before playing the next. Where to |
||
451 | retrig depends on the speed of the |
||
452 | song. If you retrig with 1 in speed 6 |
||
453 | that note will be trigged 6 times in |
||
454 | one note slot. Retrig on hi-hats! |
||
455 | Example: C-300F06 Set speed to 6. |
||
456 | C-300E93 Retrig at tick 3 |
||
457 | out of 6. |
||
458 | |||
459 | |||
460 | Cmd EA. FineVolsl up [Range:$0-$F] |
||
461 | ---------------------------------- |
||
462 | Usage: $EA + value |
||
463 | This command works just like the |
||
464 | normal volumeslide up, except that |
||
465 | it only slides up once. It does not |
||
466 | continue sliding during the length of |
||
467 | the note. |
||
468 | Example: C-300EA3 Slide volume up 1 |
||
469 | at the beginning of the note. |
||
470 | |||
471 | |||
472 | Cmd EB. FineVolsl down [Range:$0-$F] |
||
473 | ------------------------------------ |
||
474 | Usage: $EB + value |
||
475 | This command works just like the |
||
476 | normal volumeslide down, except that |
||
477 | it only slides down once. It does not |
||
478 | continue sliding during the length of |
||
479 | the note. |
||
480 | Example: C-300EB6 Slide volume down |
||
481 | 6 at the beginning of the note. |
||
482 | |||
483 | |||
484 | Cmd EC. Cut note [Value:$0-$F] |
||
485 | ------------------------------ |
||
486 | Usage: $EC + Tick to Cut note at. |
||
487 | This command will cut the note |
||
488 | at the selected tick, creating |
||
489 | extremely short notes. |
||
490 | Example: C-300F06 Set speed to 6. |
||
491 | C-300EC3 Cut at tick 3 out |
||
492 | of 6. |
||
493 | Note that the note is not really cut, |
||
494 | the volume is just turned down. |
||
495 | |||
496 | |||
497 | Cmd ED. NoteDelay [Value:$0-$F] |
||
498 | ------------------------------- |
||
499 | Usage: $ED + ticks to delay note. |
||
500 | This command will delay the note |
||
501 | to the selected tick. |
||
502 | Example: C-300F06 Set speed to 6. |
||
503 | C-300ED3 Play note at tick |
||
504 | 3 out of 6. |
||
505 | |||
506 | |||
507 | Cmd EE. PatternDelay [Notes:$0-$F] |
||
508 | ---------------------------------- |
||
509 | Usage: $EE + notes to delay pattern. |
||
510 | This command will delay the pattern |
||
511 | the selected numbers of notes. |
||
512 | Example: C-300EE8 Delay pattern 8 |
||
513 | notes before playing on. |
||
514 | All other effects are still active |
||
515 | when the pattern is being delayed. |
||
516 | |||
517 | |||
518 | Cmd EF. Invert Loop [Speed:$0-$F] |
||
519 | --------------------------------- |
||
520 | Usage: $EF + Invertspeed |
||
521 | This command will need a short loop |
||
522 | ($10,20,40,80 etc. bytes) to work. |
||
523 | It will invert the loop byte by byte. |
||
524 | Sounds better than funkrepeat... |
||
525 | Example: C-300EF8 Set invspeed to 8. |
||
526 | To turn off the inverting, set |
||
527 | invspeed to 0, or press ctrl + Z. |
||
528 | |||
529 | |||
530 | Cmd F. Set speed [Speed:$00-$FF] |
||
531 | -------------------------------- |
||
532 | Usage: $F + speed |
||
533 | This command will set the speed of the |
||
534 | song. |
||
535 | |||
536 | |||
537 | |||
538 | |||
539 | |||
540 | ---------------------------end forwarded message---------------------------- |
||
541 | -- |
||
542 | --Jeff Hartung-- |
||
543 | Disclaimer: My opinions only, etc., etc., BLAH! BLAH! BLAH!... |
||
544 | InterNet - hartung@crl.ucsd.edu BITNET - hartung@ucsd |
||
545 | UUCP - ucsd!crl.ucsd.edu!hartung |
||
546 | |||
547 | |||
548 | This is a reposting for an earlier one. |
||
549 | |||
550 | Enjoy..... |
||
551 | |||
552 | ian |
||
553 |