<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="zakinit">
  <refmeta>
    <refentrytitle>zakinit</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>zakinit</refname>
    <refpurpose>
      Establishes zak space.
      <indexterm id="IndexZakinit"><primary>zakinit</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Establishes zak space. Must be called only once.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>zakinit</command> isizea, isizek</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>isizea</emphasis> -- the number of audio rate locations for a-rate patching. Each location is actually an array which is ksmps long.
    </para>

    <para>
      <emphasis>isizek</emphasis> -- the number of locations to reserve for floats in the zk space. These can be written and read at i- and k-rates.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      At least one location each is always allocated for both za and zk spaces. There can be thousands or tens of thousands za and zk ranges, but most pieces probably only need a few dozen for patching signals. These patching locations are referred to by number in the other zak opcodes.
    </para>

    <para>
      To run <emphasis>zakinit</emphasis> only once, put it outside any instrument definition, in the orchestra file header, after <emphasis>sr</emphasis>, <emphasis>kr</emphasis>, <emphasis>ksmps</emphasis>, and <emphasis>nchnls</emphasis>.
    </para>
  </refsect1>

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

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

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

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/zakinit.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: Robin Whittle</member>
        <member>Australia</member>
        <member>May 1997</member>
      </simplelist>
    </para>
    <para>Example written by &namekevin;.</para>
  </refsect1>
</refentry>
