The STx uses a special syntax to address a segment of a sound file. The syntax allows for the mixed use of segment names and time values in a complex expression known as a segment expression. Segment expressions may be used in all commands and dialogs where a signal segment (or a position/duration) may be specified (exceptions are described in the Command Reference). In dialogs, the supported value formats/types are always described in the control/dialog caption.
- Segment expression
- A segment expression addresses a part of a soundfile with a non-zero duration. It can consist of (1) a segment name, or (2) of two label expressions (see below) specifying the beginning and the end of the segment, or (3) of two label expressions (see below) specifying the position of the segment and its duration.
||(beginning and end)
||(beginning and duration)
||(end and duration)
- A label expression is a position in a sound file (e.g. the begin/end of a segment) or the duration of a segment. A label expression may consist of a sign (+/-) and one or more values formatted as described below and combined with the operators + (add) or – (subtract). If a label expression contains blanks, it must be quoted when used as an argument.
||the signal sampling rate in Hz
||the signal length in samples (e.g. soundfile length)
||the ID of a segment defined in the XML file
- Simple examples
- Below you will find a short list of examples.
- addresses the segment from sample 0 (the beginning) to 4 seconds into the file
- addresses 100 samples after the beginning of an existing segment called "SegmentB" for a duration of ten seconds
- addresses an existing segment called "SegmentB"
- addresses the range from the beginning of SegmentA to the end of SegmentB
- addresses the range starting 100 milliseconds before the end of SegmentB and ending at the end of SegmentB
- For some expressions, the values
number% (percentage of the full duration) and
number%% (thousandths of the full duration) can be used, but only if the full signal is available/defined (e.g. for envelopes of sequence signals). A
segmentname can only be used if a sound file or an audio-element of an XML file is involved in the expression evaluation. Segment names are case sensitive.