| 1 | |
| 2 | <refentry id="cosseg"> |
| 3 | <indexterm id="IndexCosseg"><primary>cosseg</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Linear and Exponential Generators</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>cosseg</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>cosseg</refname> |
| 13 | <refpurpose> |
| 14 | Trace a series of line segments between specified points with |
| 15 | cosine interpolation. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | Trace a series of line segments between specified points with |
| 23 | cosine interpolation. |
| 24 | </para> |
| 25 | </refsect1> |
| 26 | |
| 27 | <refsect1> |
| 28 | <title>Syntax</title> |
| 29 | <synopsis>ares <command>cosseg</command> ia, idur1, ib [, idur2] [, ic] [...]</synopsis> |
| 30 | |
| 31 | <synopsis>kres <command>cosseg</command> ia, idur1, ib [, idur2] [, ic] [...]</synopsis> |
| 32 | </refsect1> |
| 33 | |
| 34 | <refsect1> |
| 35 | <title>Initialization</title> |
| 36 | <para> |
| 37 | <emphasis>ia</emphasis> -- starting value. |
| 38 | </para> |
| 39 | |
| 40 | <para> |
| 41 | <emphasis>ib, ic</emphasis>, etc. -- value after |
| 42 | <emphasis>dur1</emphasis> seconds, etc. |
| 43 | </para> |
| 44 | |
| 45 | <para> |
| 46 | <emphasis>idur1</emphasis> -- duration in seconds of first |
| 47 | segment. A zero or negative value will cause all initialization |
| 48 | to be skipped. |
| 49 | </para> |
| 50 | |
| 51 | <para> |
| 52 | <emphasis>idur2, idur3</emphasis>, etc. -- duration in seconds |
| 53 | of subsequent segments. A zero or negative value will terminate |
| 54 | the initialization process with the preceding point, permitting |
| 55 | the last-defined line or curve to be continued indefinitely in |
| 56 | performance. The default is zero. |
| 57 | </para> |
| 58 | </refsect1> |
| 59 | |
| 60 | <refsect1> |
| 61 | <title>Performance</title> |
| 62 | <para> |
| 63 | These units generate control or audio signals whose values can |
| 64 | pass through 2 or more specified points. The sum of |
| 65 | <emphasis>dur</emphasis> values may or may not equal the |
| 66 | instrument's performance time: a shorter performance will |
| 67 | truncate the specified pattern, while a longer one will cause |
| 68 | the last value to be repeated until the end of the note. |
| 69 | </para> |
| 70 | </refsect1> |
| 71 | |
| 72 | <refsect1> |
| 73 | <title>Examples</title> |
| 74 | <para> |
| 75 | Here is an example of the cosseg opcode. It uses the file <ulink url="examples/cosseg.csd"><citetitle>cosseg.csd</citetitle></ulink>. |
| 76 | |
| 77 | <example> |
| 78 | <title>Example of the cosseg opcode.</title> |
| 79 | <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> |
| 80 | <xi:include href="examples-xml/cosseg.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 81 | </example> |
| 82 | </para> |
| 83 | </refsect1> |
| 84 | |
| 85 | <refsect1> |
| 86 | <title>See also</title> |
| 87 | <para><link linkend="SiggenLineexp"><citetitle>Linear and Exponential Generators</citetitle></link></para> |
| 88 | </refsect1> |
| 89 | |
| 90 | <refsect1> |
| 91 | <title>Credits</title> |
| 92 | <para> |
| 93 | <simplelist> |
| 94 | <member>Author: &namejohn;</member> |
| 95 | <member>Aug 2012 </member> |
| 96 | </simplelist> |
| 97 | </para> |
| 98 | <para> New in version 5.18</para> |
| 99 | </refsect1> |
| 100 | </refentry> |