xout — Retrieves variables from a user-defined opcode block,
The xin and xout opcodes copy variables to and from the opcode definition, allowing communication with the calling instrument.
The types of input and output variables are defined by the parameters intypes and outtypes.
Notes | |
---|---|
|
xoutarg1, xoutarg2, ... - output arguments. The number and type of variables must agree with the user-defined opcode's outtypes declaration. However, xout does not check for incorrect use of init-time and control-rate variables.
The syntax of a user-defined opcode block is as follows:
opcode name, outtypes, intypes
xinarg1 [, xinarg2] [, xinarg3] ... [xinargN] xin
[setksmps iksmps]
... the rest of the instrument's code.
xout xoutarg1 [, xoutarg2] [, xoutarg3] ... [xoutargN]
endop
The new opcode can then be used with the usual syntax:
[xinarg1] [, xinarg2] ... [xinargN] name [xoutarg1] [, xoutarg2] ... [xoutargN] [, iksmps]