Article View: bit.listserv.coco
Article #43275Amiga .MOD file format info (10K text)
From: PAULSENIURA
Date: Sun, 19 Dec 1993 21:03
Date: Sun, 19 Dec 1993 21:03
280 lines
11201 bytes
11201 bytes
The Amiga MOD Format
--------------------
From: norlin@mailhost.ecn.uoknor.edu (Norman Lin)
MOD files are music files containing 2 parts:
(1) a bank of digitized samples
(2) sequencing information describing how and when to play the samples
MOD files originated on the Amiga, but because of their flexibility
and the extremely large number of MOD files available, MOD players
are now available for a variety of machines (IBM PC, Mac, Sparc
Station, etc.)
The samples in a MOD file are raw, 8 bit, signed, headerless, linear
digital data. There may be up to 31 distinct samples in a MOD file,
each with a length of up to 128K (though most are much smaller; say,
10K - 60K). An older MOD format only allowed for up to 15 samples in
a MOD file; you don't see many of these anymore. [The standard
sampling rate is 10k, see below. --GvR]
The sequencing information in a MOD file contains 4 tracks of
information describing which, when, for how long, and at what frequency
samples should be played. This means that a MOD file can have up
to 31 distinct (digitized) instrument sounds, with up to 4 playing
simultaneously at any given point. This allows a wide variety
of orchestrational possibilities, including use of voice samples
or creation of one's own instruments (with appropriate sampling
hardware/software). The ability to use one's own samples as instruments
is a flexibility that other music files/formats do not share, and
is one of the reasons MOD files are so popular, numerous, and diverse.
15 instrument MODs, as noted above, are somewhat older than 31
instrument MODs and are not (at least not by me) seen very often
anymore. Their format is identical to that of 31 instrument MODs
except:
(1) Since there are only 15 samples, the information for the last (15th)
sample starts at byte 440 and goes through byte 469.
(2) The songlength is at byte 470 (contrast with byte 950 in 31 instrument
MOD)
(3) Byte 471 appears to be ignored, but has been observed to be 127.
(Sorry, this is from observation only)
(4) Byte 472 begins the pattern sequence table (contrast with byte 952
in a 31 instrument MOD)
(5) Patterns start at byte 600 (contrast with byte 1084 in 31 instrument MOD)
"ProTracker," an Amiga MOD file creator/editor, is available for ftp
everywhere as pt??.lzh.
From: Apollo Wong <apollo@ee.ualberta.ca>
From: M.J.H.Cox@bradford.ac.uk (Mark Cox)
Newsgroups: alt.sb.programmer
Subject: Re: Format for MOD files...
Message-ID: <1992Mar18.103608.4061@bradford.ac.uk>
Date: 18 Mar 92 10:36:08 GMT
Organization: University of Bradford, UK
wdc50@DUTS.ccc.amdahl.com (Winthrop D Chan) writes:
>I'd like to know if anyone has a reference document on the format of the
>Amiga Sound/NoiseTracker (MOD) files. The author of Modplay said he was going
>to release such a document sometime last year, but he never did. If anyone
I found this one, which covers it better than I can explain it - if you
use this in conjunction with the documentation that comes with Norman
Lin's Modedit program it should pretty much cover it.
Mark J Cox
/***********************************************************************
Protracker 1.1B Song/Module Format:
-----------------------------------
Offset Bytes Description
------ ----- -----------
0 20 Songname. Remember to put trailing null bytes at the end...
Information for sample 1-31:
Offset Bytes Description
------ ----- -----------
20 22 Samplename for sample 1. Pad with null bytes.
42 2 Samplelength for sample 1. Stored as number of words.
Multiply by two to get real sample length in bytes.
44 1 Lower four bits are the finetune value, stored as a signed
four bit number. The upper four bits are not used, and
should be set to zero.
Value: Finetune:
0 0
1 +1
2 +2
3 +3
4 +4
5 +5
6 +6
7 +7
8 -8
9 -7
A -6
B -5
C -4
D -3
E -2
F -1
45 1 Volume for sample 1. Range is $00-$40, or 0-64 decimal.
46 2 Repeat point for sample 1. Stored as number of words offset
from start of sample. Multiply by two to get offset in bytes.
48 2 Repeat Length for sample 1. Stored as number of words in
loop. Multiply by two to get replen in bytes.
Information for the next 30 samples starts here. It's just like the info for
sample 1.
Offset Bytes Description
------ ----- -----------
50 30 Sample 2...
80 30 Sample 3...
.
.
.
890 30 Sample 30...
920 30 Sample 31...
Offset Bytes Description
------ ----- -----------
950 1 Songlength. Range is 1-128.
951 1 Well... this little byte here is set to 127, so that old
trackers will search through all patterns when loading.
Noisetracker uses this byte for restart, but we don't.
952 128 Song positions 0-127. Each hold a number from 0-63 that
tells the tracker what pattern to play at that position.
1080 4 The four letters "M.K." - This is something Mahoney & Kaktus
inserted when they increased the number of samples from
15 to 31. If it's not there, the module/song uses 15 samples
or the text has been removed to make the module harder to
rip. Startrekker puts "FLT4" or "FLT8" there instead.
Offset Bytes Description
------ ----- -----------
1084 1024 Data for pattern 00.
.
.
.
xxxx Number of patterns stored is equal to the highest patternnumber
in the song position table (at offset 952-1079).
Each note is stored as 4 bytes, and all four notes at each position in
the pattern are stored after each other.
00 - chan1 chan2 chan3 chan4
01 - chan1 chan2 chan3 chan4
02 - chan1 chan2 chan3 chan4
etc.
Info for each note:
_____byte 1_____ byte2_ _____byte 3_____ byte4_
/ \ / \ / \ / \
0000 0000-00000000 0000 0000-00000000
Upper four 12 bits for Lower four Effect command.
bits of sam- note period. bits of sam-
ple number. ple number.
Periodtable for Tuning 0, Normal
C-1 to B-1 : 856,808,762,720,678,640,604,570,538,508,480,453
C-2 to B-2 : 428,404,381,360,339,320,302,285,269,254,240,226
C-3 to B-3 : 214,202,190,180,170,160,151,143,135,127,120,113
To determine what note to show, scan through the table until you find
the same period as the one stored in byte 1-2. Use the index to look
up in a notenames table.
This is the data stored in a normal song. A packed song starts with the
four letters "PACK", but i don't know how the song is packed: You can
get the source code for the cruncher/decruncher from us if you need it,
but I don't understand it; I've just ripped it from another tracker...
In a module, all the samples are stored right after the patterndata.
To determine where a sample starts and stops, you use the sampleinfo
structures in the beginning of the file (from offset 20). Take a look
at the mt_init routine in the playroutine, and you'll see just how it
is done.
Lars "ZAP" Hamre/Amiga Freelancers
***********************************************************************/
--
Mark J Cox -----
Bradford, UK ---
The MOD sampling rate
---------------------
From dgc3@midway.uchicago.edu:
The standard rate is 10k exactly. Instrument files should be 10k,
signed, 8-bit raw audio. A lot of people ask how to create MOD
samples on their own machine; the answer is:
[%>] sox mysound.foo -r10000 -sb sample.sam
I quite doubt that there are any deviations here, since the sample
data is incorporated into the MOD file and cannot store its own format
header. The Amiga program MED uses a custom format for its MODs
(often called MEDs because of name similarity), and does allow any
8SVX sample of any sampling rate to be used.
David
FTP sites for MODs and MOD players
----------------------------------
Subject: MODS AND PLAYERS!! **READ** info/where to get them
From: cjohnson@tartarus.uwa.edu.au (Christopher Johnson)
Newsgroups: alt.binaries.sounds.d
Message-ID: <1h32ivINNglu@uniwa.uwa.edu.au>
Date: 21 Dec 92 00:19:43 GMT
Organization: The University of Western Australia
Hello world,
For all those asking, here is where to get those mod players and mods.
SNAKE.MCS.KENT.EDU is the best site for general stuff. look in /pub/SB-Adlib
Simtel-20 or archie.au(simtel mirror) in <msdos.sound>
for windows players ftp.cica.indiana.edu in pub/pc/win3/sound
here is a short list of players
mp or modplay BEST OVERALL mp219b.zip
simtel and snake
wowii best for vga/fast machines wowii12b.zip
simtel and snake
trakblaster best for compatability trak-something
simtel and snake two versions, old one for slow
machines
ss cute display(hifi) have_sex.arj
found on local BBS (western Australia White Ghost)
superpro player generally good ssp.zip or similar
found on night owl 7 CD
player? cute display(hifi) player.zip or similar
found on night owl 7 CD
WINDOWS
Winmod pro does protracker wmp????.zip
cica
winmod more stable winmod12.zip or similar
cica
Hope this helps, e-mail me if you find any more players and I will add them in f
or the next time mod player requests get a
little out of hand.
for mods ftp to wuarchive.wustl.edu and go to the amiga music directory (pub/ami
ga/music/ntsb ?????) that should do you for
a while
see you soon
Chris.
-----------------------------------------------------------------------
Technical Details
Message-ID:
<01H6O6D17ZHK8ZG1IP@delphi.com>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!paladin.american.edu!auvm!DELPHI.COM!PAULSENIURAShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 110568,f1264bd0ac098e71,start X-Google-Attributes: gid110568,public X-Google-ArrivalTime: 1993-12-19 14:07:58 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!paladin.american.edu!auvm!DELPHI.COM!PAULSENIURA Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU Newsgroups: bit.listserv.coco Return-Path: <@AUVM.AMERICAN.EDU:COCO@PUCC.BITNET> X-VMS-To: INTERNET"coco@pucc.princeton.edu" MIME-version: 1.0 Content-type: TEXT/PLAIN; CHARSET=US-ASCII Content-transfer-encoding: 7BIT Message-ID: <01H6O6D17ZHK8ZG1IP@delphi.com> Date: Sun, 19 Dec 1993 17:03:53 -0400 Reply-To: PAULSENIURA@DELPHI.COM Sender: COCO - Tandy Color Computer List <COCO@PUCC.BITNET> From: PAULSENIURA@DELPHI.COM Subject: Amiga .MOD file format info (10K text) Lines: 279