xout
Prev | Orchestra Opcodes and Operators | Next

## xout

xout — Retrieves variables from a user-defined opcode block,

## Description

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
xin and xout should be called only once, and xin should precede xout, otherwise an init error and deactivation of the current instrument may occur. These opcodes actually run only at i-time. Performance time copying is done by the user opcode call. This means that skipping xin or xout with kgoto has no effect, while skipping with igoto affects both init and performance time operation.

## Syntax

    xout xoutarg1 [, xoutarg2] ... [, xoutargN]

## Performance

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]

## Examples

See the example for the opcode opcode.

## See Also

endop, opcode, setksmps, xin

## Credits

Author: Istvan Varga, 2002; based on code by Matt J. Ingalls

New in version 4.22

Prev | Up | Next
xin | Home | xscanmap