WAVE Item Attributes

From STX Wiki
Jump to navigationJump to search
Wave Item
INTRODUCTION NEW SET ATTRIBUTES MESSAGES EXAMPLES
!BEGIN
The WAVE item attribute !BEGIN returns the start address in samples.
!CHANNELS
The WAVE item attribute !CHANNELS returns the number of signal channels.
!DEVICE
The WAVE item attribute !DEVICE returns the type of device attached to wave item or an empty string if no device is attached. Possible values are:
PLAY|RECORD
!INCAPS
The WAVE item attribute !INCAPS returns the capabilities of the selected input device in the following format:
devicename ; MME|ASIO|* maxch|* minsr|* maxsr|* anysr{0|1}; sr1 .. srN; fmt1 .. fmtN;
!INDEVICE
The WAVE item attribute !INDEVICE returns the id of the input wave device referenced by the mandatory second parameter index.
E.g.:
$#wave[!indevice,$#wave[!indevices]-1] // returns the id of the last available input device.
!INDEVICES
The WAVE item attribute !INDEVICES returns the number of installed wave recording devices.
!INSELECTED
The WAVE item attribute !INSELECTED returns the index of the wave device selected for recording functions.
!LENGTH
The WAVE item attribute !LENGTH returns the length of the signal in samples.
!OUTCAPS
The WAVE item attribute !OUTCAPS returns the capabilities of the selected output device in the following format:
devicename ; MME|ASIO|* maxch|* minsr|* maxsr|* anysr{0|1}; sr1 .. srN; fmt1 .. fmtN;
!OUTDEVICE
The WAVE item attribute !OUTDEVICE returns the id of the output wave device referenced by the mandatory second parameter index.
E.g.:
$#wave[!outdevice,0] // returns the id of the first playback device
!OUTDEVICES
The WAVE item attribute !OUTDEVICES returns the number of installed wave playback devices.
!OUTSELECTED
The WAVE item attribute !OUTSELECTED returns the index of the wave device selected for playback functions.
!PLAYGAIN
The WAVE item attribute !PLAYGAIN returns the linear gain value currently being used for playback. If a second parameter, NewGainValue, is specified, then the playback gain value is changed. If playback is in progress, the new gain value is first used when the current buffer has been played.
Examples:
#linearGainValue := $#wave[!PlayGain] // retrieve gain value
#linearGainValue := $#wave[!PlayGain, $(num $#linearGainValue + 1)] // increase the gain value by one.
!PLAYSRATE
The WAVE item attribute !PLAYGAIN returns the sampling rate used for playback. If a second parameter, NewPlaybackSRate, is specified, then the playback sampling rate is set to this new value. See the script playsrate.sts for an example.
!POSITION
The WAVE item attribute !POSITION returns access position in samples of the attached device. The signal between !BEGIN and this position has already been processed. This value is empty if the wave item is not being played.
!PROGRESS
The WAVE item attribute !PROGRESS returns the amount of the signal which has been progressed as a percentage of its length.
!SIGNAL[,channel[,offset[,length]]]
The WAVE item attribute !SIGNAL returns the signal as a vector of samples in a shell table.
You can also specify the channel, offset and length (e.g. $#wave[!signal,1]).
!SRATE
The WAVE item attribute !SRATE returns the sampling rate in Hz.
!TYPE
The WAVE item attribute !TYPE returns the type of the wave item or an empty string if no signal is addressed by wave item. The type is one of the following values:
STREAM|SEQUENCE|WAVE|ADC|DAC
For virtual wave items, the type of real wave item is returned.
!MODE
The WAVE item attribute !MODE returns WRITE if signal can be written to (stored in) the wave and READ if the signal can only be read but not changed

Navigation menu

Personal tools