An 8SVX file is an IFF file. IFF, Electronic Arts’ Interchange File Format of 1985, is a run of chunks, each an ID, a size and data. All numbers in the file are big-endian, the byte order of the Amiga’s Motorola 68000 processor.
Chunk
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | ID | ckID | four ASCII characters that name the chunk |
| 4 | 4 | s32 | ckSize | the number of data bytes that follow, not counting this header or the pad byte |
| 8 | ckSize | bytes | ckData | the chunk’s data |
| … | 0 or 1 | byte | pad | a zero byte after data of odd length, so the next chunk starts on an even offset |
A reader treats ckSize as the end of the chunk, even when the chunk is
shorter or longer than it expects. It skips chunks it does not recognise by
ckSize, rounded up to an even number.
ckSize is declared a signed 32-bit number, so a size above
0x7FFFFFFF is invalid. A size that runs past the end of the file means the
file has been cut short.
Padding and alignment
Every chunk starts at an even offset from the start of the file. A chunk whose data
has an odd length is followed by one pad byte, which is normally zero and is not
counted in ckSize. The sample data is the usual case: a body of 8,001
samples has a ckSize of 8,001 and takes 8,002 bytes in the file. The pad
byte of the last chunk is inside the FORM, so the form’s size is even.
Some programs leave the last pad byte out, or write it but leave it out of the form’s
size. A reader that follows ckSize still reads the sound. The 8SVX viewer
on this site shows such a pad byte, or the missing one, as a problem and carries on.
FORM, LIST, CAT and PROP
The four group chunks have the same header as any chunk, then a four-character type.
| Group | Type field | Holds | Rules |
|---|---|---|---|
FORM | the form type: 8SVX | the chunks of one sound; may also hold nested FORM, LIST and CAT chunks | the type must not be a group ID and may not contain lower-case letters or punctuation |
LIST | a hint at the contents type | any number of PROP chunks, then FORMs and nested groups | all PROPs come first, at most one for each form type |
CAT | a hint at the contents type, JJJJ for mixed | FORM, LIST and CAT chunks joined together | no shared properties |
PROP | the form type the properties are for: 8SVX | property chunks (VHDR, NAME, (c) , AUTH, and others) | only directly inside a LIST; not ANNO or BODY, which are not properties |
The properties of a PROP 8SVX apply to every FORM 8SVX in the
LIST (and in lists inside it). A form’s own property chunk overrides the
shared one. A bank of voices that share one voice header, or the same copyright notice,
can therefore be stored as one LIST.
The viewer on this site opens every FORM 8SVX in a LIST or
CAT , gives each one the properties of the PROP 8SVX chunks
round it, and lists the voices in a table. It follows groups nested up to eight deep.
Chunk IDs
An ID is four characters from space (0x20) to tilde
(0x7E). It may end in spaces but may not start with them, and no control
characters are allowed. IDs are compared as exact 32-bit values, so case matters. A
form type, such as 8SVX, may not contain lower-case letters or
punctuation.
| Reserved ID | Meaning |
|---|---|
FORM | a form: a typed group of chunks |
LIST | a list of forms, which can share properties |
CAT | a concatenation of forms |
PROP | shared properties, inside a LIST |
| four spaces | filler |
LIS1–LIS9, FOR1–FOR9, CAT1–CAT9 | reserved for later versions of the group chunks |
The FORM chunk
A file is usually a single FORM chunk. Its data starts with the form type
and continues with the local chunks. The form type is part of the form’s data, so
ckSize counts it: the size of the form is the file length minus 8, unless
something follows the form.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | ID | ckID | FORM |
| 4 | 4 | s32 | ckSize | the size of everything after this field |
| 8 | 4 | ID | formType | 8SVX |
| 12 | … | chunks | local chunks | the chunks below, in the order described |
A FORM may also contain nested FORM, LIST and
CAT chunks. A LIST can hold PROP 8SVX chunks,
which give properties shared by the forms in the list, so a bank of sounds need not
repeat them. PROP chunks may not appear directly inside a
FORM.
Order of chunks
The 1985 specification defines these chunks and these rules:
| Chunk | Required | Position | Page |
|---|---|---|---|
VHDR | yes | before BODY | Voice header |
NAME, (c) , AUTH | no | before BODY, in any order | Other chunks |
ANNO | no | anywhere, more than once | Other chunks |
ATAK, RLSE | no | anywhere | Other chunks |
BODY | yes | after the properties above | Sample data |
A repeated property chunk is redundant, and only the last one counts. The later
stereo and looping chunks are registered additions:
CHAN, PAN , SEQN and FADE; see
Other chunks. Their
registrants list the order as CHAN, SEQN, FADE
and then BODY.
Example
The first 12 bytes of a file whose form holds 8,036 bytes after this size field:
| Offset | Bytes | Meaning |
|---|---|---|
| 0 | 46 4F 52 4D | FORM |
| 4 | 00 00 1F 64 | size 8,036 |
| 8 | 38 53 56 58 | 8SVX |
A whole file, byte by byte
A real one-shot sound of 10,476 samples, made by an Amiga sampler program. The sound is at 15,838 Hz, one octave, uncompressed, at full volume, with a name and an annotation. The two text chunks happen to be 20 bytes, an even number, so neither has a pad byte.
| Offset | Bytes | Meaning |
|---|---|---|
| 0 | 46 4F 52 4D | FORM |
| 4 | 00 00 29 4C | size 10,572: the file is 10,580 bytes |
| 8 | 38 53 56 58 | 8SVX |
| 12 | 56 48 44 52 00 00 00 14 | VHDR, 20 bytes |
| 20 | 00 00 28 EC | oneShotHiSamples 10,476 |
| 24 | 00 00 00 00 | repeatHiSamples 0 |
| 28 | 00 00 00 20 | samplesPerHiCycle 32 |
| 32 | 3D DE | samplesPerSec 15,838 |
| 34 | 01 | ctOctave 1 |
| 35 | 00 | sCompression none |
| 36 | 00 01 00 00 | volume 1.0, full |
| 40 | 4E 41 4D 45 00 00 00 14 | NAME, 20 bytes |
| 48 | 63 61 70 20 6F 6E and 14 zero bytes | “cap on”, padded with zeros to 20 characters |
| 68 | 41 4E 4E 4F 00 00 00 14 | ANNO, 20 bytes |
| 76 | 41 75 64 69 6F 20 45 6E 67 69 6E 65 65 72 and 6 zero bytes | “Audio Engineer”, padded with zeros |
| 96 | 42 4F 44 59 00 00 28 EC | BODY, 10,476 bytes |
| 104 | FD FD FD FE FF FF FF FE FC FC … | signed samples −3, −3, −3, −2, −1, −1, −1, −2, −4, −4 … |
Check: the form’s size is 4 for the type, plus 28 for VHDR, 28 for
NAME, 28 for ANNO and 8 + 10,476 for BODY, which
is 10,572.
FORM 16SV and FORM MAUD
Two sound forms that look like 8SVX are formats of their own, with their own pages:
16SV, the 16-bit form of 8SVX with SoundBox’s “8SVX Combined” LBDY chunk, and
MAUD, MacroSystem’s sampled sound with an MHDR header and an MDAT body of bit-packed samples.
Source: “EA IFF 85” Standard for Interchange Format Files (Electronic Arts, 1985): chunk and group layout, ID rules, reserved IDs, padding and the LIST, CAT and PROP rules; 8SVX IFF 8-Bit Sampled Voice (EA, 1985) for the chunk order and the regular expression. The 8SVX text was compared with EA’s own copy on the Amiga Developer CD 2.1 (Extras/IFF/Old_IFF_Packages/March_1986) by script.