<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>xout</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <link rel="stylesheet" type="text/css" href="syntax-highlighting.css" /> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" /> <link rel="prev" href="xin.html" title="xin" /> <link rel="next" href="xscanmap.html" title="xscanmap" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">xout</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="xin.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="xscanmap.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry"> <a id="xout"></a> <div class="titlepage"></div> <a id="IndexXout" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">xout</span> </h2> <p>xout — Retrieves variables from a user-defined opcode block, </p> </div> <div class="refsect1"> <a id="idm281472868035912"></a> <h2>Description</h2> <p> The <span class="emphasis"><em>xin</em></span> and <span class="emphasis"><em>xout</em></span> opcodes copy variables to and from the opcode definition, allowing communication with the calling instrument. </p> <p> The types of input and output variables are defined by the parameters <span class="emphasis"><em>intypes</em></span> and <span class="emphasis"><em>outtypes</em></span>. </p> <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> <table border="0" summary="Note: Notes"> <tr> <td rowspan="2" align="center" valign="top" width="25"> <img alt="[Note]" src="images/note.png" /> </td> <th align="left">Notes</th> </tr> <tr> <td align="left" valign="top"> <p> </p> <div class="itemizedlist"> <ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> <p><span class="emphasis"><em>xin</em></span> and <span class="emphasis"><em>xout</em></span> should be called only once, and <span class="emphasis"><em>xin</em></span> should precede <span class="emphasis"><em>xout</em></span>, otherwise an init error and deactivation of the current instrument may occur.</p> </li> <li class="listitem"> <p>These opcodes actually run only at i-time. Performance time copying is done by the user opcode call. This means that skipping <span class="emphasis"><em>xin</em></span> or <span class="emphasis"><em>xout</em></span> with <a class="link" href="kgoto.html" title="kgoto"><em class="citetitle">kgoto</em></a> has no effect, while skipping with <a class="link" href="igoto.html" title="igoto"><em class="citetitle">igoto</em></a> affects both init and performance time operation.</p> </li> </ul> </div> <p> </p> </td> </tr> </table> </div> </div> <div class="refsect1"> <a id="idm281472867953592"></a> <h2>Syntax</h2> <pre class="synopsis"><span class="command"><strong>xout</strong></span> xoutarg1 [, xoutarg2] ... [, xoutargN]</pre> </div> <div class="refsect1"> <a id="idm281472867951528"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>xoutarg1</em></span>, <span class="emphasis"><em>xoutarg2</em></span>, ... - output arguments. The number and type of variables must agree with the user-defined opcode's <span class="emphasis"><em>outtypes</em></span> declaration. However, <span class="emphasis"><em>xout</em></span> does not check for incorrect use of init-time and control-rate variables. </p> <p> The syntax of a user-defined opcode block is as follows: </p> <pre class="programlisting"> <span class="oblock">opcode</span> name, outtypes, intypes xinarg1 [, xinarg2] [, xinarg3] ... [xinargN] <span class="opc">xin</span> [<span class="opc">setksmps</span> iksmps] ... the rest of the instrument's code. <span class="opc">xout</span> xoutarg1 [, xoutarg2] [, xoutarg3] ... [xoutargN] <span class="oblock">endop</span> </pre> <p> </p> <p> The new opcode can then be used with the usual syntax: </p> <div class="literallayout"> <p><br /> [xinarg1] [, xinarg2] ... [xinargN] name [xoutarg1] [, xoutarg2] ... [xoutargN] [, iksmps]<br /> </p> </div> <p> </p> </div> <div class="refsect1"> <a id="idm281472867942280"></a> <h2>Examples</h2> <p> See the example for the <a class="link" href="opcode.html" title="opcode"><em class="citetitle">opcode</em></a> opcode. </p> </div> <div class="refsect1"> <a id="idm281472867940088"></a> <h2>See Also</h2> <p> <a class="link" href="endop.html" title="endop"><em class="citetitle">endop</em></a>, <a class="link" href="opcode.html" title="opcode"><em class="citetitle">opcode</em></a>, <a class="link" href="setksmps.html" title="setksmps"><em class="citetitle">setksmps</em></a>, <a class="link" href="xin.html" title="xin"><em class="citetitle">xin</em></a> </p> </div> <div class="refsect1"> <a id="idm281472867935128"></a> <h2>Credits</h2> <p>Author: Istvan Varga, 2002; based on code by Matt J. Ingalls</p> <p>New in version 4.22</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="xin.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="OpcodesTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="xscanmap.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">xin </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> xscanmap</td> </tr> </table> </div> </body> </html>