Copy Link
Add to Bookmark
Report
Soundtrack module file format (*.mod) for Atari Falcon 030
*******************************************************************************
* SOUNDTRACK MODULE FILE FORMAT (*.MOD) *
* by RUIZ Patrick *
*******************************************************************************
* don't hesitate to contact me if you want *
* you can send a message at this e-mail address until summer 1994 if possible *
* ruiz@massilia.univ-mrs.fr *
* *
* otherwise, there's an other solution (more conventional) *
* Mr RUIZ Patrick Quartier le clos 13360 ROQUEVAIRE FRANCE *
This text isn't full of commentary but nothing is missing!
If you notice a mistake, please tell it to me, it'll be nice.
I am doing a module player that will integrate all the effects, it'll run
on the FALCON 030. For the moment the routine I use is the best I ever heard
on every machine. It uses the 680X0 only (no DSP).
[Byte count]
[20] Song name , ASCII string
[30] Sample 1 infos
0-21= Sample name , ASCII string
22-23= Sample length , in words
24b3-b0= Default fine tune value , signed 4-bit
25= Default sample volume , (0-64)
26-27= Repeat loop start , in words
28-29= Repeat loop length , in words , 0 or 1:Stop
[30] Sample 2 infos
[30] Sample 3 infos
[30] Sample 4 infos
[30] Sample .. infos
[30] Sample 13 infos
[30] Sample 14 infos
[30] Sample 15 infos
if the module is a 31 sample module
[30] Sample 16 infos
[30] Sample 17 infos
[30] Sample 18 infos
[30] Sample .. infos
[30] Sample 29 infos
[30] Sample 30 infos
[30] Sample 31 infos
endif
[1] Song table length , (1-128)
[1] 0
[128] Song table , each pattern number on a byte
[4] Chunk 'M.K.' for 31 sample module
or also 'M!K!' 'M&K&' 'FLT4' 'FLT6' 'FLT8'
(most of time if the module don't run it's because they have put
someting else than the 'M.K.' magic number.)
[1024] Pattern 0
[16] Pattern position 0
[4] Voice 0
Played on left channel
[2]b12= 5th bit of the sample number for 31 sample module
b11-b0= Note period (113-856) , 36 notes , 3 octaves
Frequ. Note Frequ. Note Frequ. Note
113 987.8 Hz B 3 226 493.9 Hz B 2 453 246.9 Hz B 1
120 932.4 Hz A#3 240 466.2 Hz A#2 480 233.1 Hz A#1
127 880.0 Hz A 3 254 440.0 Hz A 2 508 220.0 Hz A 1
135 830.6 Hz G#3 269 415.3 Hz G#2 538 207.6 Hz G#1
143 784.0 Hz G 3 285 392.0 Hz G 2 570 196.0 Hz G 1
151 740.0 Hz F#3 302 370.0 Hz F#2 604 185.0 Hz F#1
160 698.6 Hz F 3 320 349.3 Hz F 2 640 174.6 Hz F 1
170 659.4 Hz E 3 339 329.7 Hz E 2 678 164.8 Hz E 1
180 622.4 Hz D#3 360 311.2 Hz D#2 720 155.6 Hz D#1
190 587.4 Hz D 3 381 293.7 Hz D 2 762 146.8 Hz D 1
202 554.4 Hz C#3 404 277.2 Hz C#2 808 138.6 Hz C#1
214 523.4 Hz C 3 428 261.7 Hz C 2 856 130.8 Hz C 1
In music: NextNoteFreq=NoteFreq*2^(1/12)
On Amiga: Replay frequency=(3579546 Hz)/(NotePeriod)
between 4 KHz to 32KHz for the 3 octaves
ex: for C2 , ReplayFrequency=3579546/428=8363 Hz
[1]b7-b4= Sample number 1-15 , 0:previous
b3-b0= Effect 0-15
Refreshed each 0.005 second
[1] Parameters
b7-b4= P
b3-b0= Q
Effect
0: Normal play (P=0 and Q=0)
Arpeggio (P<>0 or Q<>0)
P= 1st half-tone to add to pitch
Q= 2nd half-tone to add to pitch
1: Portamento up
PQ= Pitch increase step
2: Portamento down
PQ= Pitch decrease step
3: Tone portamento
PQ= Pitch slide step , 0: previous
4: Vibrato
P= Pitch change step , 0: previous
Q= Pitch change depth , 0: previous
5: Tone portamento + Volume slide
P= Volume increase step , in priority
Q= Volume decrease step
6: Vibrato + Volume slide
P= Volume increase step , in priority
Q= Volume decrease step
7: Tremolo
P= Volume change step , 0: previous
Q= Volume change depth , 0: previous
8: Phasor effect
PQ= Phase offset on sample
9: Set sample offset
PQ= Offset in sample /256 , 0: previous
10: Volume slide
P= Volume increase step , in priority
Q= Volume decrease step
11: Position jump
PQ= Song position (1-128)
12: Set volume
PQ= Volume (0-64)
0: Stop
1:-36.1 dB 17:-11.5 dB 33:- 5.8 dB 49:- 2.3 dB
2:-30.1 dB 18:-11.0 dB 34:- 5.5 dB 50:- 2.1 dB
3:-26.6 dB 19:-10.5 dB 35:- 5.2 dB 51:- 2.0 dB
4:-24.1 dB 20:-10.1 dB 36:- 5.0 dB 52:- 1.8 dB
5:-22.1 dB 21:- 9.7 dB 37:- 4.8 dB 53:- 1.6 dB
6:-20.6 dB 22:- 9.3 dB 38:- 4.5 dB 54:- 1.5 dB
7:-19.2 dB 23:- 8.9 dB 39:- 4.3 dB 55:- 1.3 dB
8:-18.1 dB 24:- 8.5 dB 40:- 4.1 dB 56:- 1.2 dB
9:-17.0 dB 25:- 8.2 dB 41:- 3.9 dB 57:- 1.0 dB
10:-16.1 dB 26:- 7.8 dB 42:- 3.7 dB 58:- 0.9 dB
11:-15.3 dB 27:- 7.5 dB 43:- 3.5 dB 59:- 0.7 dB
12:-14.5 dB 28:- 7.2 dB 44:- 3.3 dB 60:- 0.6 dB
13:-13.8 dB 29:- 6.9 dB 45:- 3.1 dB 61:- 0.4 dB
14:-13.2 dB 30:- 6.6 dB 46:- 2.9 dB 62:- 0.3 dB
15:-12.6 dB 31:- 6.3 dB 47:- 2.7 dB 63:- 0.1 dB
16:-12.0 dB 32:- 6.0 dB 48:- 2.5 dB 64: 0 dB
13: Pattern break
PQ= Stop the current pattern and
jump to the next song position
at pattern position P*10+Q (0-63)
14: Extend command
P= 0 Set filter
Q=0: Filter on , or LED on
Q=1: Filter off , or LED off
P= 1 Fine portamento up
Q= Value to add to pitch
P= 2 Fine portamento down
Q= Value to subtract from pitch
P= 3 Glissando control for Tone portamento
Q=0: Off , the slide is straight
Q=1: On , the slide is halftone to halftone
P= 4 Set vibrato waveform
Qb1-b0=0: Sinus , default
Qb1-b0=1: Ramp down
Qb1-b0=2: Square
Qb1-b0=3: Random
Qb2=0: Waveform has to be restarted each note
P= 5 Set fine tune
Q= Fine tune value
NewNoteFreq=NoteFreq*2^(Finetune/96)
P= 6 Jump to loop
Q<>0: Jump to loop start pattern position and
play Q times
Q=0: Set loop start pattern position
P= 7 Set tremolo waveform
Qb1-b0=0: Sinus , default
Qb1-b0=1: Ramp down
Qb1-b0=2: Square
Qb1-b0=3: Random
Qb2=0: Waveform has to be restarted each note
P= 8 Stop playing
P= 9 Retrig note
Q= Retrig note each Q*0.02 second
P=10 Fine volume slide up
Q= Value to add to volume
P=11 Fine volume slide down
Q= Value to subtract from volume
P=12 Note cut
Q= Cut note after Q*0.02 second
volume is only set to 0
P=13 Note delay
Q= Note delay
Wait Q*0.02 second before playing note
P=14 Pattern delay
Q= Pattern delay
Wait Q+1 notes for next pattern
P=15 Invert repeat loop , Funk
Q= Glissando funk
0: 0 , off 8: 16
1: 5 9: 19
2: 6 10: 22
3: 7 11: 26
4: 8 12: 32
5: 10 13: 43
6: 11 14: 64
7: 13 15: 128
Invert the sign of sample data inside
sample repeat loop ,
one byte each 0.02 second with step Q
15: Set speed
PQ=0 Stop playing
PQ=1-31 Pattern position speed , default=6 ,
one pattern position each PQ*0.02 sec.
PQ=32-255 Pattern position speed , default=125 ,
PQ pattern positions per minute
[4] Voice 1
Played on right channel
[4] Voice 2
Played on right channel
[4] Voice 3
Played on left channel
[16] Pattern position 1
[16] Pattern position 2
[16] Pattern position 3
[16] Pattern position ..
[16] Pattern position 61
[16] Pattern position 62
[16] Pattern position 63
[1024] Pattern 1
[1024] Pattern 2
[1024] Pattern 3
[1024] Pattern ...
[1024] Pattern 125
[1024] Pattern 126
[1024] Pattern 127 , number of pattern stored is equal to the highest
pattern number +1 in the song table
[X] Sample 1 data , 8 bit-PCM , ex: sampling frequency=8363 Hz for C2
[X] Sample 2 data , 8 bit-PCM
[X] Sample 3 data , 8 bit-PCM
[X] Sample .. data , 8 bit-PCM
[X] Sample 29 data , 8 bit-PCM
[X] Sample 30 data , 8 bit-PCM
[X] Sample 31 data , 8 bit-PCM