COMMON COMPATiBiLiTY
CONSTANTS
Every effect command (as shown below) consists
of two
separated bytes. The
first is effect byte and the second is info byte.
The first byte (effect_def)
is fixed, and carries the information
that points to second
"interactive" byte (effect).
If the second byte is supposed to be partially
fixed, then the info
byte carries additional
information that points to last 4 bits
of info byte that are
"interactive". If both effect and info bytes
are fixed, then such
effect is called an "extended command".
/┤DLiB TR/┤CK3R ][ uses total count of 89 effects, and 16 extended
commands. The fixed
values of effect byte and corresponding
information mapped into
hi-part (bits 7-4) and lo-part (bits 3-0)
of info byte are shown
in the following table:
┌──────────────┬─────────────┐
│ %effect_def% │
%effect% │
│ char code │ 7654···3210
│
╒══════════════════════════╪══════════════╪══════╤══════╡
│ 1 ef_Arpeggio
│ 0.. 00 │
xxxx │ yyyy │
│ 2 ef_FSlideUp
│ 1.. 01 │
xxxx │ xxxx │
│ 3 ef_FSlideDown
│ 2.. 02 │
xxxx │ xxxx │
│ 4 ef_TonePortamento
│ 3.. 03 │
xxxx │ xxxx │
│ 5 ef_Vibrato
│ 4.. 04 │
xxxx │ yyyy │
│ 6 ef_TPortamVolSlide
│ 5.. 05 │
xxxx │ yyyy │
│ 7 ef_VibratoVolSlide
│ 6.. 06 │
xxxx │ yyyy │
│ 8 ef_FSlideUpFine
│ 7.. 07 │
xxxx │ xxxx │
│ 9 ef_FSlideDownFine
│ 8.. 08 │
xxxx │ xxxx │
│ 10 ef_SetModulatorVol
│ 9.. 09 │ 00xx │ xxxx │
│ 11 ef_VolSlide
│ A.. 0a │ xxxx
│ yyyy │
│ 12 ef_PositionJump
│ B.. 0b │ 0xxx │ xxxx │
│ 13 ef_SetInsVolume
│ C.. 0c │ xxxx
│ xxxx │
│ 14 ef_PatternBreak
│ D.. 0d │ xxxx
│ xxxx │
│ 15 ef_SetTempo
│ E.. 0e │ xxxx
│ xxxx │
│ 16 ef_SetSpeed
│ F.. 0f │ xxxx
│ xxxx │
│ 17 ef_TPortamVSlideFine │
G.. 10 │ xxxx │
yyyy │
│ 18 ef_VibratoVSlideFine │
H.. 11 │ xxxx │
yyyy │
│ 19 ef_SetCarrierVol
│ I.. 12 │ 00xx │ xxxx │
│ 20 ef_SetWaveform
│ J.. 13 │ xxxx
│ yyyy │
│ 21 ef_VolSlideFine
│ K.. 14 │ xxxx
│ yyyy │
│ 22 ef_RetrigNote
│ L.. 15 │ xxxx
│ xxxx │
│ 23 ef_Tremolo
│ M.. 16 │ xxxx
│ yyyy │
│ 24 ef_Tremor
│ N.. 17 │ xxxx
│ yyyy │
│ 25 ef_ArpggVSlide
│ O.. 18 │ xxxx
│ yyyy │
│ 26 ef_ArpggVSlideFine
│ P.. 19 │ xxxx
│ yyyy │
│ 27 ef_MultiRetrigNote
│ Q.. 1a │ xxxx
│ yyyy │
│ 28 ef_FSlideUpVSlide
│ R.. 1b │ xxxx
│ yyyy │
│ 29 ef_FSlideDownVSlide │
S.. 1c │ xxxx │
yyyy │
│ 30 ef_FSlUpFineVSlide
│ T.. 1d │ xxxx
│ yyyy │
│ 31 ef_FSlDownFineVSlide │
U.. 1e │ xxxx │
yyyy │
│ 32 ef_FSlUpVSlF
│ V.. 1f │ xxxx
│ yyyy │
│ 33 ef_FSlDownVSlF
│ W.. 20 │ xxxx
│ yyyy │
│ 34 ef_FSlUpFineVSlF
│ X.. 21 │ xxxx
│ yyyy │
│ 35 ef_FSlDownFineVSlF
│ Y.. 22 │ xxxx
│ yyyy │
│ ef_Extended
│ Z.. 23 │
---- │ ---- │
│ 36 ef_ex_SetTremDepth
│ Z0. 23 │ 0000 │ 000x │
│ 37 ef_ex_SetVibDepth
│ Z1. 23 │ 0001 │ 000x │
│ 38 ef_ex_SetAttckRateM │
Z2. 23 │ 0010 │ xxxx
│
│ 39 ef_ex_SetDecayRateM │
Z3. 23 │ 0011 │ xxxx
│
│ 40 ef_ex_SetSustnLevelM │
Z4. 23 │ 0100 │ xxxx
│
│ 41 ef_ex_SetRelRateM
│ Z5. 23 │ 0101 │ xxxx │
│ 42 ef_ex_SetAttckRateC │
Z6. 23 │ 0110 │ xxxx
│
│ 43 ef_ex_SetDecayRateC │
Z7. 23 │ 0111 │ xxxx
│
│ 44 ef_ex_SetSustnLevelC │
Z8. 23 │ 1000 │ xxxx
│
│ 45 ef_ex_SetRelRateC
│ Z9. 23 │ 1001 │ xxxx │
│ 46 ef_ex_SetFeedback
│ ZA. 23 │ 1010 │ 0xxx │
│ 47 ef_ex_SetPanningPos │
ZB. 23 │ 1011 │ 000x │
│ 48 ef_ex_PatternLoop
│ ZC. 23 │ 1100 │ xxxx │
│ 49 ef_ex_PatternLoopRec │
ZD. 23 │ 1101 │ xxxx
│
│ 50 ef_ex_MacroKOffLoop │
ZE. 23 │ 1110 │ 000x │
│ ef_ex_ExtendedCmd │ ZF. 23 │ 1111 │
---- │
│∙1 ef_ex_cmd_RSS
│ ZF0 23 │
1111 │ 0000 │
│∙2 ef_ex_cmd_ResetVol
│ ZF1 23 │
1111 │ 0001 │
│∙3 ef_ex_cmd_LockVol
│ ZF2 23 │
1111 │ 0010 │
│∙4 ef_ex_cmd_UnlockVol │ ZF3 23 │
1111 │ 0011 │
│∙5 ef_ex_cmd_LockVP
│ ZF4 23 │
1111 │ 0100 │
│∙6 ef_ex_cmd_UnlockVP
│ ZF5 23 │
1111 │ 0101 │
│∙7 ef_ex_cmd_VSlide_mod
│ ZF6 23 │
1111 │ 0110 │
│∙8 ef_ex_cmd_VSlide_car
│ ZF7 23 │
1111 │ 0111 │
│∙9 ef_ex_cmd_VSlide_def
│ ZF8 23 │
1111 │ 1000 │
│∙10 ef_ex_cmd_LockPan
│ ZF9 23 │ 1111 │ 1001 │
│∙11 ef_ex_cmd_UnlockPan │
ZFA 23 │ 1111 │ 1010 │
│∙12 ef_ex_cmd_VibrOff
│ ZFB 23 │ 1111 │ 1011 │
│∙13 ef_ex_cmd_TremOff
│ ZFC 23 │ 1111 │ 1100 │
│∙14 ef_ex_cmd_FVib_FGFS │ ZFD
23 │ 1111 │ 1101 │
│∙15 ef_ex_cmd_FTrm_XFGFS │
ZFE 23 │ 1111 │ 1110 │
│∙16 ef_ex_cmd_NoRestart │
ZFF 23 │ 1111 │ 1111 │
│ ef_Extended2
│ &.. 24
│ ---- │ ---- │
│ 51 ef_ex2_PatDelayFrame
│ &0. 24 │ 0000 │ xxxx │
│ 52 ef_ex2_PatDelayRow
│ &1. 24 │ 0001 │ xxxx │
│ 53 ef_ex2_NoteDelay
│ &2. 24 │ 0010 │ xxxx │
│ 54 ef_ex2_NoteCut
│ &3. 24 │ 0011 │ xxxx │
│ 55 ef_ex2_FineTuneUp
│ &4. 24 │ 0100 │ xxxx │
│ 56 ef_ex2_FineTuneDown
│ &5. 24 │ 0101 │ xxxx │
│ 57 ef_ex2_GlVolSlideUp
│ &6. 24 │ 0110 │ xxxx │
│ 58 ef_ex2_GlVolSlideDn
│ &7. 24 │ 0111 │ xxxx │
│ 59 ef_ex2_GlVolSlideUpF
│ &8. 24 │ 1000 │ xxxx │
│ 60 ef_ex2_GlVolSlideDnF
│ &9. 24 │ 1001 │ xxxx │
│ 61 ef_ex2_GlVolSldUpXF
│ &A. 24 │ 1010 │ xxxx │
│ 62 ef_ex2_GlVolSldDnXF
│ &B. 24 │ 1011 │ xxxx │
│ 63 ef_ex2_VolSlideUpXF
│ &C. 24 │ 1100 │ xxxx │
│ 64 ef_ex2_VolSlideDnXF
│ &D. 24 │ 1101 │ xxxx │
│ 65 ef_ex2_FreqSlideUpXF
│ &E. 24 │ 1110 │ xxxx │
│ 66 ef_ex2_FreqSlideDnXF
│ &F. 24 │ 1111 │ xxxx │
│ 67 ef_SetGlobalVolume
│ %.. 25 │ 0xxx │ xxxx │
│ 68 ef_SwapArpeggio
│ !.. 26 │ xxxx
│ xxxx │
│ 69 ef_SwapVibrato
│ @.. 27 │ xxxx
│ xxxx │
│ 70 ef_ForceInsVolume
│ =.. 28 │ 0xxx │ xxxx │
│
ef_Extended3 │ #.. 29 │ ---- │
---- │
│ 71 ef_ex3_SetConnection
│ #0. 29 │ 0000 │ 000x │
│ 72 ef_ex3_SetMultipM
│ #1. 29 │ 0001 │ xxxx │
│ 73 ef_ex3_SetKslM
│ #2. 29 │ 0010 │ 00xx │
│ 74 ef_ex3_SetTremoloM
│ #3. 29 │ 0011 │ 000x │
│ 75 ef_ex3_SetVibratoM
│ #4. 29 │ 0100 │ 000x │
│ 76 ef_ex3_SetKsrM
│ #5. 29 │ 0101 │ 000x │
│ 77 ef_ex3_SetSustainM
│ #6. 29 │ 0110 │ 000x │
│ 78 ef_ex3_SetMultipC
│ #7. 29 │ 0111 │ xxxx │
│ 79 ef_ex3_SetKslC
│ #8. 29 │ 1000 │ 00xx │
│ 80 ef_ex3_SetTremoloC
│ #9. 29 │ 1001 │ 000x │
│ 81 ef_ex3_SetVibratoC
│ #A. 29 │ 1010 │ 000x │
│ 82 ef_ex3_SetKsrC
│ #B. 29 │ 1011 │ 000x │
│ 83 ef_ex3_SetSustainC
│ #C. 29 │ 1100 │ 000x │
│ 84 ef_ExtraFineArpeggio │
$.. 2a │ xxxx │
yyyy │
│ 85 ef_ExtraFineVibrato │
~.. 2b │ xxxx │
yyyy │
│ 86 ef_ExtraFineTremolo │
^.. 2c │ xxxx │
yyyy │
│ 87 ef_SetCustomSpeedTab │
`.. 2d │ xxxx │
xxxx │
│ 88 ef_GlobalFSlideUp │ >..
2e │ xxxx
│ xxxx │
│ 89 ef_GlobalFSlideDown │ <..
2f │ xxxx
│ xxxx │
└──────────────────────────┴──────────────┴──────┴──────┘
┌───┐
octave (pitch)
frequency start (hex) =│156│ ->
┌───┐
└───┘
-> frequency end
(hex) =│2ae│
└───┘
predetermined
C8253 operating frequency
┌───────┐
for iRQ
timing calls =│1193180│
└───────┘
DEFAULT
┌──────────────────────────────────────────────────────────────────┐
=│
0, 24, 49, 74, 97,120,141,161,180,197,212,224,235,244,250,253, │
│ 255,253,250,244,235,224,212,197,180,161,141,120,
97, 74, 49, 24 │
└──────────────────────────────────────────────────────────────────┘
CUSTOM MAXiMUM VALUE (example: 7Fh)
┌──────────────────────────────────────────────────────────────────┐
=│
0, 8, 16, 24, 32, 40, 48, 56, 64,
71, 79, 87, 95,103,111,119, │
│ 127,119,111,103, 95, 87, 79, 71, 64,
56, 48, 40, 32, 24, 16, 8 │
└──────────────────────────────────────────────────────────────────┘
CUSTOM TABLE SiZE (32)
┌──────────────────────────────────────────────────────────────────┐
=│
0, 15, 31, 47, 63, 79, 95,111,127,143,159,175,191,207,223,239, │
│
255,239,223,207,191,175,159,143,127,111, 95, 79, 63, 47, 31, 15 │
└──────────────────────────────────────────────────────────────────┘
CUSTOM TABLE SiZE (64)
┌──────────────────────────────────────────────────────────────────┐
=│
0, 7, 15, 23, 31, 39, 47, 55, 63,
71, 79, 87, 95,103,111,119, │
│
127,135,143,151,159,167,175,183,191,199,207,215,223,231,239,247, │
│
255,247,239,231,223,215,207,199,191,183,175,167,159,151,143,135, │
│ 127,119,111,103, 95, 87, 79, 71, 63,
55, 47, 39, 31, 23, 15, 7 │
└──────────────────────────────────────────────────────────────────┘
CUSTOM TABLE SiZE (128)
┌──────────────────────────────────────────────────────────────────┐
=│
0, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47,
51, 55, 59, │
│
63, 67, 71, 75, 79, 83, 87, 91, 95, 99,103,107,111,115,119,123, │
│
127,131,135,139,143,147,151,155,159,163,167,171,175,179,183,187, │
│ 191,195,199,203,207,211,215,219,223,227,231,235,239,243,247,251,
│
│
255,251,247,243,239,235,231,227,223,219,215,211,207,203,199,195, │
│
191,187,183,179,175,171,167,163,159,155,151,147,143,139,135,131, │
│ 127,123,119,115,111,107,103, 99, 95,
91, 87, 83, 79, 75, 71, 67, │
│
63, 59, 55, 51, 47, 43, 39, 35, 31, 27, 23, 19, 15, 11, 7,
3 │
└──────────────────────────────────────────────────────────────────┘
CUSTOM TABLE SiZE (256)
┌──────────────────────────────────────────────────────────────────┐
=│
0, 1, 3,
5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, │
│
31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, │
│
63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, │
│
95, 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125, │
│
127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157, │
│
159,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189, │
│
191,193,195,197,199,201,203,205,207,209,211,213,215,217,219,221, │
│
223,225,227,229,231,233,235,237,239,241,243,235,247,249,251,253, │
│
255,253,251,249,247,245,243,241,239,237,235,233,231,229,227,225, │
│
223,221,219,217,215,213,211,209,207,205,203,201,199,197,195,193, │
│
191,189,187,185,183,181,179,177,175,173,171,169,167,165,163,161, │
│ 159,157,155,153,151,149,147,145,143,141,139,137,135,133,131,129,
│
│
127,125,123,121,119,117,115,113,111,109,107,105,103,101, 99, 97, │
│
95, 93, 91, 89, 87, 85, 83, 81, 79, 77, 75, 73, 71, 69, 67, 65, │
│
63, 61, 59, 57, 55, 53, 51, 49, 47, 45, 43, 41, 39, 37, 35, 33, │
│
31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9,
7, 5, 3,
1 │
└──────────────────────────────────────────────────────────────────┘
All
data files that are in use of /┤DLiB TR/┤CK3R ][ are roughly
composed of
2 parts. The first part (header) contains file authenticity
information like ID
string, CRC, format version, and is ended
with one or more values
signifying the length of next (compressed) part.
You can distinguish the type of compression algorithm
(FFver 1-8)
from file format
version: 1/5=SixPack, 2/6=LZW, 3/7=LZSS and 4/8=none.
Since /┤DLiB TR/┤CK3R ][ revision 31, all data files
A2M,A2T,A2P,A2i,A2B,A2W,A2F) are compressed using Jibz's
aPLib
compression library.
Let's take a look on each of these file types.
┌──────────────────────────────────────────────┐
│
FiLE FORMAT VERSiON
SUMMARY │
├─────┬──────┬─────────────────────────────────┤
│ EXT.│ VER. │ DESCRiPTiON
│
├─────┼──────┼─────────────────────────────────┤
│ a2m │ 1-11 │
module
│
│ a2t │ 1-11 │ tiny
module
│
│ a2p │ 1-10 │
pattern
│
│ a2i │ 1-9 │
instrument
│
│ a2b │ 1-9 │
instrument bank
│
│ a2w │ 1-2 │
instrument bank w/ macros │
│ a2f │ 1 │
instrument w/ FM-register macro │
└─────┴──────┴─────────────────────────────────┘
Offset Length Type
000000 10
(char) ID string '_a2module_'
00000a
4 (dword) 32-bit
cyclic redundancy check value
00000e
1 (byte) file format version
00000f
1 (byte) number of patterns {#pat}
000010
2 (word) length of data block 0 {%0}
000012
2 (word) ...
... ... 1 {%1}
000014
2 (word)
... ... ... 2 {%2}
000016
2 (word)
... ... ... 3 {%3}
000018
2 (word)
... ... ... 4 {%4}
00001a %0 (byte) data block 0 (songdata)
+ %0
%1 (byte) data block 1 (patterns) 00-0f ┐
+ %1
%2 (byte) data block 2
... 10-1f ├ corresponds
+ %2
%3 (byte) data block 3
... 20-2f │ with #pat
+ %3
%4 (byte) data block 4
... 30-3f ┘
--EOF-
structure of data block
0 (songdata) after decompression:
Offset Length Type
000000 43
(string) songname [42 characters]
00002b
43 (string) composer [...]
000056 250*33 (string) table of 250
instrument names [32 chars each]
002090 250*13
(byte) table of 250 instrument specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte)
KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
13 bytes ┤
000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) miscellaneous (unused)
└ 00000c (byte) fine-tune (signed)
002d42 128
(byte) pattern order table (order entries 00-7f)
002dc2
1 (byte) initial tempo
002dc3
1 (byte) initial speed
structure of data block
1-4 (patterns) after decompression:
Offset Length Type
000000 64*9*4 (byte)
pattern [block_number-1]*16+0
│
│
line ─┘
└ channel Offset Type
0-63 1-9
┌ 000000 (byte) note [0-96] [255 is Key-Off]
4 bytes ┤ 000001 (byte) instrument [0-250]
│ 000002 (byte) effect command [0-15]
└ 000003 (byte) effect data
000900 64*9*4 (byte)
pattern [block_number-1]*16+1
.
... ...
... ...
.
... ...
... ...
.
... ...
... ...
008700 64*9*4 (byte)
pattern [block_number-1]*16+15
000010
2 (word) length of data block 0 {%0}
000012
2 (word)
... ... ... 1 {%1}
000014
2 (word)
... ... ... 2 {%2}
000016
2 (word)
... ... ... 3 {%3}
000018
2 (word)
... ... ... 4 {%4}
00001a
2 (word)
... ... ... 5 {%5}
00001c
2 (word)
... ... ... 6 {%6}
00001e
2 (word)
... ... ... 7 {%7}
000020
2 (word)
... ... ... 8 {%8}
000022 %0 (byte) data block 0 (songdata)
+ %0
%1 (byte) data block 1 (patterns) 00-07 ┐
+ %1
%2 (byte) data block 2
... 08-0f │
+ %2
%3 (byte) data block 3
... 10-17 │
+ %3
%4 (byte) data block 4
... 18-1f ├ corresponds
+ %4
%5 (byte) data block 5
... 20-27 │ with #pat
+ %5
%6 (byte) data block 6
... 28-2f │
+ %6
%7 (byte) data block 7
... 30-37 │
+ %7
%8 (byte) data block 8
... 38-3f ┘
--EOF-
structure of data block
0 (songdata) after decompression:
Offset Length Type
000000 43
(string) songname [42 characters]
00002b
43 (string) composer [...]
000056 250*33 (string) table of 250
instrument names [32 chars each]
002090 250*13
(byte) table of 250 instrument specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
13 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
└ 00000c (byte) fine-tune (signed)
002d42 128
(byte) pattern order table (order entries 00-7f)
002dc2
1 (byte) initial tempo
002dc3
1 (byte) initial speed
002dc4
1 (byte) flags
structure of 'flags'
byte:
┌─────┬────────────────────┐
│ BiT │ SWiTCH
│
├─────┼────────────────────┤
│ 0 │
update speed │
│ 1 │
track volume lock │
│ 2 │
volume peak lock │
│ 3 │
tremolo depth │
│ 4 │
vibrato depth │
│ 5 │
track panning lock │
│ 6 │
%unused% │
│ 7 │
%unused% │
└─────┴────────────────────┘
structure of data block
1-8 (patterns) after decompression:
Offset Length Type
000000 18*64*4 (byte)
pattern [block_number-1]*8+0
│
│
channel ┘ └
line Offset Type
1-18
0-63
┌ 000000 (byte) note [0-96] [255 is Key-Off]
4 bytes ┤ 000001 (byte) instrument [0-250]
│ 000002 (byte) effect command [0-35]
└ 000003 (byte) effect data
001200 18*64*4 (byte)
pattern [block_number-1]*8+1
.
... ...
... ...
.
... ...
... ...
.
... ...
... ...
007e00 18*64*4 (byte)
pattern [block_number-1]*8+7
000010
4 (dword) length
of data block 0 {%0}
000014
4 (dword)
... ... ... 1 {%1}
000018
4 (dword)
... ... ... 2 {%2}
00001c
4 (dword)
... ... ... 3 {%3}
000020
4 (dword)
... ... ... 4 {%4}
000024
4 (dword)
... ... ... 5 {%5}
000028
4 (dword)
... ... ... 6 {%6}
00002c
4 (dword)
... ... ... 7 {%7}
000030
4 (dword)
... ... ... 8 {%8}
000034
4 (dword)
... ... ... 9 {%9}
000038
4 (dword)
... ... ... 10 {%10}
00003c
4 (dword)
... ... ... 11 {%11}
000040
4 (dword)
... ... ... 12 {%12}
000044
4 (dword)
... ... ... 13 {%13}
000048
4 (dword)
... ... ... 14 {%14}
00004c
4 (dword)
... ... ... 15 {%15}
000050
4 (dword)
... ... ... 16 {%16}
000054 %0 (byte) data block 0 (songdata)
+ %0
%1 (byte) data block 1 (patterns) 00-07 ┐
+ %1
%2 (byte) data block 2
... 08-0f │
+ %2
%3 (byte) data block 3
... 10-17 │
+ %3
%4 (byte) data block 4
... 18-1f │
+ %4
%5 (byte) data block 5
... 20-27 │
+ %5
%6 (byte) data block 6
... 28-2f │
+ %6
%7 (byte) data block 7
... 30-37 │
+ %7
%8 (byte) data block 8
... 38-3f ├ corresponds
+ %8
%9 (byte) data block 9
... 40-47 │ with #pat
+ %9
%10 (byte) data block 10
... 48-4f │
+ %10 %11
(byte) data block 11 ... 50-57 │
+ %11 %12
(byte) data block 12 ... 58-5f │
+ %12 %13
(byte) data block 13 ... 60-67 │
+ %13 %14
(byte) data block 14 ... 68-6f │
+ %14 %15
(byte) data block 15 ... 70-77 │
+ %15 %16
(byte) data block 16 ... 78-7f ┘
--EOF-
structure of data block
0 (songdata) after decompression:
Offset Length Type
000000 43
(string) songname [42 characters]
00002b
43 (string) composer [...]
000056 255*33 (string) table of 255
instrument names [32 chars each]
002135 255*14
(byte) table of 255 instrument specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
14 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
│ 00000c (byte) fine-tune (signed)
└ 00000d (byte) voice type:
┌─────┬─────────────────────────────┐
│ 0 │
melodic
│
│ 1-5 │ percussion (BD,SD,TT,TC,HH) │
└─────┴─────────────────────────────┘
002f27 255*3831 (???)
table of 255 instrument macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) loop begin position
000002 1 (byte) loop length
000003 1 (byte) key-off position
000004 1 (byte) arpeggio macro-table number
000005 1 (byte) vibrato macro-table number
000006 255*15 (???) fm-register
definitions:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte) ...
(carrier)
15 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (word) frequency slide (signed)
│ 00000d (byte) panning (0=C,1=L,2=R)
└ 00000e (byte) duration
0f1730 255*521 (byte)
table of 255 arpeggio/vibrato macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) speed
000002 1 (byte) loop begin position
000003 1 (byte) loop length
000004 1 (byte) key-off position
000005 255 (byte) table of 255
arpeggio definitions:
┌────────────┬─────────────────────────────┐
│ 0 │ default
note
│
│ 1-96 │ number of half-tones
to add │
│ 1-97[+80h] │
fixed-note
│
└────────────┴─────────────────────────────┘
000104 1 (byte) length
000105 1 (byte) speed
000106 1 (byte) delay
000107 1 (byte) loop begin position
000108 1 (byte) loop length
000109 1 (byte) key-off position
00010a 255 (byte) table of 255 vibrato
definitions:
┌─────────┬─────────────────────────────────┐
│ 0 │ default
frequency
│
│ -7F..7F │ frequency units to add
(signed) │
└─────────┴─────────────────────────────────┘
111e27 128
(byte) pattern order table (order entries 00-7f)
111ea7
1 (byte) initial tempo
111ea8
1 (byte) initial speed
111ea9
1 (byte) flags
111eaa
2 (word) pattern length
111eac
1 (byte) number of tracks
111ead
2 (word) macro speed-up factor
structure of 'flags'
byte:
┌─────┬────────────────────────────┐
│ BiT │ SWiTCH
│
├─────┼────────────────────────────┤
│ 0 │
update
speed
│
│ 1 │
track volume lock │
│ 2 │
volume peak lock │
│ 3 │
tremolo
depth
│
│ 4 │
vibrato
depth
│
│ 5 │
track panning lock │
│ 6 │
percussion track extension │
│ 7 │
volume
scaling
│
└─────┴────────────────────────────┘
structure of data block
1-16 (patterns) after decompression:
Offset Length Type
000000 20*256*6 (byte) pattern
[block_number-1]*8+0
│
│
channel ┘ └
line Offset Type
1-20
0-255
┌ 000000 (byte) note [0-96; +90h=fixed; 255=Key-Off]
│ 000001 (byte) instrument [0-255]
6 bytes ┤ 000002 (byte) 1st effect command
[0-39]
│ 000003 (byte) 1st effect data
│ 000004 (byte) 2nd effect command [0-39]
└ 000005 (byte) 2nd effect data
007800 20*256*6 (byte) pattern
[block_number-1]*8+1
.
... ...
... ...
.
... ...
... ...
.
... ...
... ...
070800 20*256*6 (byte) pattern
[block_number-1]*8+7
000010
4 (dword) length
of data block 0 {%0}
000014
4 (dword)
... ... ... 1 {%1}
000018
4 (dword)
... ... ... 2 {%2}
00001c
4 (dword)
... ... ... 3 {%3}
000020
4 (dword)
... ... ... 4 {%4}
000024
4 (dword)
... ... ... 5 {%5}
000028
4 (dword)
... ... ... 6 {%6}
00002c
4 (dword)
... ... ... 7 {%7}
000030
4 (dword)
... ... ... 8 {%8}
000034
4 (dword)
... ... ... 9 {%9}
000038
4 (dword)
... ... ... 10 {%10}
00003c
4 (dword)
... ... ... 11 {%11}
000040
4 (dword)
... ... ... 12 {%12}
000044
4 (dword)
... ... ... 13 {%13}
000048
4 (dword)
... ... ... 14 {%14}
00004c
4 (dword)
... ... ... 15 {%15}
000050
4 (dword)
... ... ... 16 {%16}
000054 %0 (byte) data block 0 (songdata)
+ %0
%1 (byte) data block 1 (patterns) 00-07 ┐
+ %1
%2 (byte) data block 2
... 08-0f │
+ %2
%3 (byte) data block 3
... 10-17 │
+ %3
%4 (byte) data block 4
... 18-1f │
+ %4
%5 (byte) data block 5
... 20-27 │
+ %5
%6 (byte) data block 6
... 28-2f │
+ %6
%7 (byte) data block 7
... 30-37 │
+ %7
%8 (byte) data block 8
... 38-3f ├ corresponds
+ %8
%9 (byte) data block 9
... 40-47 │ with #pat
+ %9
%10 (byte) data block 10
... 48-4f │
+ %10 %11
(byte) data block 11 ... 50-57 │
+ %11 %12
(byte) data block 12 ... 58-5f │
+ %12 %13
(byte) data block 13 ... 60-67 │
+ %13 %14
(byte) data block 14 ... 68-6f │
+ %14 %15
(byte) data block 15 ... 70-77 │
+ %15 %16
(byte) data block 16 ... 78-7f ┘
--EOF-
structure of data block
0 (songdata) after decompression:
Offset Length Type
000000 43
(string) songname [42 characters]
00002b
43 (string) composer [...]
000056 255*43 (string) table of 255
instrument names [42 chars each]
002b2b 255*14 (byte)
table of 255 instrument specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
14 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte) ...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│
00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
│ 00000c (byte) fine-tune (signed)
└ 00000d (byte) voice type:
┌─────┬─────────────────────────────┐
│ 0 │
melodic
│
│ 1-5 │ percussion (BD,SD,TT,TC,HH) │
└─────┴─────────────────────────────┘
00391d 255*3831 (???)
table of 255 instrument macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) loop begin position
000002
1 (byte) loop length
000003 1 (byte) key-off position
000004 1 (byte) arpeggio macro-table number
000005 1 (byte) vibrato macro-table number
000006 255*15 (???) fm-register
definitions:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte)
KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
15 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (word) frequency slide (signed)
│ 00000d (byte) panning (0=C,1=L,2=R)
└ 00000e (byte) duration
0f2126 255*521 (byte)
table of 255 arpeggio/vibrato macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) speed
000002 1 (byte) loop begin position
000003 1 (byte) loop length
000004 1 (byte) key-off position
000005 255 (byte) table of 255
arpeggio definitions:
┌────────────┬─────────────────────────────┐
│ 0 │ default
note
│
│ 1-96 │ number of half-tones
to add │
│ 1-97[+80h] │
fixed-note
│
└────────────┴─────────────────────────────┘
000104 1
(byte) length
000105
1 (byte) speed
000106 1 (byte) delay
000107 1 (byte) loop begin position
000108 1 (byte) loop length
000109 1 (byte) key-off position
00010a 255 (byte) table of 255 vibrato
definitions:
┌─────────┬─────────────────────────────────┐
│ 0 │ default
frequency
│
│ -7F..7F │ frequency units to add
(signed) │
└─────────┴─────────────────────────────────┘
11281d 128
(byte) pattern order table (order entries 00-7f)
11289d
1 (byte) initial tempo
11289e
1 (byte) initial speed
11289f
1 (byte) flags
1128a0
2 (word) pattern length
1128a2
1 (byte) number of tracks
1128a3
2 (word) macro speed-up factor
1128a5
1 (byte) 4-op track extension flags
1128a6 20
(byte) initial lock flags for 20 tracks
structure of 'flags'
byte:
┌─────┬────────────────────────────┐
│ BiT │ SWiTCH
│
├─────┼────────────────────────────┤
│ 0 │
update
speed
│
│ 1 │
track volume lock │
│ 2 │
volume peak lock │
│ 3 │
tremolo
depth
│
│ 4 │
vibrato
depth
│
│ 5 │
track panning lock │
│ 6 │
percussion track extension │
│ 7 │
volume
scaling
│
└─────┴────────────────────────────┘
structure of '4-op
track extension flags' byte:
┌─────┬──────────────┐
│ BiT │ SWiTCH │
├─────┼──────────────┤
│ 0 │
tracks 1,2 │
│ 1 │
tracks 3,4 │
│ 2 │
tracks 5,6 │
│ 3 │
tracks 10,11 │
│ 4 │
tracks 12,13 │
│ 5 │
tracks 14,15 │
│ 6 │
%unused% │
│ 7 │
%unused% │
└─────┴──────────────┘
structure of 'initial
lock flags' byte:
┌─────┬──────────────────────────────────┐
│ BiT │ SWiTCH
│
├─────┼──────────────────────────────────┤
│ 0─┐│
panning
position:
│
│ 1─┘│
0=center, 1=left, 2=right │
│ 2─┐│
volume slide
type:
│
│ 3─┘│
0=def, 1=car, 2=mod, 3=car w/mod │
│ 4 │
volume lock
state
│
│ 5 │
peak lock
state
│
│ 6 │
%unused%
│
│ 7 │
%unused%
│
└─────┴──────────────────────────────────┘
structure of data block
1-16 (patterns) after decompression:
Offset Length Type
000000 20*256*6 (byte) pattern
[block_number-1]*8+0
│
│
channel ┘ └
line Offset Type
1-20
0-255
┌ 000000 (byte) note [0-96; +90h=fixed; 255=KO]
│ 000001 (byte) instrument [0-255]
6 bytes ┤ 000002 (byte) 1st effect command
[0-39]
│ 000003 (byte) 1st effect data
│ 000004 (byte) 2nd effect command [0-39]
└ 000005 (byte) 2nd effect data
007800 20*256*6 (byte) pattern
[block_number-1]*8+1
.
... ...
... ...
.
... ...
... ...
.
... ...
... ...
070800 20*256*6 (byte) pattern
[block_number-1]*8+7
000010
4 (dword) length
of data block 0 {%0}
000014
4 (dword)
... ... ... 1 {%1}
000018
4 (dword)
... ... ... 2 {%2}
00001c
4 (dword)
... ... ... 3 {%3}
000020
4 (dword)
... ... ... 4 {%4}
000024
4 (dword)
... ... ... 5 {%5}
000028
4 (dword)
... ... ... 6 {%6}
00002c
4 (dword)
... ... ... 7 {%7}
000030
4 (dword)
... ... ... 8 {%8}
000034
4 (dword)
... ... ... 9 {%9}
000038
4 (dword)
... ... ... 10 {%10}
00003c
4 (dword)
... ... ... 11 {%11}
000040
4 (dword)
... ... ... 12 {%12}
000044
4 (dword) ... ... ...
13 {%13}
000048
4 (dword)
... ... ... 14 {%14}
00004c
4 (dword)
... ... ... 15 {%15}
000050
4 (dword)
... ... ... 16 {%16}
000054 %0 (byte) data block 0 (songdata)
+ %0
%1 (byte) data block 1 (patterns) 00-07 ┐
+ %1
%2 (byte) data block 2
... 08-0f │
+ %2
%3 (byte) data block 3
... 10-17 │
+ %3
%4 (byte) data block 4
... 18-1f │
+ %4
%5 (byte) data block 5
... 20-27 │
+ %5
%6 (byte) data block 6
... 28-2f │
+ %6
%7 (byte) data block 7
... 30-37 │
+ %7
%8 (byte) data block 8
... 38-3f ├ corresponds
+ %8
%9 (byte) data block 9
... 40-47 │ with #pat
+ %9
%10 (byte) data block 10
... 48-4f │
+ %10 %11 (byte)
data block 11 ... 50-57 │
+ %11 %12
(byte) data block 12 ... 58-5f │
+ %12 %13
(byte) data block 13 ... 60-67 │
+ %13 %14
(byte) data block 14 ... 68-6f │
+ %14 %15
(byte) data block 15 ... 70-77 │
+ %15 %16
(byte) data block 16 ... 78-7f ┘
--EOF-
structure of data block
0 (songdata) after decompression:
Offset Length Type
000000 43
(string) songname [42 characters]
00002b
43 (string) composer [...]
000056 255*43 (string) table of 255
instrument names [42 chars each]
002b2b 255*14 (byte)
table of 255 instrument specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte)
KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
14 bytes ┤
000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
│ 00000c (byte) fine-tune (signed)
└ 00000d (byte) voice type:
┌─────┬─────────────────────────────┐
│ 0 │
melodic
│
│ 1-5 │ percussion (BD,SD,TT,TC,HH) │
└─────┴─────────────────────────────┘
00391d 255*3831 (???)
table of 255 instrument macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) loop begin position
000002 1 (byte) loop length
000003 1 (byte) key-off position
000004
1 (byte) arpeggio macro-table number
000005 1 (byte) vibrato macro-table number
000006 255*15 (???) fm-register
definitions:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
15 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte) ...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│
000009 (byte)
...
(carrier)
bit 7:
retrigger flag >│ 00000a (byte) Feedback/FM
│ 00000b (word) frequency slide (signed)
│ 00000d (byte) panning (0=C,1=L,2=R)
└
00000e (byte) duration
0f2126 255*521 (byte)
table of 255 arpeggio/vibrato macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) speed
000002 1 (byte) loop begin position
000003 1 (byte) loop length
000004 1 (byte) key-off position
000005 255 (byte) table of 255 arpeggio
definitions:
┌────────────┬─────────────────────────────┐
│ 0 │ default
note
│
│ 1-96 │ number of half-tones
to add │
│ 1-97[+80h] │
fixed-note
│
└────────────┴─────────────────────────────┘
000104 1 (byte) length
000105 1 (byte) speed
000106 1 (byte) delay
000107
1 (byte) loop begin position
000108 1 (byte) loop length
000109 1 (byte) key-off position
00010a 255 (byte) table of 255 vibrato
definitions:
┌─────────┬─────────────────────────────────┐
│ 0 │ default
frequency
│
│ -7F..7F │ frequency units to add
(signed) │
└─────────┴─────────────────────────────────┘
11281d 128 (byte)
pattern order table (order entries 00-7f)
11289d
1 (byte) initial tempo
11289e
1 (byte) initial speed
11289f
1 (byte) flags
1128a0
2 (word) pattern length
1128a2
1 (byte) number of tracks
1128a3 2
(word) macro speed-up factor
1128a5
1 (byte) 4-op track extension flags
1128a6 20
(byte) initial lock flags for 20 tracks
1128ba 128*43 (string) table of 128
pattern names [42 char each]
113e3a 255*28 (byte) table
of 255 disabled fm-register columns:
Offset
Length Type
000000 1 (byte) attack
rate ┐
000001 1 (byte) decay
rate │
000002 1 (byte) sustain
level │
000003 1 (byte) release
rate │
000004 1 (byte) waveform
type │
000005 1 (byte) output
level ├ modulator
000006 1 (byte) key scaling level │
000007 1 (byte)
multiplier │
000008 1 (byte) tremolo
│
000009 1 (byte)
vibrato │
00000a 1
(byte) key scale rate │
00000b 1 (byte)
sustain ┘
00000c 1 (byte) attack
rate ┐
00000d 1 (byte) decay
rate │
00000e 1 (byte) sustain
level │
00000f 1 (byte) release
rate │
000010 1 (byte) waveform
type │
000011 1 (byte) output
level ├ carrier
000012 1 (byte) key scaling level │
000013 1 (byte)
multiplier │
000014 1 (byte)
tremolo │
000015 1 (byte)
vibrato │
000016 1 (byte) key scale rate │
000017 1 (byte)
sustain ┘
000018
1 (byte) connection type
000019
1 (byte) feedback
00001a 1 (byte) frequency slide
00001b 1 (byte) panning
Offset Length Type
000000 15
(char) ID string '_a2tiny_module_'
00000f 4
(dword) 32-bit
cyclic redundancy check value
000013
1 (byte) file format version
000014
1 (byte) number of patterns {#pat}
000015
1 (byte) initial tempo
000016
1 (byte) initial speed
000017
2 (word) length of data block 0 {%0}
000019
2 (word)
... ... ... 1 {%1}
00001b
2 (word)
... ... ... 2 {%2}
00001d
2 (word)
... ... ... 3 {%3}
00001e
2 (word)
... ... ... 4 {%4}
000021
2 (word)
... ... ... 5 {%5}
000023 %0 (byte) data block 0 (instruments)
+ %0
%1 (byte) data block 1 (pattern order)
+ %1
%2 (byte) data block 2 (patterns) 00-0f ┐
+ %2
%3 (byte) data block 3
... 10-1f ├ corresponds
+ %3
%4 (byte) data block 4
... 20-2f │ with #pat
+ %4
%5 (byte) data block 5
... 30-3f ┘
--EOF-
structure of data block
0 (instruments) after decompression:
Offset Length Type
000000 ???*13
(byte) table of ??? instrument
specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
13 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) miscellaneous (unused)
└ 00000c (byte) fine-tune (signed)
structure of data block
1 (pattern order) after decompression:
Offset Length Type
000000 128
(byte) pattern order table (order entries 00-7f)
structure of data block
2-5 (patterns) after decompression:
Offset Length Type
000000 64*9*4 (byte)
pattern [block_number-2]*16+0
│
│
line ─┘
└ channel Offset Type
0-63 1-9
┌ 000000 (byte) note [0-96] [255 is Key-Off]
4 bytes ┤ 000001 (byte) instrument [0-250]
│ 000002 (byte) effect command [0-15]
└ 000003 (byte) effect data
000900 64*9*4 (byte)
pattern [block_number-2]*16+1
.
... ...
... ...
. ...
...
... ...
.
... ...
... ...
008700 64*9*4 (byte)
pattern [block_number-2]*16+15
000017
1 (byte) flags
000018
2 (word) length of data block 0 {%0}
00001a
2 (word)
... ... ... 1 {%1}
00001c
2 (word)
... ... ... 2 {%2}
00001e
2 (word)
... ... ... 3 {%3}
000020
2 (word)
... ... ... 4 {%4}
000022
2 (word)
... ... ... 5 {%5}
000024
2 (word)
... ... ... 6 {%6}
000026
2 (word)
... ... ... 7 {%7}
000028
2 (word)
... ... ... 8 {%8}
00002a
2 (word)
... ... ... 9 {%9}
00002c %0 (byte) data block 0 (instruments)
+ %0
%1 (byte) data block 1 (pattern order)
+ %1
%2 (byte) data block 2 (patterns) 00-07 ┐
+ %2
%3 (byte) data block 3
... 08-0f │
+ %3
%4 (byte) data block 4
... 10-17 │
+ %4
%5 (byte) data block 5
... 18-1f ├ corresponds
+ %5
%6 (byte) data block 6
... 20-27 │ with #pat
+ %6
%7 (byte) data block 7
... 28-2f │
+ %7
%8 (byte) data block 8
... 30-37 │
+ %8
%9 (byte) data block 9
... 38-3f ┘
--EOF-
structure of 'flags'
byte:
┌─────┬────────────────────┐
│ BiT │ SWiTCH
│
├─────┼────────────────────┤
│ 0 │
update speed │
│ 1 │
track volume lock │
│ 2 │
volume peak lock │
│ 3 │
tremolo depth │
│ 4 │
vibrato depth │
│ 5 │
track panning lock │
│ 6 │
%unused% │
│ 7 │
%unused% │
└─────┴────────────────────┘
structure of data block
0 (instruments) after decompression:
Offset Length Type
000000 %nn*13 (byte) table of %nn instrument specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
13 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
└ 00000c (byte) fine-tune (signed)
structure of data block
1 (pattern order) after decompression:
Offset Length Type
000000 128
(byte) pattern order table (order entries 00-7f)
structure of data block
2-9 (patterns) after decompression:
Offset Length Type
000000 18*64*4 (byte)
pattern [block_number-2]*8+0
│
│
channel ┘ └
line Offset Type
1-18
0-63
┌ 000000 (byte) note [0-96] [255 is Key-Off]
4 bytes ┤ 000001 (byte) instrument [0-250]
│ 000002 (byte) effect command [0-35]
└ 000003 (byte) effect data
001200 18*64*4 (byte)
pattern [block_number-2]*8+1
.
... ...
... ...
.
... ...
... ...
.
... ...
... ...
007e00 18*64*4 (byte)
pattern [block_number-2]*8+7
000017
1 (byte) flags
000018
2 (word) pattern length
00001a
1 (byte) number of tracks
00001b
1 (byte) macro speed-up factor
00001c
4 (dword) length
of data block 0 {%0}
000020
4 (dword)
... ... ... 1 {%1}
000024
4 (dword)
... ... ... 2 {%2}
000028
4 (dword)
... ... ... 3 {%3}
00002c
4 (dword)
... ... ... 4 {%4}
000030
4 (dword)
... ... ... 5 {%5}
000034
4 (dword)
... ... ... 6 {%6}
000038
4 (dword)
... ... ... 7 {%7}
00003c
4 (dword) ... ... ...
8 {%8}
000040
4 (dword)
... ... ... 9 {%9}
000044
4 (dword)
... ... ... 10 {%10}
000048
4 (dword)
... ... ... 11 {%11}
00004c
4 (dword)
... ... ... 12 {%12}
000050
4 (dword)
... ... ... 13 {%13}
000054
4 (dword)
... ... ... 14 {%14}
000058
4 (dword)
... ... ... 15 {%15}
00005c
4 (dword)
... ... ... 16 {%16}
000060
4 (dword)
... ... ... 17 {%17}
000064
4 (dword)
... ... ... 18 {%18}
000068
4 (dword)
... ... ... 19 {%19}
00006c %0 (byte) data block 0 (instrument specs)
+ %0
%1 (byte) data block 1 (instrument macro-defs)
+ %1
%2 (byte) data block 2 (arpeggio/vibrato macro-defs)
+ %2
%3 (byte) data block 3 (pattern order)
+ %3
%4 (byte) data block 4 (patterns) 00-07 ┐
+ %4
%5 (byte) data block 5
... 08-0f │
+ %5
%6 (byte) data block 6
... 10-17 │
+ %6
%7 (byte) data block 7
... 18-1f │
+ %7
%8 (byte) data block 8
... 20-27 │
+ %8
%9 (byte) data block 9
... 28-2f │
+ %9
%10 (byte) data block 10
... 30-37 ├ corresponds
+ %10 %11
(byte) data block 11 ... 38-3f │
with #pat
+ %11 %12
(byte) data block 12 ... 40-47 │
+ %12 %13
(byte) data block 13 ... 48-4f │
+ %13 %14
(byte) data block 14 ... 50-57 │
+ %14 %15
(byte) data block 15 ... 58-5f │
+ %15 %16
(byte) data block 16 ... 60-67 │
+ %16 %17
(byte) data block 17 ... 68-6f │
+ %17 %18
(byte) data block 18 ... 70-77 │
+ %18 %19 (byte)
data block 19 ... 78-7f ┘
--EOF-
structure of 'flags'
byte:
┌─────┬────────────────────────────┐
│ BiT │ SWiTCH
│
├─────┼────────────────────────────┤
│ 0 │
update
speed
│
│ 1 │
track volume lock │
│ 2 │
volume peak lock │
│ 3 │
tremolo
depth
│
│ 4 │
vibrato
depth
│
│ 5 │
track panning lock │
│ 6 │
percussion track extension │
│ 7 │
volume
scaling
│
└─────┴────────────────────────────┘
structure of data block
0 (instrument specs) after decompression:
Offset Length Type
000000 ???*14
(byte) table of %nn instrument
specs:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
14 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
│ 00000c (byte) fine-tune (signed)
└ 00000d (byte) voice type:
┌─────┬─────────────────────────────┐
│ 0 │
melodic
│
│ 1-5 │ percussion (BD,SD,TT,TC,HH) │
└─────┴─────────────────────────────┘
structure of data block
1 (instrument macro-defs) after decompression:
Offset Length Type
000000 255*3831 (???)
table of 255 instrument macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) loop begin position
000002 1 (byte) loop length
000003 1 (byte) key-off position
000004 1 (byte) arpeggio macro-table number
000005 1 (byte) vibrato macro-table number
000006 255*15 (???) fm-register
definitions:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
15 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
... (carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (word) frequency slide (signed)
│ 00000d (byte) panning (0=C,1=L,2=R)
└ 00000e (byte) duration
structure of data block
2 (arpg/vib macro-defs) after decompression:
Offset Length Type
000000 255*521 (byte)
table of 255 arpeggio/vibrato macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) speed
000002 1 (byte) loop begin position
000003 1 (byte) loop length
000004 1 (byte) key-off position
000005 255 (byte) table of 255
arpeggio definitions:
┌────────────┬─────────────────────────────┐
│ 0 │ default
note
│
│ 1-96 │ number of half-tones
to add │
│ 1-97[+80h] │
fixed-note
│
└────────────┴─────────────────────────────┘
000104 1 (byte) length
000105 1 (byte) speed
000106 1 (byte) delay
000107 1 (byte) loop begin position
000108 1 (byte) loop length
000109 1 (byte) key-off position
00010a 255 (byte) table of 255 vibrato
definitions:
┌─────────┬─────────────────────────────────┐
│
0 │ default frequency
│
│ -7F..7F │ frequency units to add
(signed) │
└─────────┴─────────────────────────────────┘
structure of data block
3 (pattern order) after decompression:
Offset Length Type
000000 128
(byte) pattern order table (order entries 00-7f)
structure of data block
4-19 (patterns) after decompression:
Offset Length Type
000000 20*256*6 (byte) pattern
[block_number-4]*8+0
│
│
channel ┘ └
line Offset Type
1-20
0-255
┌ 000000 (byte) note [0-96; +90h=fixed; 255=Key-Off]
│ 000001 (byte) instrument [0-255]
6 bytes ┤ 000002 (byte) 1st effect command
[0-39]
│ 000003 (byte) 1st effect data
│ 000004 (byte) 2nd effect command [0-39]
└ 000005 (byte) 2nd effect data
007800 20*256*6 (byte) pattern
[block_number-4]*8+1
.
... ... ...
...
.
... ...
... ...
.
... ...
... ...
070800 20*256*6 (byte) pattern
[block_number-4]*8+7
000017
1 (byte) flags
000018
2 (word) pattern length
00001a
1 (byte) number of tracks
00001b
1 (byte) macro speed-up factor
00001c
1 (byte) 4-op track extension flags
00001d 20
(byte) initial lock flags for 20 tracks
000031
4 (dword) length
of data block 0 {%0}
000035
4 (dword)
... ... ... 1 {%1}
000039
4 (dword)
... ... ... 2 {%2}
00003d
4 (dword)
... ... ... 3 {%3}
000041
4 (dword)
... ... ... 4 {%4}
000045
4 (dword)
... ... ... 5 {%5}
000049
4 (dword)
... ... ... 6 {%6}
00004d
4 (dword)
... ... ... 7 {%7}
000051
4 (dword)
... ... ... 8 {%8}
000055
4 (dword)
... ... ... 9 {%9}
000059
4 (dword)
... ... ... 10 {%10}
00005d
4 (dword)
... ... ... 11 {%11}
000061
4 (dword)
... ... ... 12 {%12}
000065
4 (dword)
... ... ... 13 {%13}
000069
4 (dword)
... ... ... 14 {%14}
00006d
4 (dword)
... ... ... 15 {%15}
000071
4 (dword)
... ... ... 16 {%16}
000075
4 (dword)
... ... ... 17 {%17}
000079
4 (dword)
... ... ... 18 {%18}
00007d
4 (dword)
... ... ... 19 {%19}
000081 %0 (byte) data block 0 (instrument specs)
+ %0
%1 (byte) data block 1 (instrument macro-defs)
+ %1
%2 (byte) data block 2 (arpeggio/vibrato macro-defs)
+ %2
%3 (byte) data block 3 (pattern order)
+ %3
%4 (byte) data block 4 (patterns) 00-07 ┐
+ %4
%5 (byte) data block 5
... 08-0f │
+ %5
%6 (byte) data block 6
... 10-17 │
+ %6
%7 (byte) data block 7 ...
18-1f │
+ %7
%8 (byte) data block 8
... 20-27 │
+ %8
%9 (byte) data block 9
... 28-2f │
+ %9
%10 (byte) data block 10
... 30-37 ├ corresponds
+ %10 %11
(byte) data block 11 ... 38-3f │
with #pat
+ %11 %12
(byte) data block 12 ... 40-47 │
+ %12 %13
(byte) data block 13 ... 48-4f │
+ %13 %14
(byte) data block 14 ... 50-57 │
+ %14 %15
(byte) data block 15 ... 58-5f │
+ %15 %16
(byte) data block 16 ... 60-67 │
+ %16 %17
(byte) data block 17 ... 68-6f │
+ %17 %18
(byte) data block 18 ... 70-77 │
+ %18 %19
(byte) data block 19 ... 78-7f ┘
--EOF-
structure of 'flags'
byte:
┌─────┬────────────────────────────┐
│ BiT │ SWiTCH
│
├─────┼────────────────────────────┤
│ 0 │
update
speed
│
│ 1 │
track volume lock │
│ 2 │
volume peak lock │
│ 3 │
tremolo
depth
│
│ 4 │
vibrato
depth
│
│ 5 │
track panning lock │
│ 6 │
percussion track extension │
│ 7 │
volume
scaling
│
└─────┴────────────────────────────┘
structure of '4-op
track extension flags' byte:
┌─────┬──────────────┐
│ BiT │ SWiTCH │
├─────┼──────────────┤
│ 0 │
tracks 1,2 │
│ 1 │
tracks 3,4 │
│ 2 │
tracks 5,6 │
│ 3 │
tracks 10,11 │
│ 4 │
tracks 12,13 │
│ 5 │
tracks 14,15 │
│ 6 │
%unused% │
│ 7 │
%unused% │
└─────┴──────────────┘
structure of 'initial
lock flags' byte:
┌─────┬──────────────────────────────────┐
│ BiT │ SWiTCH
│
├─────┼──────────────────────────────────┤
│ 0─┐│
panning
position:
│
│ 1─┘│
0=center, 1=left, 2=right │
│ 2─┐│
volume slide
type:
│
│ 3─┘│
0=def, 1=car, 2=mod, 3=car w/mod │
│ 4 │
volume lock
state
│
│ 5 │
peak lock
state
│
│ 6 │
%unused%
│
│ 7 │
%unused%
│
└─────┴──────────────────────────────────┘
structure of data block
0 (instrument specs) after decompression:
Offset Length Type
000000 ???*14
(byte) table of %nn instrument
specs:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
14 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
│ 00000c (byte) fine-tune (signed)
└ 00000d (byte) voice type:
┌─────┬─────────────────────────────┐
│ 0 │
melodic
│
│ 1-5 │ percussion (BD,SD,TT,TC,HH) │
└─────┴─────────────────────────────┘
structure of data block
1 (instrument macro-defs) after decompression:
Offset Length Type
000000 255*3831 (???)
table of 255 instrument macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) loop begin position
000002 1 (byte) loop length
000003 1 (byte) key-off position
000004 1 (byte) arpeggio macro-table number
000005 1 (byte) vibrato macro-table number
000006 255*15 (???) fm-register
definitions:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
15 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│
00000a (byte) Feedback/FM
│ 00000b (word) frequency slide (signed)
│ 00000d (byte) panning (0=C,1=L,2=R)
└ 00000e (byte) duration
structure of data block
2 (arpg/vib macro-defs) after decompression:
Offset Length Type
000000 255*521 (byte)
table of 255 arpeggio/vibrato macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) speed
000002 1 (byte) loop begin
position
000003 1 (byte) loop length
000004 1 (byte) key-off position
000005 255 (byte) table of 255
arpeggio definitions:
┌────────────┬─────────────────────────────┐
│ 0 │ default
note
│
│ 1-96 │ number of half-tones
to add │
│ 1-97[+80h] │
fixed-note
│
└────────────┴─────────────────────────────┘
000104 1 (byte) length
000105 1 (byte) speed
000106 1 (byte) delay
000107 1 (byte) loop begin position
000108 1 (byte) loop length
000109 1 (byte) key-off position
00010a 255 (byte) table of 255 vibrato
definitions:
┌─────────┬─────────────────────────────────┐
│ 0 │ default
frequency
│
│ -7F..7F │ frequency units to add
(signed) │
└─────────┴─────────────────────────────────┘
structure of data block
3 (pattern order) after decompression:
Offset Length Type
000000 128
(byte) pattern order table (order entries 00-7f)
structure of data block
4-19 (patterns) after decompression:
Offset Length Type
000000 20*256*6 (byte) pattern
[block_number-4]*8+0
│
│
channel ┘ └
line Offset Type
1-20
0-255
┌ 000000 (byte) note [0-96; +90h=fixed; 255=Key-Off]
│ 000001 (byte) instrument [0-255]
6 bytes ┤ 000002 (byte) 1st effect command
[0-39]
│
000003 (byte) 1st effect data
│ 000004 (byte) 2nd effect command [0-39]
└ 000005 (byte) 2nd effect data
007800 20*256*6 (byte) pattern
[block_number-4]*8+1
.
... ...
... ...
.
... ...
... ...
.
... ...
... ...
070800 20*256*6 (byte) pattern
[block_number-4]*8+7
000017
1 (byte) flags
000018
2 (word) pattern length
00001a
1 (byte) number of tracks
00001b
1 (byte) macro speed-up factor
00001c
1 (byte) 4-op track extension flags
00001d 20
(byte) initial lock flags for 20 tracks
000031
4 (dword) length
of data block 0 {%0}
000035
4 (dword)
... ... ... 1 {%1}
000039
4 (dword)
... ... ... 2 {%2}
00003d
4 (dword)
... ... ... 3 {%3}
000041
4 (dword)
... ... ... 4 {%4}
000045
4 (dword)
... ... ... 5 {%5}
000049
4 (dword)
... ... ... 6 {%6}
00004d
4 (dword)
... ... ... 7 {%7}
000051
4 (dword)
... ... ... 8 {%8}
000055
4 (dword)
... ... ... 9 {%9}
000059
4 (dword)
... ... ... 10 {%10}
00005d
4 (dword)
... ... ... 11 {%11}
000061
4 (dword)
... ... ... 12 {%12}
000065
4 (dword)
... ... ... 13 {%13}
000069
4 (dword)
... ... ... 14 {%14}
00006d
4 (dword)
... ... ... 15 {%15}
000071
4 (dword)
... ... ... 16 {%16}
000075
4 (dword)
... ... ... 17 {%17}
000079
4 (dword)
... ... ... 18 {%18}
00007d
4 (dword)
... ... ... 19 {%19}
000081
4 (dword)
... ... ... 20 {%20}
000085 %0 (byte) data block 0 (instrument specs)
+ %0
%1 (byte) data block 1 (instrument macro-defs)
+ %1
%2 (byte) data block 2 (arpeggio/vibrato macro-defs)
+ %2
%3 (byte) data block 3 (disabled fm-register columns)
+ %3
%4 (byte) data block 4 (pattern order)
+ %4
%5 (byte) data block 5 (patterns) 00-07 ┐
+ %5
%6 (byte) data block 6
... 08-0f │
+ %6
%7 (byte) data block 7
... 10-17 │
+ %7
%8 (byte) data block 8
... 18-1f │
+ %8
%9 (byte) data block 9
... 20-27 │
+ %9
%10 (byte) data block 10
... 28-2f │
+ %10 %11
(byte) data block 11 ... 30-37 ├
corresponds
+ %11 %12
(byte) data block 12 ... 38-3f │
with #pat
+ %12 %13
(byte) data block 13 ... 40-47 │
+ %13 %14
(byte) data block 14 ... 48-4f │
+ %14 %15
(byte) data block 15 ... 50-57 │
+ %15 %16
(byte) data block 16 ... 58-5f │
+ %16 %17
(byte) data block 17 ... 60-67 │
+ %17 %18 (byte)
data block 18 ... 68-6f │
+ %18 %19
(byte) data block 19 ... 70-77 │
+ %19 %20
(byte) data block 20 ... 78-7f ┘
--EOF-
structure of 'flags'
byte:
┌─────┬────────────────────────────┐
│ BiT │ SWiTCH
│
├─────┼────────────────────────────┤
│ 0 │
update
speed
│
│ 1 │
track volume lock │
│ 2 │
volume peak lock │
│ 3 │
tremolo
depth
│
│ 4 │
vibrato
depth
│
│ 5 │
track panning lock │
│ 6 │
percussion track extension │
│ 7 │
volume
scaling
│
└─────┴────────────────────────────┘
structure of '4-op
track extension flags' byte:
┌─────┬──────────────┐
│ BiT │ SWiTCH │
├─────┼──────────────┤
│ 0 │
tracks 1,2 │
│ 1 │
tracks 3,4 │
│ 2 │
tracks 5,6 │
│ 3 │
tracks 10,11 │
│ 4 │
tracks 12,13 │
│ 5 │
tracks 14,15 │
│ 6 │
%unused% │
│ 7 │
%unused% │
└─────┴──────────────┘
structure of 'initial
lock flags' byte:
┌─────┬──────────────────────────────────┐
│ BiT │ SWiTCH
│
├─────┼──────────────────────────────────┤
│ 0─┐│
panning
position:
│
│ 1─┘│
0=center, 1=left, 2=right │
│ 2─┐│
volume slide type:
│
│ 3─┘│
0=def, 1=car, 2=mod, 3=car w/mod │
│ 4 │
volume lock
state
│
│ 5 │
peak lock
state
│
│ 6 │
%unused%
│
│ 7 │
%unused%
│
└─────┴──────────────────────────────────┘
structure of data block
0 (instrument specs) after decompression:
Offset Length Type
000000 ???*14
(byte) table of %nn instrument
specs:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│
000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
14 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
│
00000c (byte) fine-tune (signed)
└ 00000d (byte) voice type:
┌─────┬─────────────────────────────┐
│ 0 │ melodic
│
│ 1-5 │ percussion (BD,SD,TT,TC,HH) │
└─────┴─────────────────────────────┘
structure of data block
1 (instrument macro-defs) after decompression:
Offset Length Type
000000 255*3831 (???)
table of 255 instrument macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) loop begin position
000002 1 (byte) loop length
000003 1 (byte) key-off position
000004 1 (byte) arpeggio macro-table number
000005 1 (byte) vibrato macro-table number
000006 255*15 (???) fm-register
definitions:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume
(modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
15 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
bit 7:
retrigger flag >│ 00000a (byte) Feedback/FM
│ 00000b (word) frequency slide (signed)
│ 00000d (byte) panning (0=C,1=L,2=R)
└ 00000e (byte) duration
structure of data block
2 (arpg/vib macro-defs) after decompression:
Offset Length Type
000000 255*521 (byte)
table of 255 arpeggio/vibrato macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) speed
000002 1 (byte) loop begin position
000003 1 (byte) loop length
000004 1 (byte) key-off position
000005 255 (byte) table of 255
arpeggio definitions:
┌────────────┬─────────────────────────────┐
│ 0 │ default
note
│
│ 1-96 │ number of half-tones
to add │
│ 1-97[+80h] │
fixed-note
│
└────────────┴─────────────────────────────┘
000104 1 (byte) length
000105 1 (byte) speed
000106 1 (byte) delay
000107 1 (byte) loop begin position
000108 1 (byte) loop length
000109 1 (byte) key-off position
00010a 255 (byte) table of 255 vibrato
definitions:
┌─────────┬─────────────────────────────────┐
│ 0 │ default
frequency
│
│ -7F..7F │ frequency units to add
(signed) │
└─────────┴─────────────────────────────────┘
structure of data block
3 (disabled fm-reg columns) after decompression:
Offset Length Type
000000 255*28
(byte) table of 255 disabled fm-reg
column flags:
Offset
Length Type
000000 1 (byte) attack
rate ┐
000001 1 (byte) decay
rate │
000002 1 (byte) sustain
level │
000003 1 (byte) release
rate │
000004 1 (byte) waveform
type │
000005 1 (byte) output
level ├ modulator
000006 1 (byte) key scaling level │
000007 1 (byte)
multiplier │
000008 1 (byte)
tremolo │
000009 1 (byte)
vibrato │
00000a 1 (byte) key scale rate │
00000b 1 (byte)
sustain ┘
00000c 1 (byte) attack
rate ┐
00000d 1 (byte) decay
rate │
00000e 1 (byte) sustain
level │
00000f 1 (byte) release rate
│
000010 1 (byte) waveform
type │
000011 1 (byte) output
level ├ carrier
000012 1 (byte) key scaling level │
000013 1 (byte)
multiplier │
000014 1 (byte)
tremolo │
000015 1 (byte)
vibrato │
000016 1 (byte) key scale rate │
000017 1 (byte)
sustain ┘
000018 1 (byte) connection type
000019 1 (byte) feedback
00001a 1 (byte) frequency slide
00001b 1 (byte) panning
structure of data block
4 (pattern order) after decompression:
Offset Length Type
000000 128
(byte) pattern order table (order entries 00-7f)
structure of data block
5-20 (patterns) after decompression:
Offset Length Type
000000 20*256*6 (byte) pattern
[block_number-5]*8+0
│
│
channel ┘ └
line Offset Type
1-20
0-255
┌ 000000 (byte) note [0-96; +90h=fixed; 255=Key-Off]
│ 000001 (byte) instrument [0-255]
6 bytes ┤ 000002 (byte) 1st effect command
[0-39]
│ 000003 (byte) 1st effect data
│ 000004 (byte) 2nd effect command [0-39]
└ 000005 (byte) 2nd effect data
007800 20*256*6 (byte) pattern
[block_number-5]*8+1
.
... ...
... ...
.
... ...
... ...
. ...
...
... ...
070800 20*256*6 (byte) pattern
[block_number-5]*8+7
Offset Length Type
000000 11
(char) ID string '_a2pattern_'
00000b
4 (dword) 32-bit
cyclic redundancy check value
00000f
1 (byte) file format version
000010
2 (word) length of data block {%len}
000012 %len
(byte) data block
--EOF-
structure of data block
after decompression:
Offset Length Type
000000 64*9*4 (byte)
pattern
│
│
line ─┘
└ channel Offset Type
0-63 1-9
┌ 000000 (byte) note [0-96] [255 is Key-Off]
4 bytes ┤ 000001 (byte) instrument [0-250]
│ 000002 (byte) effect command [0-15]
└
000003 (byte) effect data
000010
2 (word) length of data block {%len}
000012 %len
(byte) data block
--EOF-
structure of data block
after decompression:
Offset Length Type
000000 18*64*4 (byte)
pattern
│
│
channel ┘ └
line Offset Type
1-18
0-63
┌ 000000 (byte) note [0-96] [255 is Key-Off]
4 bytes ┤ 000001 (byte) instrument [0-250]
│ 000002 (byte) effect command [0-35]
└ 000003 (byte) effect data
000010
4 (dword) length
of data block {%len}
000014 %len
(byte) data block
--EOF-
structure of data block
after decompression:
Offset Length Type
000000 20*256*6 (byte) pattern
│
│
channel ┘ └
line Offset Type
1-20
0-255
┌ 000000 (byte) note [0-96; +90h=fixed; 255=Key-Off]
│ 000001 (byte) instrument [0-255]
6 bytes ┤ 000002 (byte) 1st effect command
[0-39]
│ 000003 (byte) 1st effect data
│ 000004 (byte) 2nd effect command [0-39]
└ 000005 (byte) 2nd effect data
000010
4 (dword) length
of data block {%len}
000014 %len
(byte) data block
--EOF-
structure of data block
after decompression:
Offset Length Type
000000 20*256*6 (byte) pattern
│
│
channel ┘ └
line Offset Type
1-20
0-255
┌ 000000 (byte) note [0-96; +90h=fixed; 255=Key-Off]
│
000001 (byte) instrument [0-255]
6 bytes ┤ 000002 (byte) 1st effect command
[0-39]
│ 000003 (byte) 1st effect data
│ 000004 (byte) 2nd effect command [0-39]
└ 000005 (byte)
2nd effect data
007800 31
(string) pattern name [30 characters]
Offset Length Type
000000
7 (char) ID string '_a2ins_'
000007
2 (word) 16-bit cyclic redundancy check value
000009
1 (byte) file format version
00000a
1 (byte) length of data block {%len}
00000b %len
(byte) data block
--EOF-
structure of data block
after decompression:
Offset Length Type
000000 1
(byte) AM/Vibrato/EG (modulator)
000001
1 (byte)
...
(carrier)
000002
1 (byte) KSL/Volume
(modulator)
000003
1 (byte)
...
(carrier)
000004
1 (byte) Attack/Decay (modulator)
000005
1 (byte)
...
(carrier)
000006
1 (byte) Sustain/Release (modulator)
000007
1 (byte)
...
(carrier)
000008
1 (byte) WaveForm
(modulator)
000009
1 (byte)
... (carrier)
00000a
1 (byte) Feedback/FM
00000b
1 (byte) miscellaneous (unused)
00000c
1 (byte) fine-tune (signed)
00000d 23
(string) instrument name [22 characters]
00000a
1 (byte) length of data block {%len}
00000b %len
(byte) data block
--EOF-
structure of data block
after decompression:
Offset Length Type
000000
1 (byte) AM/Vibrato/EG (modulator)
000001
1 (byte)
...
(carrier)
000002
1 (byte) KSL/Volume
(modulator)
000003
1 (byte)
...
(carrier)
000004
1 (byte) Attack/Decay (modulator)
000005
1 (byte)
...
(carrier)
000006
1 (byte) Sustain/Release (modulator)
000007
1 (byte)
...
(carrier)
000008
1 (byte) WaveForm
(modulator)
000009
1 (byte)
...
(carrier)
00000a
1 (byte) Feedback/FM
00000b
1 (byte) panning (0=C,1=L,2=R)
00000c
1 (byte) fine-tune (signed)
00000d 23
(string) instrument name [22 characters]
00000a
2 (word) length of data block {%len}
00000c %len
(byte) data block
--EOF-
structure of data block
after decompression:
Offset Length Type
000000
1 (byte) AM/Vibrato/EG (modulator)
000001
1 (byte)
...
(carrier)
000002
1 (byte) KSL/Volume
(modulator)
000003
1 (byte) ...
(carrier)
000004
1 (byte) Attack/Decay (modulator)
000005
1 (byte) ...
(carrier)
000006
1 (byte) Sustain/Release (modulator)
000007
1 (byte)
...
(carrier)
000008
1 (byte) WaveForm
(modulator)
000009
1 (byte)
...
(carrier)
00000a
1 (byte) Feedback/FM
00000b
1 (byte) panning (0=C,1=L,2=R)
00000c
1 (byte) fine-tune (signed)
00000d
1 (byte) voice type:
┌─────┬─────────────────────────────┐
│ 0 │
melodic
│
│ 1-5 │ percussion (BD,SD,TT,TC,HH) │
└─────┴─────────────────────────────┘
00000e
33 (string) instrument name [32 characters]
Offset Length Type
000000 11
(char) ID string '_a2insbank_'
00000b
4 (dword) 32-bit
cyclic redundancy check value
00000f
1 (byte) file format version
000010
2 (word) length of data block {%len}
000012 %len
(byte) data block
--EOF-
structure of data block
after decompression:
Offset Length Type
000000 250*33 (string) table of 250
instrument names [32 chars each]
00203a 250*13 (byte)
table of 250 instrument specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte)
KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
13 bytes ┤
000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) miscellaneous (unused)
└ 00000c (byte) fine-tune (signed)
000010
2 (word) length of data block {%len}
000012 %len
(byte) data block
--EOF-
structure of data block
after decompression:
Offset Length Type
000000 250*33 (string) table of 250
instrument names [32 chars each]
00203a 250*13 (byte)
table of 250 instrument specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte)
KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte) ...
(carrier)
13 bytes ┤
000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
└ 00000c (byte) fine-tune (signed)
000010
4 (dword) length
of data block {%len}
000014 %len
(byte) data block
--EOF-
structure of data block
after decompression:
Offset Length Type
000000 255*33 (string) table of 255
instrument names [32 chars each]
0020df 255*14 (byte)
table of 255 instrument specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
14 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│
00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
│ 00000c (byte) fine-tune (signed)
└ 00000d (byte) voice type:
┌─────┬─────────────────────────────┐
│ 0 │ melodic
│
│ 1-5 │ percussion (BD,SD,TT,TC,HH) │
└─────┴─────────────────────────────┘
Offset Length Type
000000 20
(char) ID string '_a2insbank_w/macros_'
00000b
4 (dword) 32-bit
cyclic redundancy check value
00000f
1 (byte) file format version
000010
4 (dword) length
of data block 0 {%1}
000014
4 (dword) length
of data block 1 {%2}
000018 %1
(byte) data block 0 (instrument specifications/macro-defs)
+ %1
%2 (byte) data block 1 (arpeggio/vibrato macro-defs)
--EOF-
structure of data block
0 (instrument specs/macro-defs) after decompression:
Offset Length Type
000000 255*33 (string) table of 255
instrument names [32 chars each]
0020df 255*14 (byte)
table of 255 instrument specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
14 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
│ 00000c (byte) fine-tune (signed)
└ 00000d (byte) voice type:
┌─────┬─────────────────────────────┐
│ 0 │
melodic
│
│ 1-5 │ percussion (BD,SD,TT,TC,HH) │
└─────┴─────────────────────────────┘
002ed1 255*3831 (???)
table of 255 instrument macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) loop begin position
000002 1 (byte) loop length
000003 1 (byte) key-off position
000004 1 (byte) arpeggio macro-table number
000005 1 (byte) vibrato macro-table number
000006 255*15 (???) fm-register
definitions:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│
000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
15 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (word) frequency slide (signed)
│ 00000d (byte) panning (0=C,1=L,2=R)
└ 00000e (byte) duration
structure of data block
1 (arpeggio/vibrato macro-defs) after decompression:
000000 255*521 (byte)
table of 255 arpeggio/vibrato macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) speed
000002 1
(byte) loop begin position
000003 1 (byte) loop length
000004 1 (byte) key-off position
000005 255 (byte) table of 255
arpeggio definitions:
┌────────────┬─────────────────────────────┐
│ 0 │ default
note
│
│ 1-96 │ number of half-tones
to add │
│ 1-97[+80h] │
fixed-note
│
└────────────┴─────────────────────────────┘
000104 1 (byte) length
000105 1 (byte) speed
000106 1 (byte) delay
000107 1 (byte) loop begin position
000108 1 (byte) loop length
000109 1
(byte) key-off position
00010a 255 (byte) table of 255 vibrato
definitions:
┌─────────┬─────────────────────────────────┐
│ 0 │ default
frequency
│
│ -7F..7F │ frequency units to add
(signed) │
└─────────┴─────────────────────────────────┘
000010
4 (dword) length
of data block 0 {%1}
000014
4 (dword) length
of data block 1 {%2}
000018
4 (dword) length
of data block 2 {%3}
00001c %1
(byte) data block 0 (instrument specifications/macro-defs)
+ %1
%2 (byte) data block 1 (arpeggio/vibrato macro-defs)
+ %2
%3 (byte) data block 2 (disabled fm-register columns)
--EOF-
structure of data block
0 (instrument specs/macro-defs) after decompression:
Offset Length Type
000000 255*33 (string) table of 255
instrument names [32 chars each]
0020df 255*14 (byte)
table of 255 instrument specifications:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
14 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte)
...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
│ 00000a (byte) Feedback/FM
│ 00000b (byte) panning (0=C,1=L,2=R)
│ 00000c (byte) fine-tune (signed)
└ 00000d (byte) voice type:
┌─────┬─────────────────────────────┐
│ 0 │
melodic
│
│ 1-5 │ percussion (BD,SD,TT,TC,HH) │
└─────┴─────────────────────────────┘
002ed1 255*3831 (???)
table of 255 instrument macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) loop begin position
000002 1 (byte) loop length
000003 1 (byte) key-off position
000004 1 (byte) arpeggio macro-table number
000005 1 (byte) vibrato macro-table number
000006 255*15 (???) fm-register
definitions:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│ 000004 (byte) Attack/Decay (modulator)
│
000005 (byte)
...
(carrier)
15 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte) ...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
bit 7:
retrigger flag >│ 00000a (byte) Feedback/FM
│ 00000b (word) frequency slide (signed)
│ 00000d (byte) panning (0=C,1=L,2=R)
└ 00000e (byte) duration
structure of data block
1 (arpeggio/vibrato macro-defs) after decompression:
Offset Length Type
000000 255*521 (byte)
table of 255 arpeggio/vibrato macro-definitions:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) speed
000002 1 (byte) loop begin position
000003 1 (byte) loop length
000004 1 (byte) key-off position
000005 255 (byte) table of 255
arpeggio definitions:
┌────────────┬─────────────────────────────┐
│ 0 │ default
note
│
│ 1-96 │ number of half-tones
to add │
│ 1-97[+80h] │
fixed-note
│
└────────────┴─────────────────────────────┘
000104
1 (byte) length
000105 1 (byte) speed
000106 1 (byte) delay
000107 1 (byte) loop begin position
000108 1 (byte) loop length
000109 1 (byte) key-off position
00010a 255 (byte) table of 255 vibrato
definitions:
┌─────────┬─────────────────────────────────┐
│ 0 │ default
frequency
│
│ -7F..7F │ frequency units to add
(signed) │
└─────────┴─────────────────────────────────┘
structure of data block
2 (disabled fm-reg columns) after decompression:
Offset Length Type
000000 255*28
(byte) table of 255 disabled fm-reg column
flags:
Offset
Length Type
000000 1 (byte) attack
rate ┐
000001 1 (byte) decay
rate │
000002 1 (byte) sustain
level │
000003 1 (byte) release
rate │
000004 1 (byte) waveform
type │
000005 1 (byte) output
level ├ modulator
000006 1 (byte) key scaling level │
000007 1 (byte)
multiplier │
000008 1 (byte)
tremolo │
000009 1 (byte)
vibrato │
00000a 1 (byte) key scale rate │
00000b 1 (byte)
sustain ┘
00000c 1 (byte) attack
rate ┐
00000d 1 (byte) decay
rate │
00000e 1 (byte) sustain
level │
00000f 1 (byte) release
rate │
000010 1 (byte) waveform
type │
000011 1 (byte) output
level ├ carrier
000012 1 (byte) key scaling level │
000013 1 (byte) multiplier
│
000014 1 (byte)
tremolo │
000015 1 (byte)
vibrato │
000016 1 (byte) key scale rate │
000017 1 (byte)
sustain ┘
000018 1 (byte) connection type
000019 1 (byte) feedback
00001a 1 (byte) frequency slide
00001b 1 (byte) panning
Offset Length Type
000000 18
(char) ID string '_a2ins_w/fm-macro_'
000012 4
(dword) 32-bit cyclic
redundancy check value
000016
1 (byte) file format version (currently 1)
000017
2 (word) length of data block {%len}
000019 %len
(byte) data block
--EOF-
structure of data block
after decompression:
Offset Length Type
000000
1 (byte) AM/Vibrato/EG (modulator)
000001
1 (byte)
...
(carrier)
000002
1 (byte) KSL/Volume
(modulator)
000003
1 (byte)
...
(carrier)
000004
1 (byte) Attack/Decay (modulator)
000005
1 (byte)
...
(carrier)
000006
1 (byte) Sustain/Release (modulator)
000007
1 (byte)
...
(carrier)
000008
1 (byte) WaveForm
(modulator)
000009
1 (byte)
...
(carrier)
00000a
1 (byte) Feedback/FM
00000b
1 (byte) panning (0=C,1=L,2=R)
00000c
1 (byte) fine-tune (signed)
00000d
1 (byte) voice type:
┌─────┬─────────────────────────────┐
│
0 │
melodic
│
│ 1-5 │ percussion (BD,SD,TT,TC,HH) │
└─────┴─────────────────────────────┘
00000e
33 (string) instrument name [32 characters]
00002f
3831 (???) fm-register
definition macro-table data:
Offset
Length Type
000000 1 (byte) length
000001 1 (byte) loop begin position
000002 1 (byte) loop length
000003 1 (byte) key-off position
000004 1 (byte) arpeggio macro-table number
┐
000005 1 (byte) vibrato macro-table number ┴ fixed to 0!
000006 255*15 (???) fm-register
definitions:
Offset Type
┌ 000000 (byte) AM/Vibrato/EG (modulator)
│ 000001 (byte)
...
(carrier)
│ 000002 (byte) KSL/Volume (modulator)
│ 000003 (byte)
...
(carrier)
│
000004 (byte) Attack/Decay (modulator)
│ 000005 (byte)
...
(carrier)
15 bytes ┤ 000006 (byte) Sustain/Release (modulator)
│ 000007 (byte) ...
(carrier)
│ 000008 (byte) WaveForm
(modulator)
│ 000009 (byte)
...
(carrier)
bit 7:
retrigger flag >│ 00000a (byte) Feedback/FM
│ 00000b (word) frequency slide (signed)
│ 00000d (byte) panning (0=C,1=L,2=R)
└ 00000e (byte) duration
000f26 28
(byte) disabled fm-reg column flags:
Offset
Length Type
000000 1 (byte) attack
rate ┐
000001 1 (byte) decay
rate │
000002 1 (byte) sustain
level │
000003 1 (byte) release
rate │
000004 1 (byte) waveform
type │
000005 1 (byte) output
level ├ modulator
000006 1 (byte) key scaling level │
000007 1 (byte)
multiplier │
000008 1 (byte)
tremolo │
000009 1 (byte)
vibrato │
00000a 1 (byte) key scale rate │
00000b 1 (byte)
sustain ┘
00000c 1 (byte) attack
rate ┐
00000d 1 (byte) decay
rate │
00000e 1 (byte) sustain
level │
00000f 1 (byte) release
rate │
000010 1 (byte) waveform
type │
000011 1 (byte) output
level ├ carrier
000012 1 (byte) key scaling level │
000013 1 (byte) multiplier
│
000014 1 (byte)
tremolo │
000015 1 (byte)
vibrato │
000016 1 (byte) key scale rate │
000017 1 (byte)
sustain ┘
000018 1 (byte) connection type
000019 1 (byte) feedback
00001a 1 (byte) frequency slide
00001b 1 (byte) panning