WAVE Item Attributes
From STX Wiki
< Programmer Guide | Shell Items | Wave
Jump to navigationJump to search
| Wave Item | |||||
|---|---|---|---|---|---|
| INTRODUCTION | NEW | SET | ATTRIBUTES | MESSAGES | EXAMPLES |
- !BEGIN
- The
WAVEitem attribute !BEGIN returns the start address in samples.
- !CHANNELS
- The
WAVEitem attribute!CHANNELSreturns the number of signal channels.
- !DEVICE
- The
WAVEitem attribute!DEVICEreturns the type of device attached to wave item or an empty string if no device is attached. Possible values are:
PLAY|RECORD
- !INCAPS
- The
WAVEitem attribute!INCAPSreturns 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
WAVEitem attribute!INDEVICEreturns 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
WAVEitem attribute!INDEVICESreturns the number of installed wave recording devices.
- !INSELECTED
- The
WAVEitem attribute!INSELECTEDreturns the index of the wave device selected for recording functions.
- !LENGTH
- The
WAVEitem attribute!LENGTHreturns the length of the signal in samples.
- !OUTCAPS
- The
WAVEitem attribute!OUTCAPSreturns 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
WAVEitem attribute!OUTDEVICEreturns 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
WAVEitem attribute!OUTDEVICESreturns the number of installed wave playback devices.
- !OUTSELECTED
- The
WAVEitem attribute!OUTSELECTEDreturns the index of the wave device selected for playback functions.
- !PLAYGAIN
- The
WAVEitem attribute!PLAYGAINreturns 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
WAVEitem attribute!PLAYGAINreturns 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 scriptplaysrate.stsfor an example.
- !POSITION
- The
WAVEitem attribute!POSITIONreturns access position in samples of the attached device. The signal between!BEGINand this position has already been processed. This value is empty if the wave item is not being played.
- !PROGRESS
- The
WAVEitem attribute!PROGRESSreturns the amount of the signal which has been progressed as a percentage of its length.
- !SIGNAL[,channel[,offset[,length]]]
- The
WAVEitem attribute!SIGNALreturns 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
WAVEitem attribute!SRATEreturns the sampling rate in Hz.
- !TYPE
- The
WAVEitem attribute!TYPEreturns 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
WAVEitem attribute!MODEreturnsWRITEif signal can be written to (stored in) the wave andREADif the signal can only be read but not changed