ST5 Files

From STX Wiki
Jump to navigation Jump to search

The S_TOOLS 5 Sound file format (ST5) is a special sound file format implemented by the DOS version of S_TOOLS. The development of S_TOOLS was stopped in 1997 and replaced by the Windows version STx.

The features of this file format are comparable to that of the Windows WAVE format. A major difference is that ST5 files contains not only signals but also segmenting information. For downward compatibility STx is able to use ST5 formatted sound files. This feature should only be used, to read information from such files, but new files should always be created using the Windows WAVE format.

Format Details

An ST5 file consists of a header, a segment directory and a signal area. The header defines the file parameters (size = 64 bytes). The segment directory contains nsfde entries, where each entry can define one segment (size = nsfde . lsfde). In the signal area the signal samples are stored in the same format as in a wave file (ch1, ch2, ..., ch1, ch2, ...; size = nch . nbps . samples).

Header (64 bytes)

Sizein bytes VariableName VariableC data type description
2 id char[2] "SF"
27 label char[37] file title
4 date unsigned long data of creation
4 srate float sampling rate in Hz
1 nch unsigned char number of channels
1 nbps unsigned char number of bytes per sample
1 code unsigned char sample code
2 nsfde short number of segment directory entries
2 lsfde short number of bytes per segment directory entry
4 samples long number of samples
4 - long not used
2 - short not used