Besides fmt and data, a WAV file can carry any number of
optional chunks. They describe the audio without changing how it plays, and a reader
that does not know one simply skips it by its size. Every number in them is
little-endian.
Common chunks
The chunks with a page of their own:
| Chunk | Holds | Defined by |
|---|---|---|
fact | the number of sample frames, for compressed audio | the 1991 RIFF specification |
LIST INFO | text tags: title, artist, comments, date, software | the 1991 RIFF specification |
cue | markers at sample positions, with LIST adtl labels and the plst playlist | the 1991 RIFF specification |
smpl | root note, tuning and loop points for samplers | believed to be the MIDI Manufacturers Association (not confirmed) |
bext | broadcast details: description, originator, time reference, loudness | EBU Tech 3285, the Broadcast Wave Format |
chna | which Audio Definition Model track each channel carries | EBU Tech 3285 supplement 7 |
The others are described below. Among the files examined for this site, the most
common optional chunks were bext, iXML, FLLR,
LIST, fact, smpl and cue .
Filler: JUNK, junk, PAD and FLLR
These chunks hold nothing. In the words of the 1991 specification, a
JUNK chunk “contains no relevant data; it is a space filler of arbitrary
size”. Writers use filler to reserve room for metadata written later, to move the
samples to an aligned offset, or to leave space for a 64-bit size chunk: a recorder
that writes a 28-byte JUNK chunk first can turn the file into
RF64 if it passes 4 GB. Apple’s own system
sounds have such a 28-byte JUNK chunk first.
FLLR is written by Apple software, often with a filr chunk
beside it, whose purpose is not documented. PAD and lower-case
junk are also met. libsndfile skips them all, and so do other readers.
iXML
An iXML chunk holds production metadata as XML, written by field
recorders and location sound software: scene, take, track names, timecode and notes. Its
layout is set by the iXML specification, whose own pages (gallery.co.uk/ixml, read over plain HTTP
because their certificate has expired) are headed revision 3.01 of 28 October 2021. The root
element is BWFXML, a chunk may be UTF-8 or two-byte text with no marker, and its
length is made even. The element names below are those of the specification’s “Object
Details” and example pages, together with Sony’s ASWG-G006 extension and what real files from
Sound Devices, Zoom, Nuendo and Pyramix recorders and programs contain. The specification’s
example file usesEntireiXMLSpec.WAV was read in full.
| Element | Holds |
|---|---|
IXML_VERSION | the revision the writer follows, such as 1.27 or 3.01 |
PROJECT, SCENE, TAPE, TAKE, NOTE | project, scene, sound roll (tape), take and a free note |
TAKE_TYPE | new in iXML 2.0: a comma-separated list from the dictionary DEFAULT, NO_GOOD, FALSE_START, WILD_TRACK, PICKUP, REHEARSAL, ANNOUNCEMENT, SOUND_GUIDE; absent, empty or DEFAULT is a standard take. The dictionary may be expanded |
NO_GOOD, FALSE_START, WILD_TRACK, CIRCLED | TRUE or FALSE; the first three are deprecated since iXML 2.0 in favour of TAKE_TYPE |
PRE_RECORD_SAMPLECOUNT, FILE_UID, UBITS | the pre-record buffer in samples, a unique ID for the file, the timecode user bits |
SPEED | NOTE, MASTER_SPEED, CURRENT_SPEED and TIMECODE_RATE (fractions such as 24000/1001), TIMECODE_FLAG (DF or NDF), FILE_SAMPLE_RATE, AUDIO_BIT_DEPTH, DIGITIZER_SAMPLE_RATE, TIMESTAMP_SAMPLE_RATE and the start time as TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_HI and _LO (two 32-bit halves, as bext’s time reference) |
SYNC_POINT_LIST | SYNC_POINT_COUNT, then SYNC_POINT each with SYNC_POINT_TYPE (RELATIVE or ABSOLUTE), SYNC_POINT_FUNCTION, SYNC_POINT_COMMENT, SYNC_POINT_LOW, SYNC_POINT_HIGH (two 32-bit halves of a sample position) and SYNC_POINT_EVENT_DURATION (0 for a marker). The functions are PRE_RECORD_SAMPLECOUNT, SLATE_GENERIC, HEAD_SLATE, TAIL_SLATE, MARKER_GENERIC, MARKER_AUTOPLAY, MARKER_AUTOPLAYSTOP, MARKER_AUTOPLAYLOOP and GROUP_OFFSET (which must be RELATIVE) |
HISTORY | ORIGINAL_FILENAME, PARENT_FILENAME, PARENT_UID; Sound Devices files also have CURRENT_FILENAME |
FILE_SET | TOTAL_FILES, FAMILY_UID, FAMILY_NAME, FILE_SET_INDEX (1 to n for mono files, letters for polyphonic ones), and for a set that punches tracks in and out FILE_SET_START_TIME_HI and _LO |
TRACK_LIST | TRACK_COUNT, then TRACK each with CHANNEL_INDEX (the recorder’s channel), INTERLEAVE_INDEX (the channel’s place in each frame of the file, from 1), NAME, FUNCTION (a dictionary of about a hundred values such as M-MID_SIDE, L-5.1, LFE-GENERIC, W-SOUNDFIELD, ACN0-FOA and VIDEO) and DEFAULT_MIX (LEVEL in dB or OFF, PAN in degrees such as 23.5R), which is in the specification’s custom registry and not its official part |
LOCATION | LOCATION_NAME, LOCATION_GPS (decimal “latitude, longitude”), LOCATION_ALTITUDE, LOCATION_TYPE (INT, EXT or INT,EXT), LOCATION_TIME (SUNRISE, MORNING, MIDDAY, DAY, AFTERNOON, EVENING, SUNSET, NIGHT) |
LOUDNESS | the EBU R 128 measurements as floats: LOUDNESS_VALUE (LUFS), LOUDNESS_RANGE (LU), MAX_TRUE_PEAK_LEVEL (dBTP), MAX_MOMENTARY_LOUDNESS and MAX_SHORT_TERM_LOUDNESS (LUFS); a native iXML object because most readers ignore the BEXT copy |
BEXT | a redundant copy of the bext chunk for files that have none, or to repeat it: BWF_DESCRIPTION, BWF_ORIGINATOR, BWF_ORIGINATOR_REFERENCE, BWF_ORIGINATION_DATE, BWF_ORIGINATION_TIME, BWF_TIME_REFERENCE_LOW and _HIGH, BWF_VERSION, BWF_UMID, BWF_RESERVED, BWF_CODING_HISTORY and the five loudness values BWF_LOUDNESS_VALUE, BWF_LOUDNESS_RANGE, BWF_MAX_TRUE_PEAK_LEVEL, BWF_MAX_MOMENTARY_LOUDNESS, BWF_MAX_SHORT_TERM_LOUDNESS. The specification says it is essential that the values match the real bext chunk of a WAVE file |
USER | production and recorder details: FULL_TITLE, DIRECTOR_NAME, PRODUCTION_NAME, SOUND_MIXER_NAME, AUDIO_RECORDER_MODEL and similar |
ASWG | Sony’s extension for game audio (ASWG-G006, schema aswg_ixml_1_1.xsd): contentType, project, originator, loudness and about a hundred more |
The start time is the same number as bext’s time reference: in a Sound Devices file seen,
TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_LO is 2,190,940,753, and so is the time reference
of its bext chunk. Writers differ in the details: the same file writes the high half as
0000000000, and a Pyramix file stores the whole chunk as UTF-16 without a byte
order mark, padded with NULs. Other programs that add their own elements are common, and the
specification lets them.
The explorer lists every element with its path (BWFXML/TRACK_LIST/TRACK[2]/NAME),
what the name means, its text and its offset in the file, and says “not a name this explorer
knows” of any other. It reads UTF-16 without a mark and ignores trailing NULs. It reports
XML that is not well formed, a root that is not BWFXML, a TRACK_COUNT
or SYNC_POINT_COUNT that is not the number of elements, an index that is not a
number from 1, two tracks with the same INTERLEAVE_INDEX, one past the channels of the
format chunk, a TRUE/FALSE or DF/NDF value that
is neither, a sample rate or bit depth that differs from the format chunk, and a start time
that differs from bext’s time reference. It also reports a BEXT copy that differs from
the bext chunk (the text fields, the time reference halves, the version and the five loudness
values), a loudness value that is not a number, a speed or rate that is not integer over integer,
a LOCATION_GPS outside 90 and 180 degrees, a sync point position that is not below
232, a GROUP_OFFSET that is not RELATIVE, and notes in the
Meaning column a TAKE_TYPE, LOCATION_TYPE, LOCATION_TIME,
SYNC_POINT_FUNCTION or track FUNCTION that is not in the dictionary (the
specification lets writers extend the dictionaries, so that is a note and not a problem).
Checked against the specification’s own example file, the explorer finds every name and every
dictionary value as the text lists them and reports, correctly, that the example’s BEXT
copy and 24-bit, two-track description do not match the 16-bit mono file they sit in.
axml
An axml chunk holds XML metadata, defined for Broadcast Wave files in EBU
Tech 3285 supplement 5. It is used to carry Audio Definition Model (ADM) metadata, ITU-R
BS.2076, which describes what each track is and where its sound belongs, together with a
chna
chunk. The ADM sits in audioFormatExtended, usually inside the EBU Core
wrapper (ebuCoreMain, coreMetadata, format), as in
all the real files examined. Its parts, each with an ID attribute:
| Element | ID | Key attributes | Refers to |
|---|---|---|---|
audioProgramme | APR_xxxx | audioProgrammeName, audioProgrammeLanguage, start, end | audioContentIDRef |
audioContent | ACO_xxxx | audioContentName, audioContentLanguage | audioObjectIDRef |
audioObject | AO_xxxx | audioObjectName, start, duration, importance | audioPackFormatIDRef, audioObjectIDRef, audioTrackUIDRef |
audioPackFormat | AP_yyyyxxxx | audioPackFormatName, typeLabel, typeDefinition | audioChannelFormatIDRef, audioPackFormatIDRef |
audioChannelFormat | AC_yyyyxxxx | audioChannelFormatName, typeLabel, typeDefinition | holds audioBlockFormat elements |
audioBlockFormat | AB_yyyyxxxx_nnnnnnnn | rtime, duration; children position (coordinate azimuth, elevation, distance or X, Y, Z; optional bound), gain | |
audioStreamFormat | AS_yyyyxxxx | audioStreamFormatName, formatLabel, formatDefinition (0001, PCM) | audioChannelFormatIDRef, audioTrackFormatIDRef |
audioTrackFormat | AT_yyyyxxxx_zz | audioTrackFormatName, formatLabel, formatDefinition | audioStreamFormatIDRef |
audioTrackUID | ATU_xxxxxxxx (attribute UID) | sampleRate, bitDepth | audioTrackFormatIDRef, audioPackFormatIDRef |
The digits are hexadecimal. In AP_, AC_, AS_ and
AT_ IDs the first four (yyyy) give the type: 0001
DirectSpeakers, 0002 Matrix, 0003 Objects, 0004 HOA,
0005 Binaural, and a number up to 0x0FFF in the last four is a
common definition of ITU-R BS.2094 that need not be in the file. The explorer shows one
table for each element type, with the key attributes, the references, the block formats’
positions and the offset of each element, so every ID, reference and block is reachable. It reports
XML that is not well formed, an ID that does not have its form, a repeated ID, a
typeLabel or typeDefinition that disagrees with the ID, a reference to a
custom (0x1000 and above) element that the file does not define, an azimuth,
elevation, distance or Cartesian position outside its range, and any disagreement with the
chna chunk.
Checked on three real files that carry an ADM: the EBU ADM renderer’s 4-channel test file
(5 UIDs, moving object positions and direct-speaker bounds), a Pro Tools export of 14
tracks (374 block formats) and a Nuendo export of 34 tracks (28,522 bytes of XML). All
their IDs, references and chna entries agree, and the explorer reports nothing.
Nine plain XML files (eight from the EBU ADM renderer’s tests, one of them a schema
description and one a Matrix example, and one from libadm) were run through the same tables and checks. The element and attribute
names in the table are those these files use, and each was read in ITU-R BS.2076-3 (February 2025,
tables A1-26, A1-33, A1-41 and section 6). One of those test files (example5.xml) gives its programmes and
contents IDs of the forms APG_1001 and ACN_1001 instead of
APR_ and ACO_, and the explorer reports them. The block format’s other children in the files (cartesian,
width, height, depth, diffuse,
jumpPosition, speakerLabel, frequency) are listed in
the table’s Other column. The explorer also makes tables for the detail elements of BS.2076-3 and
checks them against it:
dialogue(anaudioObjectattribute and anaudioContentsub-element) is 0 (no dialogue), 1 (pure dialogue) or 2 (mixed), and the kind is the attributenonDialogueContentKind(0 to 3: undefined, music, effects, music and effects),dialogueContentKind(0 to 6: undefined, storyline dialogue, voiceover, spoken subtitle, audio description or visually impaired, commentary, emergency) ormixedContentKind(0 to 4: undefined, complete main, mixed, hearing impaired, complete main with audio description) according to the value;loudnessMetadata(inaudioContentandaudioProgramme) has the attributesloudnessMethod,loudnessRecType,loudnessCorrectionTypeand the sub-elementsintegratedLoudness,loudnessRange,maxTruePeak,maxMomentary,maxShortTerm,dialogueLoudnessand arenderer(attributesuri,name,versionandcoordinateMode, “polar” or “cartesian”);audioObjectInteraction, withonOffInteract(required),gainInteract,positionInteract,gainInteractionRangeandpositionInteractionRangewith theirboundof min or max. BS.2076-3 says it shall not be present unless the object’sinteractis 1; files made to BS.2076-2 or earlier may have it and readers ignore it, which the explorer words in its report;- HOA blocks:
orderanddegree(the degree within minus to plus the order),normalization(N3D, SN3D or FuMa, FuMa only up to order 3),nfcRefDistin metres,screenRefas a 0 or 1 flag, and the optionalequation; the pack holds defaults for the three that both elements have, and the block’s values take priority; - Matrix blocks: one
matrixwithcoefficientelements that each hold anaudioChannelFormatID and use at most one ofgainorgainVar,phaseorphaseVaranddelayordelayVar, withgainUnitlinear or dB, and an output channel (outputChannelFormatIDRef, oroutputChannelIDRefas written before BS.2076-3); Matrix packs haveinputPackFormatIDRef,outputPackFormatIDRef,encodePackFormatIDRefanddecodePackFormatIDRef; - Binaural channels are named
LeftEarorRightEar(leftEarandrightEarup to BS.2076-2) and have only the common block sub-elements; - time values in
start,end,duration,rtimeandinterpolationLengtharess.zzzzz,hh:mm:ss.zzzzz,zzzzzSffffforhh:mm:ss.zzzzzSfffff, with as many z as f in the long form (five decimal places are the advised minimum, and the explorer does not report fewer, because the EBU’s own test file writes three); a block ID isAB_yyyyxxxx_zzzzzzzzwith the digits of its channel format and a counter starting at 1;importanceis 0 to 10, flags are 0 or 1,maxDuckingDepthis 0 to −62 dB; - DirectSpeakers and Objects blocks (BS.2076-3 section 5.4.3, tables A1-11 to A1-19). Every sub-element of
a block is matched with a row of the tables that apply, which are chosen by the type and by the
cartesianflag, and the explorer reports a sub-element that is in none of them, an attribute that the row does not list, a count outside the row’s quantity and a value outside the row’s range. The common rows (A1-11, A1-12) aregain(gainUnitlinear or dB),importance(0 to 10),jumpPosition(a flag, withinterpolationLengthin the time format),headLockedandheadphoneVirtualise(bypassa flag,DRR−130 to 130 dB, section 9.5). DirectSpeakers with polar coordinates (A1-13): any number ofspeakerLabel, exactly onepositioneach for azimuth and elevation, at most one for distance, each with optionalminandmaxbounds, andscreenEdgeLock(left,right,toporbottom, on up to two positions); withcartesian1 (A1-14):cartesianitself, X and Y exactly once and Z at most once. Objects with polar coordinates (A1-17): azimuth −180 to 180 and elevation −90 to 90 once each, distance at most once,widthandheight0 to 360 degrees,depth0 to 1,objectDivergence0 to 1 withazimuthRange0 to 180 (positionRangeshall not be used) andzoneExclusionwith one or morezoneelements (minElevation,maxElevation,minAzimuth,maxAzimuth); withcartesian1 (A1-18): X and Y once and Z at most once,width,depthandheight0 to 1,positionRange0 to 1 (azimuthRangeshall not be present) and zones withminXtomaxZfrom −1 to 1. All Objects blocks also have (A1-19)diffuse0 to 1,channelLockas a flag withmaxDistance0 to 2√3 (section 10.2 of the Recommendation says 0 to 2, and the explorer accepts the table’s range) andscreenRefas a flag. Positions of −1 to 1 in Cartesian coordinates are recommended by section 8, and the explorer words its report that way. DirectSpeakers and Objects blocks each get a table of the decoded fields; alternativeValueSet(section 5.6.5, tables A1-27 and A1-32) inside anaudioObject: an IDAVS_wwww_zzzzwhosewwwwis the object’s and whosezzzzis unique in that object, only the sub-elementsaudioObjectLabel,audioObjectInteraction,gain,headLocked,positionOffsetandmute, and anaudioObjectInteractiononly when the object’sinteractis 1; analternativeValueSetIDRefin anaudioProgrammeoraudioContentmust name an alternative set that exists, and two references in one element must have differentwwww(sections 5.7.2 and 5.8.2).positionOffset(table A1-27) is checked in the object too: polar (azimuth, elevation, distance) or Cartesian (X, Y, Z) coordinates, not both;audioProgrammeReferenceScreen(section 5.8.3, tables A1-43 to A1-45): at most one in a programme, withaspectRatioabove 0,screenCentrePositionandscreenWidthwith either polar attributes (azimuth,elevation,distance0 to 1; a width of more than 0 and at most 180 degrees) or Cartesian attributes (X,Y,Zfrom −1 to 1; a width above 0 and at most 2), not both;profileList(section 5.10, tables A1-56, A1-57 and A1-60): at most one, with one or moreprofileelements, each holding the reference to the profile and having the attributesprofileName,profileVersionandprofileLevel, all required.
These checks were made against the Recommendation’s own “Sample code” fragments, which are copied into a
test after being found in its text, and the nine plain XML files above and the three real files. One of the EBU
renderer’s test files (example5.xml) uses block IDs that do not carry their channel format’s digits,
which section 6 says they shall, and the explorer reports it; the three real files still report nothing.
The explorer also checks the authoringInformation sub-elements and a renderer’s
uri (table A1-52). The block, alternative set, reference screen and profile list checks above
are compared with the text of the Recommendation by a script that reads the quantities, ranges and names
of every row of tables A1-11 to A1-19 from the text, and by tests that use the example values of the tables.
The libadm file libadm_simple_scene_itu.xml writes both azimuthRange and
positionRange on every polar objectDivergence, which table A1-17 says shall not
be done, and the explorer reports it.
XMP
A _PMX chunk holds an Adobe XMP packet, XML metadata as Adobe’s programs
write it. libsndfile calls it PMX_. The explorer shows it as text.
ID3
An ID3 or id3 chunk holds an ID3v2 tag, as MP3 files
carry: the letters ID3, a version, flags and a syncsafe size, then frames
such as title, artist and attached pictures. Files tagged by Soundminer carry ID3v2.3
tags with pictures. The explorer lists the text frames.
An ID3v1 tag, 128 bytes starting TAG, is sometimes appended after the end
of the RIFF chunk, as on an MP3 file. RIFF readers ignore it; libsndfile and the explorer
recognise it.
inst
The instrument chunk gives a sampler the note and velocity range to play a sample on. It is 7 bytes, so a pad byte follows.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 1 | u8 | bUnshiftedNote | the MIDI note the sample plays unchanged at; 60 is middle C |
| 1 | 1 | i8 | chFineTune | fine tuning in cents, −50 to 50 |
| 2 | 1 | i8 | chGain | the suggested gain in decibels |
| 3 | 1 | u8 | bLowNote | the lowest note to play it on |
| 4 | 1 | u8 | bHighNote | the highest note |
| 5 | 1 | u8 | bLowVelocity | the lowest velocity, 1 to 127 |
| 6 | 1 | u8 | bHighVelocity | the highest velocity |
Where the chunk was first defined is not confirmed. The explorer reports a note above 127, a fine tune outside −50 to 50, a lowest note or velocity above the highest, and a velocity outside 1 to 127.
acid
Sony’s ACID loop chunk gives a loop’s tempo and length, so music software can fit it to a song. It is not published; this is the 24-byte layout libsndfile reads. FL Studio loops carry it.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | flags | 0x01 one-shot rather than a loop, 0x02 the root note is set, 0x04 stretch is on |
| 4 | 2 | u16 | root note | the MIDI note of the loop, when flag 0x02 is set |
| 6 | 2 | u16 | unknown | not documented |
| 8 | 4 | f32 | unknown | not documented |
| 12 | 4 | u32 | beats | the length of the loop in beats |
| 16 | 2 | u16 | meter denominator | libsndfile reads the denominator before the numerator, and doubts the order (“are we sure about the order??”) |
| 18 | 2 | u16 | meter numerator | the other half of the time signature |
| 20 | 4 | f32 | tempo | beats a minute |
PEAK
The peak chunk gives the loudest sample of each channel, so a program need not scan the file. This is the layout libsndfile reads.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | dwVersion | 1 |
| 4 | 4 | u32 | dwTimeStamp | when the peaks were measured; libsndfile writes seconds since 1970 |
| 8 | 8 each | record | peaks | for each channel: the value (f32), the highest absolute sample, then its frame (u32) |
libsndfile reads 4-byte positions, though its own writer writes 8-byte ones.
cart
The cart chunk is AES46 CartChunk (AES46-2002, “Radio traffic audio delivery
extension to the broadcast-WAVE-file format”), used by radio automation systems to carry the
traffic data of a cut: what it is, who it is for and when it may air. It is at least 2,048
bytes, then the free TagText. The layout below is that of the standard’s section 6.2.1
and table 5, read from a copy of the 2002 printing, and the sample file of cartchunk.org reads
as it says. Text fields are ASCII, padded with NULs, left justified, and a short string ends
with a NUL; numbers are little-endian.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | char[4] | Version | four digits: 0101 is version 01.01 |
| 4, 68, 132, 196, 260, 324, 388 | 64 each | char[64] | Title, Artist, CutID, ClientID, Category, Classification, OutCue | the cut’s title and artist, its number in the station’s system, the client, category and classification, and the closing words for announcers |
| 452 | 10 | char[10] | StartDate | the first date it may air, YYYY-MM-DD with hyphens (ISO 8601); 1900-01-01 means start at once. cartchunk.org’s sample writes 1900/01/01, which the standard does not allow |
| 462 | 8 | char[8] | StartTime | the time on that date, hh:mm:ss |
| 470 | 10 | char[10] | EndDate | the last date it may air (the sample has 2099/12/31) |
| 480 | 8 | char[8] | EndTime | the time on that date |
| 488, 552, 616 | 64 each | char[64] | ProducerAppID, ProducerAppVersion, UserDef | the program that made the file and its version; free for the user |
| 680 | 4 | u32 | dwLevelReference | a signed 32-bit sample value that is the 0 dB reference level of the originating system, 32768 (0x8000) for a 16-bit system whose meters read 0 at full scale (the sample has 32768) |
| 684 | 8 × 8 | record | PostTimer | eight timers: a four-character usage and a u32 position in samples (the sample uses MRK at 112,000, SEC1 at 152,533 and EOD at 201,024) |
| 748 | 276 | bytes | Reserved | zeros |
| 1024 | 1024 | char[1024] | URL | a URL (RFC 1738 syntax) referencing or referenced by the audio program |
| 2048 | the rest | char[] | TagText | free text for scripts or tags: strings each ending CR LF |
The timer usages are those of the standard’s annex A.2, table A.2. The first three letters are
SEG (segue), AUD (audio boundary), INT (introduction),
OUT (epilog), SEC (secondary), TER (tertiary),
MRK (generic marker) or EOD (end of data). A timer may be qualified
by a lower-case s or e for a start or end (AUDs is the
start of audio after silence, AUDe its end), by a digit to number it
(SEC1, SEC2), or by repeating the same usage. The table allows start and end
forms for all but MRK and EOD, digits for all but AUD and
EOD, and repeats for all but AUD. An unused timer has a usage of four NULs and a
value of 0. The units are samples at the audio’s sampling frequency, counted from the first
sample, and the range is 232. How a system acts on a timer may depend on the
site or the implementation.
The explorer shows each field with its offset and the timers as a list. It reports a version
that is not four digits, a date with other than hyphens or a time with other than colons,
a month, day, hour, minute or second out of range, a URL without a scheme, reserved bytes that
are not zero, and a timer usage that is not in table A.2, that has an s, e
or digit the table does not allow it, or that repeats where the table allows no repeat
(AUD).
Checked on cartchunk.org’s CC_0101.WAV, a 16-bit 32 kHz stereo file with a
bext chunk and a version 01.01 cart chunk of 2,568 bytes: every
field reads as its description says (Title “Cart Chunk: the traffic data file
format for the Radio Industry”, CutID “DEMO-0101”, OutCue “the
Radio Industry”, the three timers, and a TagText of CR LF lines). The explorer’s
only reports on it are the two dates written with slashes. The field names, order and widths of the
standard’s structure were compared by script with the viewer’s reading of this file. ffprobe reads only the bext chunk of it, not the
cart chunk.
levl
The levl chunk, from EBU Tech 3285 supplement 3 (2001), is a peak
envelope: a header and the peak values of blocks of samples, so an editor can draw the
waveform without reading the audio. Every field below was read in the supplement
(a header of 128 bytes counting the ID and size, then the peak points). dwPosPeakOfPeaks
is the audio frame of the first sample with the file’s largest absolute value, or
0xFFFFFFFF if unknown; dwOffsetToPeaks is the offset of the peak data from the start of the
header, usually the header’s size or more to reach a DWORD boundary; strTimestamp is a C
string “YYYY:MM:DD:hh:mm:ss:uuu” with milliseconds; for two points to a value the second is the
negative peak stored as a positive number. The explorer flags a format other than 1 or 2, a
points-to-a-value other than 1 or 2, an offset below the header, a time stamp not in that form,
non-zero reserved bytes, and a header that does not add up to the peak data that follows.
| Size | Field |
|---|---|
| 4 | dwVersion |
| 4 | dwFormat: 1 unsigned 8-bit, 2 unsigned 16-bit |
| 4 | dwPointsPerValue: 1 positive peak, 2 positive and negative |
| 4 | dwBlockSize: audio frames for each peak |
| 4 | dwPeakChannels |
| 4 | dwNumPeakFrames |
| 4 | dwPosPeakOfPeaks |
| 4 | dwOffsetToPeaks |
| 28 | strTimestamp |
| 60 | Reserved |
| the rest | The peak values |
DISP
A DISP chunk holds something to show for the file: a Windows clipboard
format number (u32: 1 is text, CF_TEXT; 8 is a bitmap, CF_DIB),
then the data in that format. The explorer reads the number and shows text as text.
CSET
A CSET chunk gives the character set of the file’s text chunks: four u16
fields, wCodePage, wCountryCode, wLanguage and
wDialect. The explorer shows these numbers; it does not re-read other
chunks’ text in that code page.
mext
The mext chunk, from EBU Tech 3285 supplement 1, describes MPEG audio in
the file (MPEG layer 1 or 2). Its ckSize is given as 000C, 12 bytes: u16 flags
SoundInformation, u16 FrameSize, u16
AncillaryDataLength, u16 flags AncillaryDataDef, and 4
reserved bytes that must be NULL, all as the supplement’s section 2.1 gives them.
SoundInformation: bit 0 is 1 for homogeneous sound data (frames with the same
header apart from the padding bit, the mode and its extension and the private bit) and 0 for
non-homogeneous; bit 1 is 0 when the padding bit is used in the file and so may alternate and 1
when it is 0 throughout (the supplement’s own order); bit 2 is 1 for a sequence of frames with the
padding bit 0 at 22.05 or 44.1 kHz; bit 3 is 1 for free format. Bits 1 and 2 apply to homogeneous
files only. FrameSize is the nominal frame size for a homogeneous file, 0 otherwise: the
same as nBlockAlign without padding, or the size with the padding bit 0 (a padded frame is
one byte longer, four for layer 1). AncillaryDataLength is the least number of known
ancillary bytes in the whole file, from the end of the frame. AncillaryDataDef: bit 0
energy of the left channel (the energy of the mono frame in a mono file), bit 1 a private byte, bit 2
energy of the right channel; bits 3 to 5 are reserved for ADR, DAB and J.52 data and bits 6 to 15 are
0. The items are stored from the back of the ancillary data towards the front, in bit order, and an
energy is a 15-bit big-endian value, the largest absolute sample in the frame. The explorer
decodes the flags, and reports undefined bits, bits 1 and 2 on a non-homogeneous file, non-zero
reserved bytes and a size other than 12; it does not read the energies out of the audio frames.
qlty
The qlty chunk, from EBU Tech 3285 supplement 2 (July 2001), is a capturing
report made by an archive digitising workstation, next to the coding history of the
bext chunk. It starts with two 32-bit file security codes, FileSecurityReport
(a checksum of the quality chunk) and FileSecurityWave (a checksum of the wave data),
followed by rows of ASCII text of at most 256 characters, each ending CR LF, made of variables
K=value separated by commas (a variable has no comma; semicolons separate inside it). The
first variable names the part of the report:
| Row starts | Part | Variables |
|---|---|---|
B= | basic data | CS copying station (64), AN archive number (32), TT title or take (256), TD duration hh:mm:ss:d, DD date of digitisation yyyy:mm:dd, OP operator (64) |
SM= | start of modulation | the time hh:mm:ss:d, T comment, SC sample address (hexadecimal with a trailing H, such as 34BC0H, at most FFFFFFFFH) |
Q= | a quality event | Q number (M### by the operator, A### by the system, 001 to 999), PRI priority 1 (low) to 5 (high), TS time stamp, E event type (16), S status (16), T, SC |
EM= | end of modulation | the time, T, SC |
P= | quality parameters | QP: a parameter: MaxPeak, MeanLevel, Correlation, Dynamic, ClippedSamples, SNR, Bandwidth, Azimuth, Balance, DC-Offset, Speech, Stereo; QF the summary quality factor 0 to 5 (best); IN inspector (64); FS file status Y, N or U |
T= | operator comments | one comment (256) |
C= | the cue sheet | C cue number (N###), TS, T, SC |
The explorer reads the two codes, shows the report as text and as a table of rows, parts and variables, and reports a row that does not start with one of those keys, a variable the part does not define, a time, date, event number, priority, quality factor, status or sample address that is not in the form above, a parameter name the supplement does not list, a row over 256 characters and a row not ended CR LF. The supplement gives no algorithm for the two security codes, so they are shown and not checked. The fifteen example rows of its section 5.1 (digitisation of an analogue tape) read without a problem once the placeholders for the date and the duration are filled in.
link
The link chunk, from EBU Tech 3285 supplement 4 (April 2003), links the files of a
set that holds one continuous signal split over several files, to get round the 4 GB (in practice
2 GB) limit. After the ID and the size, the data is XML 1.0: a LINK root with one or more
FILE elements, each with a type attribute (actual for the file
that holds the chunk, other for the rest), a FILENUMBER (1, 2, 3 in
chronological order) and a FILENAME; then optionally an ID, shared by every
file of the set, and a PRIVATE element of any XML. If a file is renamed, the
FILENAME entries of every file’s chunk must be changed. The explorer shows the text and
reports XML that is not well formed, a root that is not LINK, elements or a
type outside this DTD, an order other than FILE, ID, PRIVATE, not exactly one
actual file and numbers that are not 1, 2, 3 in order; a chunk that does not start
with < is shown as bytes. The three chunks of the supplement’s Caruso example read
without a problem.
dbmd
The dbmd chunk, from EBU Tech 3285 supplement 6 (October 2009, for Dolby’s version
1.0.0.6), holds Dolby audio metadata, all little-endian. A 32-bit version
(the dotted version number one byte a part: 1.15.2.0 is 0x010F0200) is followed by metadata segments,
each a u8 metadata_segment_id (0 ends the run), a u16 metadata_segment_size
(0 means 65,535), the payload and a u8 checksum, then a pad byte if needed to make the chunk even.
The ids are 1 Dolby E, 3 Dolby Digital, 7 Dolby Digital Plus and 8 Audio Info; 2 and 4 to 6 are
reserved and 9 to 255 are reserved for future extension. The checksum is the two’s complement of
the low eight bits of the size plus every payload byte.
Payload sizes from the supplement’s syntax tables, and the explorer checks each: Dolby E 118
bytes (program_config, frame_rate_code, 2 reserved, an 8-byte
e_SMPTE_time_code in BCD with a drop-frame flag and an hours value of 0x3F for invalid,
1 + 25 reserved, 80 for future use); Dolby Digital 69 bytes (ac3_program_id,
program_info, datarate_info, surround_config, dialnorm, language,
production, extended BSI and compression words, 21 for future use and a 32-byte programme
description); Dolby Digital Plus 96 bytes; Audio Info 70 bytes (program_id,
program_origin, six little-endian 32-bit floats, two speech percentages, the product and
operation codes and two 64-bit times in seconds since 1970, with 22 bytes for future use). The explorer
decodes the Dolby E program_config (table 5, the 24 programme layouts and the value 63),
frame rate (table 6) and timecode; the program_info of Dolby Digital and Dolby Digital Plus
(low-frequency effects, bitstream mode and audio coding mode, tables 9, 10, 28 and 29) and the
Dolby Digital data rate (table 11); and the Audio Info origin, levels, speech percentages and dates.
It checks the checksum of every segment and reports a segment size other than the table’s, a reserved
id (2, 4, 5 or 6), and bits the supplement says are zero. It reads the chunk this way only when the
segments add up exactly.
Every byte of the Dolby Digital (Table 8) and Dolby Digital Plus (Table 27) payloads is a node, and a
byte made of bit fields has a child node for each field, most significant bit first, with the name the
supplement gives it (Dolby Digital names start with ac3_), what its bits are and what the
value means in the supplement’s table. As elsewhere in the explorer, the first field of a byte covers the
byte and the others cover none, their text says which bits they are. The layout of the bytes, with the
sections of supplement 6 that describe each:
| Byte (Dolby Digital section, Dolby Digital Plus section) | Bits and fields | Tables (Dolby Digital, Dolby Digital Plus) |
|---|---|---|
ac3_program_id (4.2.1) | 7 to 5: 0; 4 to 0: ac3_program_id, 0 to 7, or 31 for “ignore” | |
program_info (4.2.2, 4.3.2) | 7: 0; 6: lfeon; 5 to 3: bsmod; 2 to 0: acmod (000 is reserved) | 9, 10; 28, 29 |
datarate_info (4.2.3) | 7 to 5: 0; 4 to 0: ac3_datarate, 19 to 30 reserved, 31 not specified | 11 |
surround_config (4.2.4, 4.3.3) | 7 to 6: 0; 5 to 4: cmixlev; 3 to 2: surmixlev; 1 to 0: dsurmod | 12, 13, 14; 30, 31, 32 |
dialnorm_info (4.2.5, 4.3.4) | 7: langcode; 6: copyrightb; 5: origbs; 4 to 0: dialnorm, 1 to 31 dB below full scale, 0 read as 31 | |
langcod (4.2.6, 4.3.5) | the whole byte: the language, in Table 7-7 of ATSC A/52, which the supplement points to and does not reproduce; Dolby Digital Plus default 0 | |
audio_prod_info (4.2.7, 4.3.6) | 7: prodie; 6 to 2: mixlevel, 80 plus the value dB SPL (80 to 111); 1 to 0: roomtyp | 15; 33 |
ext_bsi1_word1 (4.2.8, 4.3.7) | Dolby Digital: 7: 0; 6: xbsi1e; 5 to 3: lorocmixlev; 2 to 0: lorosurmixlev. Dolby Digital Plus: 7 to 6: 0; 5 to 3 and 2 to 0 the same two fields | 16, 17; 34, 35 |
ext_bsi1_word2 (4.2.9, 4.3.8) | 7 to 6: dmixmod; 5 to 3: ltrtcmixlev; 2 to 0: ltrtsurmixlev | 19, 20, 21; 36, 37, 38 |
ext_bsi2_word1 (4.2.10, 4.3.9) | 7: xbsi2e (Dolby Digital) or 0 (Dolby Digital Plus); 6 to 5: dsurexmod; 4 to 3: dheadphonmod; 2: adconvtyp; 1 to 0: 0 | 22, 23, 24; 39, 40, 41 |
compr1, dynrng1 (4.2.11, 4.2.12, 4.3.10, 4.3.11) | one byte each: the RF compression profile and the Line mode compression profile, 0 to 5 defined and 6 to 255 reserved | 25, 26; 42 (the supplement lists no values for Dolby Digital Plus dynrng1: its text says “See Table 43”, which is the stream type table) |
ddplus_info1 (4.3.12) | 7 to 4: 0; 3 to 2: stream_type; 1 to 0: 0 | 43 |
datarate (4.3.13) | a 16-bit value, the data rate in kbit/s, 0 for not available; at most 1,532 kbit/s is recommended and each audio coding mode has a recommended minimum | 44 |
program_description_text (4.2.13) | 32 bytes of ASCII ended by 0x00; what follows the 0x00 is ignored |
The explorer reports a code the supplement’s table calls reserved or invalid (for example cmixlev
11 in Table 12, bsmod 111 with acmod 000 in Table 9, a Dolby Digital data rate of 19
to 30 in Table 11, compression profiles 6 to 255), a byte that is not 0 where the supplement shows 0, an
ac3_program_id from 8 to 30, a non-ASCII character in the description text, and a Dolby Digital
Plus data rate above 1,532 kbit/s or below the minimum of Table 44 for its audio coding mode (1/0 32, 2/0 64,
3/0 and 2/1 107, 3/1 and 2/2 149, 3/2 160 kbit/s). A field that the supplement’s notes say has a meaning only
for some audio coding modes (the centre mix levels for 3/0, 3/1 and 3/2, the surround mix levels for modes
with a surround channel, the Dolby Surround EX mode for 2/2 and 3/2, the Dolby Headphone mode for 2/0) is
marked when the file’s acmod is another one, and the fields of the extended bitstream
information are marked when xbsi1e or xbsi2e is 0. Bitstream mode 111 reads as
voice over with acmod 001 and karaoke with 010 to 111 (Tables 9 and 28). The supplement cites
“Table 18” for the stereo down-mix mode in 4.2.9.1, but the table is captioned Table 19, which is the number used
here.
LIST exif
A LIST of type exif holds tags from the Exif audio
specification, as libsndfile lists them: ever (Exif version),
erel (related image file), etim (creation time),
ecor (manufacturer), emdl (model name), emnt
(maker’s note) and eucm (user comment). The explorer shows each by name.
Other chunks of the 1991 specification
The plst playlist and LIST adtl labels are on the
cue page, the
CSET character set chunk on the
LIST INFO page,
and the wavl list with its slnt silence chunks on
Sample data.
Vendor chunks read from real files
No specification, and no open-source reader or writer, describes the chunks below
(SoX, GStreamer, Wine, FFmpeg, libsndfile, MediaInfo, ExifTool, BWF MetaEdit and
Kaitai name some of the IDs and give no layout). The layouts were worked out from
real files: 9,280 WAVE files were scanned for chunk IDs, and for each chunk the
fields were compared with the audio or with another chunk of the same file. Each
field is marked verified (recomputed from the audio, or confirmed by
a second chunk), inferred (the same in every file seen, no second
check) or unknown. All numbers are little-endian unless said. The
Pro Tools and Logic files examined are Apple’s system sounds and sample libraries;
Pro Tools and Logic themselves were not run. The Logic Pro chunks (LGWV,
ResU, TruS, ovwf reading) were later also read in
Apple’s own code: these four-letter IDs are not stored as text, but as two 16-bit
constants in the arm64 code of MAFiles.framework (functions
ReadOverviewFromAudioFile, WriteOverviewToAudioFile,
MDOverview::Add) and MAMusicAnalysis.framework
(ReadGenericDataChunkFromAudioFile); the same code is in GarageBand and Final Cut Pro.
Where a field below says “Apple’s code”, that is the source; the program was
only read, never run. Source: these files
(the scripts are in the project’s scripts/wav folder).
The chunks that Pro Tools writes (minf, umid, regn,
elm1, DGDA, filr, CDif) and Soundminer’s
SMED were searched for in Logic Pro, GarageBand, Final Cut Pro and FL Studio and are
not read or written by any of them (the only minf in them is the QuickTime atom of that name), so
Apple’s programs cannot settle the fields marked unknown or inferred for those chunks.
minf (Pro Tools): 16 bytes
| Offset | Size | Type | Name | Description | Status |
|---|---|---|---|---|---|
| 0 | 8 | u64 | FILETIME | 100 ns steps since 1601-01-01 UTC: the time the file was made. Equals the bext origination date and time to the second (the zone is the time zone of the machine) in the Pro Tools files that have bext | verified |
| 8 | 4 | u32 | flag | 0, 1 or 2 in the files seen; the meaning is not known | unknown |
| 12 | 4 | u32 | reserved | 0 in every file | inferred |
umid (Pro Tools): 24 bytes
| Offset | Size | Type | Name | Description | Status |
|---|---|---|---|---|---|
| 0 | 4 | u32 | reserved | 0 | inferred |
| 4 | 4 | bytes | marker | the number 42, as 00 00 00 2A in files from some Pro Tools and 2A 00 00 00 in files from others; meaning not known | inferred |
| 8 | 8 | bytes | material ID | equal to bytes 16 to 23 of the bext UMID (the first half of its material number) and to the ID in regn | verified (all files that have a bext UMID) |
| 16 | 8 | bytes | reserved | zero | inferred |
regn (Pro Tools): 92 bytes
| Offset | Size | Type | Name | Description | Status |
|---|---|---|---|---|---|
| 0 | 4 | u32 | version | 1 | inferred |
| 4 | 4 | u32 | reserved | 0 | inferred |
| 8 | 4 | bytes | marker | 42, in either byte order, as in umid | inferred |
| 12 | 8 | bytes | material ID | as in umid; zero when the region has none | verified |
| 20 | 8 | bytes | reserved | zero | inferred |
| 28 | 4 | u32 | region length | in sample frames; equal to the frames in data in the files as Pro Tools exported them (differs where another program trimmed the audio) | verified |
| 32 | 12 | bytes | reserved | zero | inferred |
| 44 | 8 | u64 | start | the region’s start on the timeline in frames; equals the bext time reference where both are set | verified |
| 52 | 8 | u64 | second position | equal to the start in most files and 0 in others | unknown |
| 60 | 32 | Pascal string | region name | a length byte and up to 31 characters (Pro Tools drops vowels to fit); the bytes after the text are leftovers and are ignored | inferred |
ovwf (Pro Tools): overview waveform
Seven u32 values, then pairs of signed bytes. Header: version 1, the chunk size minus
4, 1, 256 (frames a point: verified), 8 (bits: inferred), 1, and the
number of points (verified: the number of 256-frame blocks, in some files rounded up
to a multiple of 8 with 0, 0 pairs). Each point is (maximum,
minimum) of the audio’s first channel over its 256 frames,
scaled to 8 bits by taking the top byte. Two writer behaviours were seen and both
reproduce every point of the audio: the SoundGrinder file rounds down (floor) and takes the range as found; the other files truncate toward
zero and start the range at 0 (so the maximum is never below 0 and the minimum never
above 0). Verified against the audio in 12 files (all points equal); the explorer
compares the points with the audio and says how many agree. Other channels are not
stored. Source: the audio of the same files, recomputed by
scripts/wav/ovwf-verify.mjs.
Logic Pro, GarageBand and Final Cut Pro read this chunk too (MAFiles.framework,
ReadOverviewFromAudioFile, arm64 code): when a WAVE file has no LGWV chunk they look for
ovwf, accept it only if its size is exactly 28 + 2 × ceil(frames ÷ 256) bytes (so a
chunk padded to a multiple of 8 points is ignored), do not look at any of the seven header words, and swap each
pair to (minimum, maximum). This confirms the pair order (maximum first) and the 28-byte header; the meaning
of the header words themselves is still only inferred. Source: Apple’s code (read, not run).
elm1 (Pro Tools)
214, 242, 338 or 15,574 bytes, all zero in all 150 chunks found: a reserve of space. No content is known.
DGDA (Pro Tools): analysis data
Nested records, the same framing at every level: an ASCII name (one of six, no length
byte and no terminator), a u16 kind, a u32 payload size and the payload. The chunk is
u32 4, u16 1, one AnalysisSetsHdr record, then zero padding. Verified by
parsing the sizes of 17 files exactly:
AnalysisSetsHdr(kind 4; 3 in one Pro Tools build): u32 set count, then that manyAnalysisSetrecords (one for a mono file, two for stereo), then 4 or 12 bytes.AnalysisSet(kind 2): u16 index, onePacketStreamSetHdr.PacketStreamSetHdr(kind 1): u32 1, u32 stream count (2), then onePacketStreamIndxHdr, onePacketStreamIndxand onePacketStreamDatarecord for each stream, in that order of kinds.PacketStreamIndxHdr(kind 4, 52 bytes): a 16-byte stream ID, u32 0, an unknown u32, the data size (verified: the size of the stream’sPacketStreamData), 12 zero bytes, the data size divided by 4 (verified), 8 zero bytes.PacketStreamIndx(kind 3, 16 bytes): u32 4, an unknown u32 (256 or 16384), 8 zero bytes.PacketStreamData(kind 1): the stream’s data, 16-bit values that look like a waveform; the coding is unknown.
The meaning of the kinds, of the stream IDs and of the packet data is unknown. Source:
the files; scripts/wav/dgda-parse.mjs.
LGWV (Logic Pro): waveform overview
| Offset | Size | Type | Name | Description | Status |
|---|---|---|---|---|---|
| 0 | 4 | u32 | frames | the frames the overview was made for; equals the frames in data in 20 of 28 files (the audio was edited in the others) | verified |
| 4 | 4 | u32 | modification date | the audio file’s modification date when the overview was made, in seconds since 1 January 1904 UTC (the low 32 bits of a Mac UTCDateTime). Apple’s code: WriteOverviewToAudioFile stores it; ReadOverviewFromAudioFile compares it with the file’s current date and drops the overview if they differ; the writer restores the file’s date afterwards. Files seen: equal to the file date in 1 of 36, within a minute (later) in 10, exactly one hour off in 2 (a time-zone or summer-time shift); the other 23 files were copied or touched later | verified |
| 8 | 2 × points | i8 pairs | points | (minimum, maximum) as signed 8-bit values for each 256 frames; the number of pairs is the frames field divided by 256, rounded up. Each block starts at 0 (minimum ≤ 0 ≤ maximum). A sample is cut to its top 8 bits by flooring. Mono and 3 or more channels: minimum and maximum over all samples of all channels. Stereo: the maximum is the largest absolute 8-bit value of the left channel only, the minimum minus the largest absolute value of the right channel only. Limited to ±127. Recomputed from the audio: all pairs equal in 28 of 36 files (25 stereo 24-bit, 1 stereo 16-bit, 2 mono 16-bit); the other 8 are Apple system sounds whose audio differs from the overview (length differs or the audio was changed afterwards). Apple’s code (MDOverview::Add) has the same left/right rule but adds half a step before dividing (rounds half up) instead of flooring; the files follow the floor, so the rounding of newer versions is not confirmed | verified |
When a file cannot hold chunks, Apple’s code keeps the same bytes in a side file with the
extension .ovw next to the audio (the first two fields in big-endian order unless the
file is a WAVE file). In a CAF file the overview is the ovvw chunk of Apple’s
CAF specification, and Logic’s code builds its own pairs from it. For AIFF the same chunk LGWV is used.
Source: MAFiles.framework arm64 code; scripts/wav/lgwv-date-check.mjs,
scripts/wav/lgwv-algorithm.mjs.
ResU (Logic Pro): analysis
A zlib stream (it starts 78 9C) that inflates to a JSON text:
{"version":1,"initial":{"rec_ctx":{"duration":…,"beats":[{"t":0,"conf":-1,"onset":1},…],"Tempo":[{"t":0,"conf":-1,"tempo":120}],"time_signatures":[…]},…}},
Logic’s tempo and beat analysis. Verified: the stream inflates in all 13 files, and
duration equals the audio’s length in seconds. The explorer inflates it
itself and shows the tempo and beat count, and a table of every key path with its type and value (lists collapse to
an item count plus the keys of the first item).
The JSON is Logic’s MAMetroResult (MAMusicAnalysis.framework, method
attachAsChunkToAudioFileAtURL:; ReadGenericDataChunkFromAudioFile with the chunk ID ResU).
Keys present in the files seen: version, initial and rec_ctx (two earlier snapshots), and
at each level offset, duration, db_time, relevant_start_time,
relevant_end_time, mtr_end, creationTime, modificationTime, savedTime,
the flags MusicDetectionWasPerformed, ArrangeTapsWereUsedInAnalysis,
ResultWasCreatedFromLogicTempoMap, ResultWasCreatedFromLogicArrange, UserEdited,
and the lists beats (t, conf, onset), Tempo (t, conf, tempo) and
time_signatures (t, conf, signature). The framework’s key table also names keys that did not occur
in these files: length, firstBarIdx, is_downbeat, Onsets, BeatCorrections,
SignKeys, Chords, ChordCandidates (and V1 forms), MusicalContent, Melody, FlexPitchNotes,
BassLine, Scale, Tuning, Swing, AudioRMSList, AudioPeakList, RhythmicContentList,
SegmentTree, MetaData, snapToTransients and others. What those hold is not known.
Source: scripts/wav/resu-keys.mjs and the string table of MAMusicAnalysis.framework.
TruS (Logic Pro): reference analysis
Logic’s code (MAMusicAnalysis.framework, writeAsTruthToChunkOfAudioFileAtURL:,
truthFromChunkInAudioFileAtURL:) writes and reads a second generic chunk with the ID
TruS, the “truth” (a reference analysis against which a computed one is compared). It is stored
in the same way as ResU (the generic chunk functions are shared). No file on this Mac holds a
TruS chunk, so its body layout is unknown; the explorer names it and shows its bytes. Where a file has no room
for chunks, the code uses side files with the extensions .mre (ResU) and .mtr (TruS).
Unknown. A scan of MediaToolbox, CoreMedia, AVFAudio, AudioCodecs, AudioToolbox and CoreAudio in the dyld cache found no TruS immediate. Source: MAMusicAnalysis.framework arm64 code.
LGBM, EAPD, EAFP (Logic Pro): Flex Time and Flex Pitch
Logic writes these three chunks into audio it has analysed for Flex Time and Flex Pitch (found in WAVE,
AIFF and CAF files: for example a WAVE file with fmt , data, LGBM, EAPD, EAFP, LGWV).
LGBM and EAPD have the same layout as in AIFF files (see the AIFF
metadata chunks page; in a WAVE file the first words of LGBM are still big-endian,
08 09 19 76 then 00 00 00 08, and EAPD is little-endian, as in the files seen); the code that writes them is in
MADSP.framework (MADSPTransientService, CEAPitchChunkConcrete) and the immediates for all three IDs are in
that framework and in MAFiles.framework. The explorer decodes LGBM and EAPD
in WAVE and in AIFF files with the same code (verified on a real WAVE file: signature 0x08091976, one transient, 238 pitch values
every 128 frames).
EAFP (verified: read from the archive code in MADSP.framework and walked to the last byte of a real Logic WAVE file,
715 events) is a 29-byte header followed by events of 27 bytes. Header: a byte-order flag (u8; non-zero means big-endian), then u32 archive size (12),
u32 0, u32 header size (12), u32 version (1), u32 0, u32 event count, f32 reference pitch (440 in the file). Event: u8 tag (1), i64 position
(-768 in the file), i64 duration, u8 kind, f32 value, f32 offset, u8 has-dictionary. When has-dictionary is 1, a u32 length and a binary property list
(bplist00) follow (one event, 106 bytes). Not named in the code, so unknown: what kinds 1, 2, 3 and 6 mean and the keys inside the
property lists. Inferred only: kind 2 values look like pitch in semitones (69.04), and the reference pitch is the 440 Hz tuning.
TruS is written by the same helper calls as ResU, so it is probably also zlib-compressed JSON (inferred; no file with it
has been seen, so it is shown as bytes). Source: arm64 code of Logic Pro; scripts/wav/app-fourcc-scan.mjs, scripts/wav/eafp-walk.mjs.
adLD (Apple Loops): additional loop data
Logic Pro’s loop library (MALoopManagement.framework) reads a user chunk with the ID adLD from WAVE files
(-[LCWAVParser findAdditionalLoopDataChunk] asks AudioFileGetUserData for it and hands the bytes to
extractAdditionalLoopDataFromData:) and writes it back (-[LCWAVWriter writeAdditionalData]). The same ID is used in AIFF files
and, as a 16-byte UUID, in CAF files. Verified from the code: the ID and that WAVE files carry it. The body is passed to Logic’s own
routines as bytes and its layout is not known; the explorer names the chunk and shows its bytes. Unknown.
Source: arm64 code of MALoopManagement.framework and MAFiles.framework.
SMED (Soundminer): enciphered
A big-endian u32 a little smaller than the chunk (the chunk size minus 4, 6, 8 or
10), twelve constant bytes (e3fd75fc 6f1448f2 b7fd67ec in 749 of 775
chunks, d2ad38e0 98524987 c5ab185b in the other 26), and a body whose
size is a multiple of 8 and whose bytes are close to random (7.9 bits of entropy a
byte) with repeated 8-byte blocks: an 8-byte block cipher, used block by block. It
cannot be read without the key, which is not published; Soundminer is not installed
here to look for it. Inferred, not decoded.
filr, Fake, CDif
filr: filler. All 1,407 chunks found are zero bytes (88 bytes, or the length that aligns the next chunk); inferred.Fake: filler of 0x20 spaces or zero bytes (2, 40, 68 or 328,536 bytes in 32 chunks); inferred.CDif: 68 bytes, u32 68 (its own size), u32 1, then 60 zero bytes, in all 289 chunks found; inferred. The program that writes it is not known.
Unknown chunks
Any other ID is a chunk a reader does not know, and it skips it by its size. Programs
add their own chunks freely. The vendor chunks above are read from real files; the
explorer shows the body of any other unknown chunk as bytes. Still unknown: what the
flag of minf, the 42 marker of umid and
regn, and the second position of regn mean, what is in
elm1 (always zero), the second word of LGWV, the coding of
the DGDA packet data, and the contents of SMED.
The explorer shows the body of an unknown chunk as bytes. The 64-bit size chunk
ds64 and BW64’s XML chunks bxml and sxml are
unknown chunks in this format too.
Where they sit
Metadata chunks can come before or after the data chunk. Recorders often reserve room
near the start with a JUNK chunk and fill it in later, while editors often
write metadata after the samples so they can change it without moving the audio.
0RIFF WAVE12 bytes12fmt the format24 bytes36bext broadcast detailsvaries…data the samplesvaries…cue and LIST adtl markers and their labelsvaries…LIST INFO tagsvaries