These chunks are optional. A reader may ignore any of them. Offsets are from the start of a chunk’s data.
Pascal strings
A pstring is a byte giving the length, then that many characters. The
total must be even, so a pad byte follows when the count and the characters come to an
odd number; the count does not include the pad.
MARK: markers
Named positions in the sound data.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | u16 | numMarkers | the number of markers |
| 2 | varies | record | markers | the markers, in no particular order |
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | s16 | id | a positive number, unique in the file; 0 is not allowed |
| 2 | 4 | u32 | position | the place in sample frames: markers fall between frames, so 0 is before the first and 1 is between the first and second |
| 6 | varies | pstring | markerName | the name |
COMT: comments
Comments, each with a time and optionally tied to a marker. Apple’s AIFF-C documents
suggest this chunk rather than ANNO for comments.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | u16 | numComments | the number of comments |
| 2 | varies | record | comments | the comments |
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | timeStamp | the time, in seconds since 1 January 1904 |
| 4 | 2 | s16 | marker | the ID of a linked marker, or 0 |
| 6 | 2 | u16 | count | the length of the text |
| 8 | count | bytes | text | the comment, with a pad byte if needed for even length |
INST: instrument
Playback settings for a sampler. The chunk’s size is always 20.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 1 | s8 | baseNote | the MIDI note the sound plays unchanged at, 0 to 127; 60 is middle C |
| 1 | 1 | s8 | detune | the pitch offset in cents, −50 to 50 |
| 2 | 1 | s8 | lowNote | the lowest suggested note |
| 3 | 1 | s8 | highNote | the highest suggested note, inclusive |
| 4 | 1 | s8 | lowVelocity | the lowest suggested note-on velocity, 1 to 127 |
| 5 | 1 | s8 | highVelocity | the highest suggested note-on velocity, 1 to 127 |
| 6 | 2 | s16 | gain | the gain in decibels: 0 is unchanged and 6 doubles each sample point |
| 8 | 6 | record | sustainLoop | the loop played while a note is held |
| 14 | 6 | record | releaseLoop | the loop played in the release phase |
A loop:
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | s16 | playMode | 0 for no looping, 1 for forward, 2 for forward then backward |
| 2 | 2 | s16 | beginLoop | the marker that starts the loop |
| 4 | 2 | s16 | endLoop | the marker that ends it |
MIDI: MIDI data
A stream of MIDI data, mainly System Exclusive messages. A file may hold several of these chunks, preferably one per instrument.
AESD: audio recording
24 bytes, always. The AES channel status data from the recording, copied from the AES standard’s section 7.1. Bits 2, 3 and 4 of byte 0 give the recording emphasis.
APPL: application specific
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | ID | applicationSignature | the application’s four-character signature; Apple II software uses pdos |
| 4 | … | bytes | data | its own data; with the pdos signature, this starts with a Pascal string naming the application |
SAXL: sound accelerator
Inside Macintosh lists a sound accelerator chunk, meant to avoid the artefacts of starting to decompress part-way through a file, at a marker. The 1990–91 draft of AIFF-C marks it as tentative and unfinished, and no final form was published. Treat its contents as undefined.
| Field | Description, as in the draft |
|---|---|
numSaxels | an unsigned 16-bit count of the entries |
id | the marker the entry applies to |
size | the length of saxelData in bytes, without any pad byte |
saxelData | the compression-specific data, padded to even length |
The sizes of id and size were not confirmed.
Text chunks
| ID | Meaning | Number |
|---|---|---|
NAME | the name of the sound | at most one |
AUTH | the author | at most one |
(c) | the copyright notice; the c is lower case and a space follows the parenthesis | at most one |
ANNO | a comment; COMT is preferred | any number |
Other chunks in the wild
Software adds chunks the specification does not define. Readers skip what they do not know.
| ID | Use |
|---|---|
CHAN | Apple’s channel layout, as in CAF |
PEAK | peak values, used by libsndfile for float files |
basc | Apple Loops information, read by libsndfile |
ID3 | ID3v2 tags, read by FFmpeg |
wave | codec data for QDesign and QCELP audio, read by FFmpeg |
APCM | XA ADPCM audio, read by FFmpeg |
SFX! | skipped by libsndfile; contents not documented |