Programmer Guide/Shell Items/Wave/NEW WAVE: Difference between revisions
m (adding template) |
|||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
{{Wave Item}} | |||
<code>NEW WAVE <var>name</var> [ /G ]</code> | <code>NEW WAVE <var>name</var> [ /G ]</code> | ||
Revision as of 07:59, 5 May 2015
| Wave Item | |||||
|---|---|---|---|---|---|
| INTRODUCTION | NEW | SET | ATTRIBUTES | MESSAGES | EXAMPLES |
NEW WAVE name [ /G ]
Create a wave item without a signal. Example: this can be used to select or query wave I/O devices.
- /G
- Garbage collection. If specified, the item is automatically deleted when exiting the macro
NEW WAVE name segmentExpression [ch1 .. chN] [/Segment] [ /G ]
Create a wave item addressing a segment of the current soundfile. For signal selection the time range (segmentExpression) and the channel(s) (ch1, .., chN) can be used. If the channel arguments are omitted or an asterisk (*) is given, all channels are used. See Specifying Signal Segments for segment expression syntax.
NEW WAVE name [channels srate] /seQuence [ /G ]
Create a wave item containing a sequence of segments and synthetic sounds. The default value of channels is 1, and srate is the sampling rate of current soundfile are used. The signals of the sequence must be defined via the SET sequence SIGNAL commands. Note that the option /Q is mandatory.
NEW WAVE name masterwave [begin end] /Virtual [/Relativetime] [ /G ]
Create a virtual wave item that addresses a signal range of the masterwave. Use the option /R if addresses are relative to the beginning of the master wave.
It is not possible to delete a master wave item if virtual wave items are attached.NEW WAVE name nch srate dur|* num|* len|* /Adc|Dac /2|4 [ /G ]
Create a wave item for input (/A) or output (/D) of signals in real-time. If the duration (dur) is 0, the wave is infinitely long! The option /2 indicates a 16bit (2 byte) wave item, whilst /4 indicates a 32bit item. The real-time wave items are directly connected to the systems wave devices. The devices can be selected with the command SET WAVE DEVICE.
- nch
- The number of channels. There is no default value.
- srate
- The sampling rate. There is no default value.
- dur
- The duration of the wave item signal in samples. If an asterisk is specified, the wave item duration is infinite.
- num
- The number of buffers to be used. If an asterisk is specified, the number of buffers is automatically selected.
- len
- The length of one buffer in samples. If an asterisk is specified, the buffer length is automatically selected.
- /Adc|Dac
- Use /A for an analog to digital conversion and /D for a digital to analog conversion.
- /2|4
- The number of bytes per sample (2bytes == 16bit).