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

  <refnamediv>
    <refname>endin</refname>

    <refpurpose>
      Ends the current instrument block.
      <indexterm id="IndexEndin"><primary>endin</primary></indexterm>
    </refpurpose>
  </refnamediv>

  <refsect1>
    <title>Description</title>
    <para>
      Ends the current instrument block.
    </para>
  </refsect1>

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

  <refsect1>
    <title>Initialization</title>
    <para>
      Ends the current instrument block.
    </para>

    <para>
      Instruments can be defined in any order (but they will always be both initialized and performed in ascending instrument number order).  Instrument blocks cannot be nested (i.e. one block cannot contain another).
    </para>

    <note>
      <title>Note</title>
      <para>
        There may be any number of instrument blocks in an orchestra.
      </para>
    </note>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the endin opcode. It uses the files <ulink url="examples/endin.orc"><citetitle>endin.orc</citetitle></ulink> and <ulink url="examples/endin.sco"><citetitle>endin.sco</citetitle></ulink>.

      <example>
        <title>Example of the endin opcode.</title>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/endin.orc" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/endin.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="instr"><citetitle>instr</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Example written by &namekevin;.</para>
  </refsect1>
</refentry>
