SEGMENT

From STX Wiki
Jump to navigationJump to search
Usage

1. Evaluate the segment expression segexpr, using the sampling rate and the length of the current soundfile (see LOAD SOUNDFILE).

SEGMENT segexpr [/S | /?]
segexpr
the segment expression to be evaluated
/S, /?
silent error handling; generate warnings rather than errors.

2. Evaluate the segment expression segexpr, using the specified sampling rate and length.

SEGMENT segexpr sr l [/S | /?]
sr
sampling rate in Hz
l
maximum signal duration in samples

3. Evaluate the segment expression segexpr, using the sampling rate and the segment definitions stored in the xml-file item xitem.

SEGMENT segexpr xmlfile srattr segtag idattr pattr lattr
xmlfile
a xml-file item containing the metadata; the selected element must contain soundfile metadata and the segment definitions must be stored as child elements
srattr
the xml attribute of the selected element containing the sampling rate (in Hz)
segtag
the xml element tag used for segment definitions
idattr, pattr, lattr
the xml attributes used in the segment definition elements to specifiy the segment id (idattr) and its starting position (pattr) and length (lattr)
Result
  • success: bseg eseg lseg - the return value is the begin (bseg), end (eseg) and length (lseg) of the segment specified by the segment expression. The variable RC is set to 0.
  • error: the command returns the empty string and the error- or warning-code is stored in variable RC

Navigation menu

Personal tools