Programmer Guide/Command Reference/SEGMENT: Difference between revisions
From STX Wiki
Jump to navigationJump to search
(initial import) |
m (1 revision: Initial import) |
(No difference)
|
Revision as of 17:31, 18 November 2010
Contents
SEGMENT
Convert a segment expression into it's equivalent in samples or extract a segment expression from a segment element in an XML file item. If an XML file is specified, then the currently selected audio set is searched for an element with the tag segTag and the id idAttr.
Usage:
var := SEGMENT segmentExpression [ samplingRate sampleCount ] [ /S ]
var := SEGMENT segmentExpression xmlFile srAttr segTag idAttr pAttr lAttr [ /S ]
Parameters:
- segmentExpression
- A valid segment expression. If samplingRate and sampleCount are specified, segmentExpression cannot contain segment names. See Specifying Signal Segments for details about valid segment expressions. Note that if this is the only argument, the parameters of the current soundfile are used for calculations.
- samplingRate
- The sampling rate to use for calculations. If this parameter is specified, it takes precedence over the sampling rate of the current soundfile.
- sampleCount
- The number of samples.
- xmlFile
- An XML file item id. The file's selected element must be an audio set. The status and context of the file are not changed by the
SEGMENT
command.
- srAttr
- The name of the sampling rate attribute in the currently selected audio set. E.g. '
SR
' for an S_TOOLS-STxAFile
element.
- segTag
- The XML tag containing the segment data in the currently selected audio set. E.g '
ASeg
'.
- idAttr
- The id of the segment to evaluate.
- pAttr
- The name of the attribute containing the starting address in samples. E.g. '
P
' in anASeg
element.
- lAttr
- The name of the attribute containing the length of the segment in samples. E.g. '
L
' in anASeg
element.
- /S
- If specified, errors will generate warning messages rather than error messages. See The Silent Flag for details.
Result:
Returns a string in the following format:
'beginning end length'
All values are in samples.