AIFF is Apple's IFF container: a FORM header, a form type (AIFF or compressed AIFC), then chunks, all big-endian. It mirrors RIFF with the bytes flipped and COMM in place of fmt. The standout is the sample rate, stored as an 80-bit IEEE-754 extended float that Python's struct cannot unpack, reassembled by hand. Hover a field to light its bytes, click a + for its table. Color marks kind (see the key).
FORM wraps the lot; COMM and SSND are required, the rest optional. Big-endian sizes, word-aligned with a pad byte on odd lengths.
Byte for byte the shape of a RIFF header, and the opposite byte order.
Required in AIFC, absent in plain AIFF. One u32 timestamp naming the format version; the only defined value is 0xA2805140, the Mac epoch (seconds since 1904-01-01) encoding of 23 May 1990. Readers compare it exactly.
Channels, frame count, bit depth, and the 80-bit sample rate. AIFC adds a 4-char compression type and a pascal-string name after the rate; the type must be checked against the known set before any decode. See the byte map below.
Two fields sit between the chunk and its samples. Skipping them is the classic AIFF bug.
A verbatim 24-byte AES3 channel-status block. Byte 0 carries: bit 0 professional/consumer, bit 1 audio/non-audio, bits 2-4 emphasis, bits 6-7 sample rate (48000 / 44100 / 32000 / unindicated).
Apple Loops metadata: version, beat count, root key, scale, time signature. No official spec; layout field-verified against indexed loops. Tempo is not stored directly: bpm = beats / (frames / rate) * 60.
A 76-byte header comes first: a version at 0x00, two constants, a timestamp at 0x08, and the record count as a big-endian u32 at 0x48. Then one fixed record per transient, and nothing else -- payload length is always 76 + 24 × count.
The header is 76 bytes, not 100, and the difference is one whole record. The first record sits at 0x4C and its position is frame 0: the downbeat. Read the header as 100 bytes and the arithmetic still closes -- the payload divides evenly either way -- but the count the chunk states about itself no longer matches, and the transient that gets swallowed is the first one in the loop.
CoreAudio's AudioChannelLayout, byte for byte the payload of a CAF chan chunk. It says which speaker each channel drives, which COMM cannot: COMM counts channels and stops there.
The length counts the text. It does not count the byte that may follow it.
18 bytes for AIFF. Example: 2 channels, 88200 frames, 16-bit, 44100 Hz.