| 1 | |
| 2 | <refentry id="zakinit"> |
| 3 | <indexterm id="IndexZakinit"><primary>zakinit</primary></indexterm> |
| 4 | <refentryinfo><title>Zak Patch System</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>zakinit</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>zakinit</refname> |
| 11 | <refpurpose> |
| 12 | Establishes zak space. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Establishes zak space. Must be called only once. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis><command>zakinit</command> isizea, isizek</synopsis> |
| 26 | </refsect1> |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Initialization</title> |
| 30 | <para> |
| 31 | <emphasis>isizea</emphasis> -- the number of audio rate locations for a-rate patching. Each location is actually an array which is ksmps long. |
| 32 | </para> |
| 33 | |
| 34 | <para> |
| 35 | <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. |
| 36 | </para> |
| 37 | </refsect1> |
| 38 | |
| 39 | <refsect1> |
| 40 | <title>Performance</title> |
| 41 | <para> |
| 42 | 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. |
| 43 | </para> |
| 44 | |
| 45 | <para> |
| 46 | 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>. |
| 47 | </para> |
| 48 | <note> |
| 49 | <para> |
| 50 | Zak channels count from 0, so if you define 1 channel, the only valid channel is channel 0. |
| 51 | </para> |
| 52 | </note> |
| 53 | </refsect1> |
| 54 | |
| 55 | <refsect1> |
| 56 | <title>Examples</title> |
| 57 | <para> |
| 58 | Here is an example of the zakinit opcode. It uses the file <ulink url="examples/zakinit.csd"><citetitle>zakinit.csd</citetitle></ulink>. |
| 59 | |
| 60 | <example> |
| 61 | <title>Example of the zakinit opcode.</title> |
| 62 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 63 | <xi:include href="examples-xml/zakinit.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 64 | </example> |
| 65 | </para> |
| 66 | </refsect1> |
| 67 | |
| 68 | <refsect1> |
| 69 | <title>See also</title> |
| 70 | <para><link linkend="ZakTop"><citetitle>Zak Patch System</citetitle></link></para> |
| 71 | </refsect1> |
| 72 | |
| 73 | <refsect1> |
| 74 | <title>Credits</title> |
| 75 | <para> |
| 76 | <simplelist> |
| 77 | <member>Author: Robin Whittle</member> |
| 78 | <member>Australia</member> |
| 79 | <member>May 1997</member> |
| 80 | </simplelist> |
| 81 | </para> |
| 82 | <para>New in version 3.45</para> |
| 83 | <para>Example written by &namekevin;.</para> |
| 84 | </refsect1> |
| 85 | </refentry> |