SFL files are basically just RIFF files that only contain the Marker and Region Chunks.
When creating or reading markers, regions and playlist entries in WAV files, the RIFF documentation can be a little confusing. We have added this section to give software developers a better idea of how to deal with these chunks.
Markers are a position within a wave file that can also have an associated text name. Each marker in Sound Forge is stored as an entry within the “” chunk. The entry within the “” chunk stores the position, as well as a DWORD name field. The name field is used to reference the text name entry that can be found within the chunk. For instance, if we had a marker at 0 which had a name of Start there would be an entry within the chunk with a sample offset of 0 and a name entry of 0x0001 (we have chosen 0x0001 for the example. The name entry can be any value from 0x00000000 to 0xFFFFFFFF) Within the chunk we would have an entry of type (label chunk) with a name of 0x0001 and a text field of Start.
Regions are much like markers but they also include an associated length as well as a start position and text name. Each region is stored as an entry within the chunk which stores the position as well as a DWORD name field. The name field is again used to reference the text name entry that can be found within the chunk. The difference between the marker and the region is that instead of using a chunk in the chunk we use a chunk which allows us to store a length as well as a text name. For instance if we had a region at 0 with a length of 1000 samples and a name of Beat 1 there would be an entry within the chunk with a sample offset of 0 and a name entry of 0x0001. (Again, we’re using the name value of 0x0001 as an example.) Within the chunk we would have an entry of type with a Name of 0x0001, a text field of Beat 1, and a length of 1,000. Within the chunk there is also a field of type FOURCC which specifies the purpose of this entry. For all regions in Sound Forge the FOURCC type is set to rgn.
Playlist regions are stored a little differently. They specify a reference to a for the start of each playlist region and a length and number of loops for each entry. Thus, our playlist entries can actually have lengths that are different than those stored within the Regions List. To handle this, for every playlist entry there will exist a corresponding region of the exact same length when a wave file is created by Sound Forge. This is to simplify the overall use and interface to the user. If we were to have a playlist which contained our previous example of a region of Beat 1 playing 4 times, it would be stored in the playlist with a name field of 0x0001, a length of 1,000 samples, and a loop count of 4.