| 1 | |
| 2 | <refentry id="cngoto"> |
| 3 | <indexterm id="IndexCngoto"><primary>cngoto</primary></indexterm> |
| 4 | <refentryinfo><title>Instrument Control:Program Flow Control</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>cngoto</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>cngoto</refname> |
| 11 | <refpurpose> |
| 12 | Transfers control on every pass when a condition is not true. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Transfers control on every pass when the condition is <emphasis>not</emphasis> true. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis><command>cngoto</command> condition, label</synopsis> |
| 26 | |
| 27 | <para> |
| 28 | where <emphasis>label</emphasis> is in the same instrument block and is not an expression, and where <emphasis>condition</emphasis> uses one of the Relational operators (<emphasis><</emphasis>,<emphasis> =</emphasis>, <emphasis><=</emphasis>, <emphasis>==</emphasis>, <emphasis>!=</emphasis>) (and <emphasis>=</emphasis> for convenience, see also under <link linkend="ControlConditional"><citetitle>Conditional Values</citetitle></link>). |
| 29 | </para> |
| 30 | </refsect1> |
| 31 | |
| 32 | <refsect1> |
| 33 | <title>Examples</title> |
| 34 | <para> |
| 35 | Here is an example of the cngoto opcode. It uses the file <ulink url="examples/cngoto.csd"><citetitle>cngoto.csd</citetitle></ulink>. |
| 36 | |
| 37 | <example> |
| 38 | <title>Example of the cngoto opcode.</title> |
| 39 | <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> |
| 40 | <xi:include href="examples-xml/cngoto.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 41 | </example> |
| 42 | |
| 43 | Its output should include lines like: |
| 44 | <screen> |
| 45 | kval = 0.000000, kfreq = 880.000000 |
| 46 | kval = 0.999732, kfreq = 880.000000 |
| 47 | kval = 1.999639, kfreq = 440.000000</screen> |
| 48 | </para> |
| 49 | </refsect1> |
| 50 | |
| 51 | <refsect1> |
| 52 | <title>See also</title> |
| 53 | <para><link linkend="ControlPgmctl"><citetitle>Program Flow Control</citetitle></link></para> |
| 54 | </refsect1> |
| 55 | |
| 56 | <refsect1> |
| 57 | <title>Credits</title> |
| 58 | <para>Example written by &namekevin;.</para> |
| 59 | <para>New in version 4.21</para> |
| 60 | </refsect1> |
| 61 | </refentry> |