A marker is a named position in the audio. A region is a group of markers, such as the loop points of an instrument.
Marker chunk
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | mSMPTE_TimeType | the timecode type, below; 0 means no marker has a valid time |
| 4 | 4 | u32 | mNumberMarkers | the number of markers |
| 8 | 28 each | record | mMarkers | the markers |
Marker
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | FourCC | mType | the marker’s type, below |
| 4 | 8 | f64 | mFramePosition | the frame number, starting from 0 |
| 12 | 4 | u32 | mMarkerID | the ID of its name in the strings chunk |
| 16 | 8 | record | mSMPTETime | the timecode, below; all 0xFF means invalid |
| 24 | 4 | u32 | mChannel | the channel, counting from 1, or 0 for all |
| Offset | Size | Type | Name |
|---|---|---|---|
| 0 | 1 | s8 | mHours |
| 1 | 1 | s8 | mMinutes |
| 2 | 1 | s8 | mSeconds |
| 3 | 1 | s8 | mFrames |
| 4 | 4 | u32 | mSubFrameSampleOffset |
Marker types
| Value | Constant (after kCAFMarkerType_) |
|---|---|
| 0 | Generic |
pbeg | ProgramStart |
pend | ProgramEnd |
tbeg | TrackStart |
tend | TrackEnd |
indx | Index |
rbeg | RegionStart |
rend | RegionEnd |
rsyc | RegionSyncPoint |
sbeg | SelectionStart |
send | SelectionEnd |
cbeg | EditSourceBegin |
cend | EditSourceEnd |
dbeg | EditDestinationBegin |
dend | EditDestinationEnd |
slbg | SustainLoopStart |
slen | SustainLoopEnd |
rlbg | ReleaseLoopStart |
rlen | ReleaseLoopEnd |
SMPTE timecode types
| Value | Constant (after kCAF_SMPTE_TimeType) | Frames per second |
|---|---|---|
| 0 | None | no timecode |
| 1 | 24 | 24 |
| 2 | 25 | 25 |
| 3 | 30Drop | 30, drop frame |
| 4 | 30 | 30 |
| 5 | 2997 | 29.97 |
| 6 | 2997Drop | 29.97, drop frame |
| 7 | 60 | 60 |
| 8 | 5994 | 59.94 |
Region chunk
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | mSMPTE_TimeType | as for markers |
| 4 | 4 | u32 | mNumberRegions | the number of regions |
| 8 | varies | record | mRegions | the regions |
A region:
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | mRegionID | a unique ID; 0 is best avoided |
| 4 | 4 | u32 | mFlags | flags, below |
| 8 | 4 | u32 | mNumberMarkers | the number of markers |
| 12 | 28 each | record | mMarkers | the region’s markers, as above |
| Flag | Constant | Meaning |
|---|---|---|
| 1 | kCAFRegionFlag_LoopEnable | the region loops; at least one play direction must be set |
| 2 | kCAFRegionFlag_PlayForward | plays forward |
| 4 | kCAFRegionFlag_PlayBackward | plays backward |
With both direction flags set, the region plays forward and backward in turn.