Every chunk here is optional. A player may ignore any of them. The envelope and text chunks are in the 1985 specification; the stereo and looping chunks were registered later by other companies.
ATAK and RLSE: envelopes
An envelope shapes the volume over a note. ATAK is the attack and
RLSE the release. Each chunk is a list of envelope points, one every six
bytes, so the number of points is the chunk’s size divided by 6.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | u16 | duration | the time this segment takes, in milliseconds; must be greater than 0 |
| 2 | 4 | Fixed | dest | the volume factor at the end of the segment; 1.0 is 0x00010000 |
The volume starts at 0 and steps through the ATAK points, holds at the
last dest as the sustain level, then steps through the RLSE
points. The release starts so that it ends when the note stops: the note’s end minus
the total RLSE duration. If the note is shorter than the release, the
attack is cut short. The envelope multiplies the header volume and any note volume.
In memory a list of points may be ended by a point with a duration of 0. In a file the size gives the count.
Text chunks
These hold ASCII text from 0x20 to 0x7E. The chunk’s size is
the number of characters, and an odd-length chunk has a pad byte after it.
| ID | Meaning | Type | Notes |
|---|---|---|---|
NAME | the name of the voice | property | before BODY; recommended under 256 characters |
AUTH | the author or creator | property | before BODY; recommended under 256 characters |
(c) | the copyright notice, the ID ending in a space | property | before BODY; recommended under 256 characters |
ANNO | free-text annotation | text | any number, anywhere; up to 231 − 1 characters in theory, about 32,767 in practice |
The properties can be shared through a PROP 8SVX in a LIST;
ANNO cannot.
The IFF registry also lists chunks usable inside any form, which an 8SVX file may
carry: TEXT, CHRS, CSET (character set),
UTF8, FVER (version string), JUNK,
HLID and INFO.
CHAN: stereo
A registered addition by David Jones of Gold Disk Inc.: one 32-bit value.
| Value | Name | Meaning |
|---|---|---|
| 2 | LEFT | a left channel, for Amiga audio channels 0 and 3 |
| 4 | RIGHT | a right channel, for Amiga audio channels 1 and 2 |
| 6 | STEREO | stereo, played on the channel pairs 0–1 and 2–3 |
With a value of 6, the BODY holds the left channel’s samples followed by
the right channel’s, equal in length.
PAN: position
A registered addition by the same author: one Fixed value,
sposition, from 0 to Unity. The chunk ID ends in a space.
Left volume = overall volume ÷ (Unity ÷ sposition). Right volume =
overall volume − left volume. A position of Unity is fully left, 0 is fully right and
Unity ÷ 2 is centred.
This section of the registered text gives Unity as 10000L, where the main
8SVX specification gives 0x10000L. It is taken here as a decimal slip.
SEQN: looping
A registered addition by Peter Norman of RamScan Software Pty Ltd. A list of pairs of
u32 values, each a start and an end offset into the waveform, longword
aligned. The number of loops is the chunk’s size divided by 8.
Sections play in the order listed, and a section listed twice plays twice. A sound
using SEQN sets oneShotHiSamples to 0. In stereo the same
offsets apply to both channels.
FADE: fading out
By the same author: one u32, the number of the loop at which the sound
starts to fade to silence. The rate of the fade is set by the bytes left and the
playback rate, so the volume reaches zero as the waveform ends.
The registered text gives the order CHAN, SEQN,
FADE, BODY, with SEQN and FADE last
before the body. A worked example from the text: a SEQN of 40 bytes holds
five loops. Its first pair, 00 00 00 00 00 00 0C 00, plays bytes 0 to
3,072 of the waveform. A FADE of 00 00 00 2D means fading
starts when loop 45 is reached.
How the viewer plays these chunks
The waveform previews play the plain samples at full scale, so that the bytes match the
file. When a voice has a volume other than Unity or any of ATAK,
RLSE, PAN , SEQN and FADE, the viewer adds a
preview titled “As played”, built by the rules above in this order:
- Material. With a
SEQN, the listed sections of the waveform one after another (sections are clipped to the waveform and empty ones dropped; in stereo the same offsets cut both halves). Without one: the lowest octave’s one-shot part followed by its repeat part repeated to about three seconds, or the plain octave when there is no repeat part. - Volume. The voice header’s
volume÷ Unity, held between 0 and 1. - Envelope. The whole preview is one note. The level starts at 0, runs in straight lines through the
ATAKpoints and holds the last one; the release starts at the note’s length minus the totalRLSEduration and runs through its points from the level reached (a note shorter than the release cuts the attack short). With noATAKthe level is 1 from the start; with noRLSEthere is no release. - Fade. From the start of the
SEQNsection thatFADEnames (counting from 1) the volume falls in a straight line to zero at the end of the last section. - Pan. A single array with a
PANbecomes two channels: left = volume ×sposition÷ Unity, right = volume − left. A stereo body ignoresPAN(the viewer says so); a mono body withCHANLEFT or RIGHT stays mono.
The maths is in explorer/formats/8svx/playback.js and is checked against values worked out by hand from these
texts (test-8svx-play.mjs). The texts leave some things open and the viewer chooses: the envelope’s sustain when
there is no ATAK (1.0), the shape of the fade (linear, as “stepping the volume down at a rate which will hit zero
volume just as the waveform finishes” says), and which octave plays (the lowest, which has the most samples). The specification
lets a player ignore or replace the envelope, so no player’s output is the reference.
Envelope example
A real bell sound has an attack of three points and a release of one:
| Bytes | Chunk | Meaning |
|---|---|---|
41 54 41 4B 00 00 00 12 | ATAK | 18 bytes: three points |
00 22 00 01 00 00 | 34 ms up to 1.0 (full) | |
00 7B 00 00 D8 00 | 123 ms to 0.84375 | |
00 5B 00 00 AF C8 | 91 ms to 0.6866 (45,000 ÷ 65,536), the sustain level | |
52 4C 53 45 00 00 00 06 | RLSE | 6 bytes: one point |
02 1F 00 00 00 00 | 543 ms down to 0 |
The note rises to full volume in 34 ms, falls to the sustain level over the next 214 ms, holds it, and when the note ends fades to silence over 543 ms.
SoundFX extensions
SoundFX (Stefan Kost, 1994 to 1997), an Amiga sample editor, writes FORM 8SVX files with extras that its own IFF-8SVX saver guide describes in these words:
“When SFX saves a sample in the 16-bit format it creates a ‘BITS’ chunk”, a ULONG with the number of bits, “8/16 bit so far supported”; and “the ‘CHAN’ chunk has been extended. With a data value of 30, it is a quadrosample.”
The saver module itself (disassembled) writes sCompression 0, 1 or 2 only. The guide lists the sample types it can save:
| SoundFX type | Guide’s words | sCompression written | The viewer |
|---|---|---|---|
| PCM8 | not compressed 8bit | 0 | decoded |
| PCM16c | not compressed 16bit combined | 0, with BITS 16 and LBDY | decoded (8SVX Combined) |
| PCM16 | not compressed 16bit | 0, with BITS 16 | decoded (SoundFX’s 16-bit forms) |
| FDPCM8_4 | FibonacciDelta (2:1) compressed 8bit | 1 | decoded (Fibonacci delta) |
| EDPCM8_4 | ExponentialDelta (2:1) compressed 8bit | 2 | decoded (exponential delta) |
| FDPCM16_6 | FibonacciDelta (8:3) compressed 16bit | 1, with BITS 16 | decoded (SoundFX’s 16-bit forms) |
| EDPCM16_5 | ExponentialDelta (16:5) compressed 16bit | 2, with BITS 16 | decoded (SoundFX’s 16-bit forms) |
The ratios give the codes of the 16-bit delta forms away (16 bits in 6 bits and in 5 bits). Their tables and packing are in no document; they were read from SoundFX’s own code and are written out under SoundFX’s delta codes, and the viewer decodes them, and the plain 16-bit words that go with BITS 16, that way. A quadro sample (CHAN 30) is four equal channels one after another (SoundFX’s channel 0, 1, 2, 3, each whole); which loudspeaker each belongs to the file does not say. A 16-bit delta channel has no padding codes: the last group is cut to its truncated byte size (SoundFX’s delta codes).
The viewer shows CHAN 30 by name and splits the body into four channels in that order.
Chunks registered for every form
These IFF chunks may appear in an 8SVX file as in any other form. The viewer reads the first group as text and labels the rest by their registered purpose.
| ID | Registered as | The viewer |
|---|---|---|
ANNO, AUTH, NAME, TEXT, (c) , CHRS | EA IFF 85 generic text chunks | shows the text |
FVER | the AmigaOS 2.0 version string ($VER:) | shows the text |
UTF8 | UTF-8 text | shows the decoded text |
JUNK | always ignore | names it; the bytes are shown |
CSET | the character set (Martin Taillefer): a CodeSet long (0 = ECMA Latin 1, the standard Amiga set) and seven reserved longs, 32 bytes | shows each field; flags a code set other than 0 |
HLID | HotLink identification (Soft-Logik, 1991): three longs, the publication ID in two parts and the publication version | shows each field |
INFO | data usually found in a .info file (a 1991 proposal by Chris Ludwig). The registry entry says only that; the contents are an Amiga icon file, a format of its own | opens it as an Amiga icon: the DiskObject and its gadget, drawer data, the images, the default tool, the tool types, and a colour icon (FORM ICON with FACE and IMAG or ARGB chunks); every picture in it is drawn (the classic bitplanes with the Workbench 2 pens of AmigaFFH’s amiga_palettes, since the file has no palette (a pen above 7 is drawn mid-grey, as no source defines it), and the NewIcon, IMAG, ARGB and png images) |
LBDY | SoundBox’s “8SVX Combined” chunk (Richard Koerber): the low byte of every sample, while BODY holds the high bytes; see the 16SV page | joins it with BODY into 16-bit samples when the lengths agree |
FRED | a private ASDG chunk: private by definition, so there is nothing published to describe | names it; the bytes are shown |
In the 400 real files checked, every file has VHDR and BODY.
The optional chunks found there were ANNO (385 files), NAME (240),
CHAN (141), ATAK and RLSE (7 each) and
AUTH (3).
Unknown chunks
A chunk whose ID is not listed on these pages is skipped by its size, as the IFF
standard says every reader must do. The viewer shows its ID, size and bytes and marks
it as a chunk 8SVX does not define. Extra bytes inside a known chunk after the fields
it defines (for example a VHDR longer than 20 bytes) are shown as unused
bytes and flagged.
Source: 8SVX IFF 8-Bit Sampled Voice (EA, 1985): Optional Text Chunks and Optional Data Chunks ATAK and RLSE (the EGPoint structure and the envelope algorithm); CHAN, PAN, SEQN and FADE: the registered supplements 8SVX.CHAN.PAN (David Jones, Gold Disk) and 8SVX.SEQN.FADE (Peter Norman, RamScan Software) on the same wiki page, including the raw SEQN and FADE examples. CSET, HLID, INFO: the IFF registry pages on that wiki. Numbers in the envelope example were recomputed by script.