ZX Format #07
05 декабря 1997

Programmers - Mod Format files. Describe the format of the standard MOD file used in the General Sound.

<b>Programmers</b> - Mod Format files. Describe the format of the standard MOD file
used in the General Sound.
 Mod-File Format

music by MIDISOFT
(C) Stinger '& TP 1997
_


  1. Nazvanie_kompozitsii

  2. Zagolovki_instrumentov

  3. Таблица_позиций_и_информация_о_мо
   muzzle

  4. Patterns

  5. Samples


   1. Song Name

 Offset Length


   +0 20
 Track title, the maximum length
20 characters. If the name is less
than 20 characters, then the remaining part
this field will be filled with binary
zeros. The offset is relative to the beginning of the file.


   2. Headers Tool

 Here are the 1931 series title, the length of each header 30 
(# 1E) bytes, ie with respect to the file header will be offset


   the following:

   Title 1 - offset 20 (# 14)

   Title 2 - offset 50 (# 32)

   .

   Title 31 - offset 920 (# 398)

 The following are the bias offset of the header

 Offset Length


   +0 22
 Name of the instrument, the maximum length
22 characters. If the name is less
than 22 characters, then the remaining part
this field will be filled with binary
zeros.

  +22 2
 Sample length-length sample (*). Value
this field is 0 or 1 indicates a blank
sample (ie, if the sample length in bytes
less than or equal to 2, then the sample blank).
Higher value means the actual, physical sample.

  +24 1
 The lower 4 bits represent the value of setting tone 
(Finetune) for the sample. Znachenie ranges from -8 to +7.

Senior 4 bits should be ignored when reading and recording set 
in zero.

 Bytes: The values ​​set tone:


   x0 = 0

   x1 +1

   x2 +2

   x3 +3

   x4 +4

   x5 +5

   x6 +6

   x7 +7

   x8 -8

   x9 -7

   xA -6

   xB -5

   xC -4

   xD -3

   xE -2

   xF -1

 One unit of setting tone is equal to 1 / 8
semitones, ie with this option
You can omit the frequency of sound samples per
semitone or down to 7 / 8 semitones up.

  +25 1
 Volume tool by default. Value ranges from 0 to 64
(# 00 .. # 40), where 64 top volume, and 0 - minimum.

  +26 2
 Repeat offset - the beginning point of the repeat in
tool (*). This offset of the sample. This value is
meaning if the length of the repeating part
(Displacements 28) is greater than zero.

  +28 2
 Repeat length - the length of the repeating part (*). Sample 
is looped in the fact and only if considered

value greater than zero. (*) These values
measured in words and stored in a standard Amiga High-Endian 
format, therefore, for adequate interpretation of these 
quantities requires the following steps: 

 a) rearrange the older and younger halves of the word;

   b) multiply the word for two


   LD HL, (32768 20 +22); length of the first sample in the 
Amiga words 

   LD A, H; (if the module is loaded at 32,768)

   LD H, L

   LD L, A

   ADD HL, HL; now got the sample length in bytes

Sample is played as follows:
 1) If the length of the sample is less than two, then nothing 
is played;  2) further analyzed the length of the repeating 
part: if it is greater than zero, then sample is looped, and if 
equal zero, then nezatsiklennym.

 3) nezatsiklenny sample is played
simply from beginning to end, ie from Sample_start_adress to 
Sample_start_adress + Sample_Length (Sample_start_adressadres 
sample start).  4) obsessed same sample played

more difficult:
at the beginning is played by Sample_start_adress
to Sample_start_adress + Repeat_offset + Repeat_Length, and 
then to infinity by Sample_start_adress + Repeat_offset to 
Sample_start_adress + Repeat_offset + Repeat_Length. 


  3. Table of positions and information mation about the module

 Offset Length

 +950 (# 3B6) 1
 The length of the track positions (Song Positions) value 
ranges from 1 to 128

 +951 (# 3B7) 1
 The position at which the player must move at the end of 
playback module. C Using this you can loop a module. If this 
value is greater than the number of positions, the player must 
stay on After proigryvaniya module. If the module is hung up is 
not required, it is recommended to record in this field to 127. 
 +952 (# 3B8) 128  Table positions. Length of the table from 1 
to 128 (determined by the value at offset

950) Item number yavlyatsya index in
table, and value in the table on this
index is the number pattern. With
this table we can determine the number of patterns in the 
module. This requires a maximum value in the table and add to 
it one - it will be a number of patterns. 

Example:

  (950) = 6 length tracks - 6 positions.

  (+952) = 2,2,1,0,3,2,6,7

   Position 1 - Pattern 3

   Position 2 - Pattern 3

   Position 3 - Pattern 2

   Position 4 - Pattern 1

   Position 5 - pattern 4 




Other articles:

From the authors - a few words about the next issue.

Ator magazine - ZX-Format No.7

Content - short contents of the magazine ZX-Format No.7

Toys - an overview of new products: Los Angeles Drugs Bust, Jungle Warfare, Dragonia, 3D Starfighter, Rock star ate my hamster, Star Cobtrol, Malstese joe's pool challenge, Dynamite dux, Blood Brodthers, Galactic Games, Motor Masscre, International Kickboxing.

Toys - Tai-Pan: a masterpiece of classic ZX Spectrum. The game that combines the quest and the manager. Interesting story and a rather detailed description.

Toys - Operation R.R. Opening a new graphic novel from quest'u GALAXY.

Toys - Adventyury: description of the game-parody "Bored of the ring" - "sick of the Rings" can be used as a description, but can simply be read as a parody of JRR Tolkien.

Toys - 3D construction kit: a detailed description of the editor of 3D games such as Castle Master. The article describes the internal language sistemmy, which in fact, makes a set of locations and objects in a full game.

Programmers - Basic - 7: The End of the description of Beta-Basic.

Programmers - library of mathematical procedures. Series of articles for those wishing to learn how to program in assembly language.

Programmers - algorithms and examples of procedures for quick calculations on asemblere: multiplication and division of 3-byte numbers

Programmers - Mod Format files. Describe the format of the standard MOD file used in the General Sound.

Programmers - BMC 2. Esche few words about the conversion of PC-shnyh images in 3-color.

Review - An overview of the passage of the regular Demo-party ENLiGHT 1997 with photographs of some of the guests.

Review - A few moments with the exhibition of video and audio Video FAIR, held in autumn in Saint-Petersburg.

Iron - Captain Nemo invites to share technology KAY all willing to do production.

Iron - Information on a new project by Scorpion - motherboard expansion graphics and memory GMX.

Iron - An article about the audio amplifier and a price list (for those wishing to buy a ready-amp or kit assembly).

animated cartoon - Description of a new turbo-assembler from STORM X-Trade.

animated cartoon - Riff Tracker New Music Editor for General sound.

animated cartoon - Description tekstovgo editor of ZX-Winword, allowing to make graphical inserts in the text, and its utility Sprite Cutter - Cutting these insertions.

animated cartoon - Head Ball - Golovobol: Description of a new game.

Interview - interviews with participants ENLiGHT'97: Digital Reality.

Interview - interviews with participants ENLiGHT'97: Extreme.

Interview - interviews with participants ENLiGHT'97: MMA, ALK.

Interview - interviews with participants ENLiGHT'97: Flash inc.

Interview - interviews with participants ENLiGHT'97: Progress.

Interview - interviews with participants ENLiGHT'97: Felix / Softland.

Interview - interviews with participants ENLiGHT'97: Slash.

Interview - interviews with participants ENLiGHT'97: Vyacheslav Mednonogov.

It was you - Lord of the teeth - 2. Continuation of the adventures of the brave Hobbits.

It was you - Switch - A small philosophical parable.

Mail - A masterpiece. Another interesting letter - "the majority of applications and system software - complete nonsense, and Labuda!

Mail - readers' letters: Nikolai Sergeyev, Jobman, Nikolai Parfenov, Dmitry Zalissky.

Mail - free advertising and announcements.

Miscellaneous - prospects for the software. A new RPG game from Odessa Group "Oberon" - an unknown world.

Miscellaneous - prospects for the software. STATE OF THE ART: a new graphical editor for the Spectrum.

Miscellaneous - Electronic Samizdat: A few words about a new kind of software - Electronic books.

Amiga Club - A new article of the former Spektrumista Max Petrov on Amiga.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Mailbox - On the national project - PROGRESS MEGADEMO.
Wanted - List of Honored Members AC Edit.
Solution - Passwords for Game Net Walk.
Entry - On March 8, girl, network!
BBS - Schedule BBS'ok.

В этот день...   3 May