sd2(4) sd2(4)
sounddesigner2, sd2, sdII - Sound Designer II Audio File Format
#include <dmedia/audiofile.h>
The Audio File Library currently supports eight of the commonly found
audio file formats, i.e., is able to recognize, read, and write sample
data and header information to and from files in these formats. It is
important not to confuse sample or audio data formats with file formats.
The former refers to the bit-wise organization of the sound samples in
the file, i.e., whether the format is 8-bit integer or 16-bit unsigned,
etc. Audio file format refers to the structure of the audio file header,
the chunk of on-disk data which preceeds the samples and which provides
information about the file to the audio program. A single audio file
format may support a large variety of sample formats.
The Sound Designer II Audio File Format (sd2) was created by DigiDesign,
Inc., as a replacement for their earier Sound Designer I format (not
supported by the Audio File Library). Because it was developed for the
Apple MacIntosh file system, this file format differs from all other
currently supported audio file formats in that its representation on a
UNIX file system varies depending on how the file is made available. All
involve a data fork or file containing the binary sample data and a
resource fork or file containing all information about the file and its
format. Three representations are supported:
Apple Single Format [Toc] [Back]
Resource and data forks are combined into a single file
Apple Double Format [Toc] [Back]
Resource and data forks put into separate files; the data fork file
carries the actual file name, and the resource fork file has (in
most cases) a percent (%) character prepended to the filename
Xinet (IRISShare) Format [Toc] [Back]
Resource and data forks put into separate files; the data fork file
carries the actual file name, and the resource fork file is located
in a subdirectory named ".HSResource". This is always subdirectory
of the directory containing the data fork file. In addition, a
third file named .HSAncillary contains additional "ancillary data"
about every Apple file in the current directory. This file stores
information about the file type and file creation dates, among other
things.
DATA FORMAT SPECIFICATIONS [Toc] [Back] Sample Formats:
Two's complement integer only
Page 1
sd2(4) sd2(4)
Sample Widths:
16-bit only
Byte Orders:
Bigendian only
Channel Counts:
1 and 2 channels only
Compression Formats:
None supported, and none in common usage
FILE FORMAT SPECIFICATIONS [Toc] [Back] Sound Designer II files can contain large amounts of additional
information.
Instrument Configurations:
Maximum of 1 allowed. Any number of loops per inst. Insts are
stored as a set of loops with no associated instparams. Loops are
stored as a starting frame, an ending frame, a loop sense (forward
or forward-backward) plus an index (set incrementally from 0 up) and
a channel (currently set to 0).
Markers:
Any number of markers is allowed. Unlike AIFF(3dm) and WAVE(3dm)
files, there is no direct association between markers and loops. An
application may choose to specify loop start and end points via the
traditional AIFF-style method using mark id's (afSetLoopStart(3dm),
etc.) or via the newer afSetLoopStartFrame(3dm) and related
routines. In the former case, both the loops and the markers will
be written out to the header; in the latter case, only the loops
will be written out (unless other markers have been created).
In addition, it is possible to associate both a name string and a comment
string with each marker. The routines afInitMarkName(3dm) and
afInitMarkComment(3dm) will do this. Both the name and comment will be
written into a text buffer with the format <marker name>: <marker
comment>.
Miscellaneous Chunks:
AF_MISC_COMMENT text comment string
Due to the nature of the file structure as described above, the Audio
File Library must take extra steps to identify and read this format.
Specifically, it must have the full pathname of the file available for
the call to identify the file (if used) and the call to open it. The
functions afIdentifyNamedFDafOpenFile(3dm) call.
Page 2
sd2(4) sd2(4)
The current version of the AF can read Sound Designer II files in any of
the above-three file representations, but all newly created files will be
written in Xinet representation only. Future releases of the AF may
allow a choice.
afInitFileFormat(3dm), afGetFileFormat(3dm), afIntro(3dm),
afIdentifyNamedFD(3dm)
PPPPaaaaggggeeee 3333 [ Back ]
|