<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="endop">
  <refmeta>
    <refentrytitle>endop</refentrytitle>
  </refmeta>

  <refnamediv>
    <refname>endop</refname>
    <refpurpose>
      Marks the end of an user-defined opcode block.
      <indexterm id="IndexEndop"><primary>endop</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      Marks the end of an user-defined opcode block.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis><command>endop</command></synopsis>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      The syntax of a user-defined opcode block is as follows:

      <literallayout>
opcode  name, outtypes, intypes
xinarg1 [, xinarg2] [, xinarg3] ... [xinargN]  xin
[setksmps  iksmps]
... the rest of the instrument's code.
xout  xoutarg1 [, xoutarg2] [, xoutarg3] ... [xoutargN]
endop
      </literallayout>
    </para>

    <para>
      The new opcode can then be used with the usual syntax:

      <literallayout>
[xinarg1] [, xinarg2] ... [xinargN]  name  [xoutarg1] [, xoutarg2] ... [xoutargN] [, iksmps]
      </literallayout>
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      See the example for the <link linkend="opcode"><citetitle>opcode</citetitle></link> opcode.
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="opcode"><citetitle>opcode</citetitle></link>, 
      <link linkend="setksmps"><citetitle>setksmps</citetitle></link>, 
      <link linkend="xin"><citetitle>xin</citetitle></link>, 
      <link linkend="xout"><citetitle>xout</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Author: Istvan Varga, 2002; based on code by Matt J. Ingalls</para>
    <para>New in version 4.22</para>
  </refsect1>
</refentry>
