| 1 |
|
| 2 |
|
| 3 |
<refentry id="cntCreate"> |
| 4 |
<indexterm id="IndexCntCreate"><primary>cntCreate</primary></indexterm> |
| 5 |
|
| 6 |
<refentryinfo><title>Instrument Control:Sensing and Control</title></refentryinfo> |
| 7 |
<refmeta> |
| 8 |
<refentrytitle>cntCreate</refentrytitle> |
| 9 |
</refmeta> |
| 10 |
|
| 11 |
<refnamediv> |
| 12 |
<refname>cntCreate</refname> |
| 13 |
<refpurpose> |
| 14 |
Create a counter object. |
| 15 |
</refpurpose> |
| 16 |
</refnamediv> |
| 17 |
|
| 18 |
<refsect1> |
| 19 |
<title>Description</title> |
| 20 |
<para>Plugin opcode in counter.</para> |
| 21 |
<para> |
| 22 |
Create a counter object. |
| 23 |
</para> |
| 24 |
</refsect1> |
| 25 |
|
| 26 |
<refsect1> |
| 27 |
<title>Syntax</title> |
| 28 |
<synopsis>icnt <command>cntCreate</command> [imax, imin, inc]</synopsis> |
| 29 |
</refsect1> |
| 30 |
|
| 31 |
<refsect1> |
| 32 |
<title>Initialization</title> |
| 33 |
<para> |
| 34 |
<emphasis>imax</emphasis> -- optional maximum value for the |
| 35 |
counter, defaulting to 1. |
| 36 |
</para> |
| 37 |
<para> |
| 38 |
<emphasis>imin</emphasis> -- optional minimun value for the counter, |
| 39 |
defaulting to 0. |
| 40 |
</para> |
| 41 |
<para> |
| 42 |
<emphasis>inc</emphasis> -- optional increment for the |
| 43 |
counter, defaulting to 1. |
| 44 |
</para> |
| 45 |
<para> |
| 46 |
<emphasis>icnt</emphasis> -- a handle for the counter. |
| 47 |
</para> |
| 48 |
</refsect1> |
| 49 |
|
| 50 |
` <refsect1> |
| 51 |
<title>Performance</title> |
| 52 |
<para> |
| 53 |
Creates a counter object which loops between |
| 54 |
<emphasis>imin</emphasis> and <emphasis>imax</emphasis> in |
| 55 |
steps of <emphasis>inc</emphasis>. Used without an argument, |
| 56 |
using the defaults creates a flip-flop. |
| 57 |
</para> |
| 58 |
</refsect1> |
| 59 |
|
| 60 |
<refsect1> |
| 61 |
<title>Examples</title> |
| 62 |
<para> |
| 63 |
Here is an example of the cndCreate opcode. It uses the file <ulink url="examples/counter.csd"><citetitle>counter.csd</citetitle></ulink>. |
| 64 |
<example> |
| 65 |
<title>Example of the cntCreate opcode.</title> |
| 66 |
<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> |
| 67 |
<xi:include href="examples-xml/counter.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 68 |
</example> |
| 69 |
<para> |
| 70 |
A musical example featuring the cntCreate opcode: <ulink url="examples/musical/NervousHappyBirthday_Cucchi.csd"><citetitle>NervousHappyBirthday_Cucchi.csd</citetitle></ulink> by Stefano Cucchi. |
| 71 |
</para> |
| 72 |
</para> |
| 73 |
</refsect1> |
| 74 |
|
| 75 |
<refsect1> |
| 76 |
<title>See also</title> |
| 77 |
<para><link linkend="ControlPgmctl"><citetitle>Program Flow Control: Counter</citetitle></link></para> |
| 78 |
</refsect1> |
| 79 |
|
| 80 |
<refsect1> |
| 81 |
<title>Credits</title> |
| 82 |
<para>By: &namejohn; June 2020</para> |
| 83 |
<para>New in version 6.15</para> |
| 84 |
</refsect1> |
| 85 |
</refentry> |