Debian Codegraph @

opcodes/cossegr.xml

raw symbols SCIP
1
2 <refentry id="cossegr">
3 <indexterm id="IndexCossegr"><primary>cossegr</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Linear and Exponential Generators</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>cossegr</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>cossegr</refname>
13 <refpurpose>
14 Trace a series of line segments between specified points with
15 cosine interpolation, including a release segment.
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, including a release segment.
24 </para>
25 </refsect1>
26
27 <refsect1>
28 <title>Syntax</title>
29 <synopsis>ares <command>cossegr</command> ia, idur1, ib [, idur2] [, ic] [...], irel, iz</synopsis>
30
31 <synopsis>kres <command>cossegr</command> ia, idur1, ib [, idur2] [, ic] [...], irel, iz</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 <emphasis>dur1</emphasis> seconds, etc.
42 </para>
43
44 <para>
45 <emphasis>idur1</emphasis> -- duration in seconds of first segment. A zero or negative value will cause all initialization to be skipped.
46 </para>
47
48 <para>
49 <emphasis>idur2, idur3</emphasis>, etc. -- duration in seconds of subsequent segments. A zero or negative value will terminate the initialization process with the preceding point, permitting the last-defined line or curve to be continued indefinitely in performance. The default is zero.
50 </para>
51
52 <para>
53 <emphasis>irel, iz</emphasis> -- duration in seconds and final value of a note releasing segment.
54 </para>
55
56 </refsect1>
57
58 <refsect1>
59 <title>Performance</title>
60 <para>
61 These units generate control or audio signals whose values can pass through 2 or more specified points. The sum of <emphasis>dur</emphasis> values may or may not equal the instrument's performance time: a shorter performance will truncate the specified pattern, while a longer one will cause the last-defined segment to continue on in the same direction.
62 </para>
63
64 <para>
65 <emphasis>cossegr</emphasis> is amongst the Csound <quote>r</quote> units that contain a note-off sensor and release time extender. When each senses an event termination or MIDI noteoff, it immediately extends the performance time of the current instrument by <emphasis>irel </emphasis>seconds, and sets out to reach the value <emphasis>iz</emphasis> by the end of that period (no matter which segment the unit is in). <quote>r</quote> units can also be modified by MIDI noteoff velocities. For two or more extenders in an instrument, extension is by the greatest period.
66 </para>
67 <para>
68 You can use other pre-made envelopes which start a release
69 segment upon receiving a note off message, like <link
70 linkend="linenr"><citetitle>linenr</citetitle></link> and <link
71 linkend="expsegr"><citetitle>expsegr</citetitle></link>, or you
72 can construct more complex envelopes using <link
73 linkend="xtratim"><citetitle>xtratim</citetitle></link> and
74 <link
75 linkend="release"><citetitle>release</citetitle></link>. Note
76 that you do not need to use <link linkend="xtratim"><citetitle>xtratim</citetitle></link> if you are using <emphasis>cossegr</emphasis>, since the time is extended automatically.
77 </para>
78 </refsect1>
79
80 <refsect1>
81 <title>Examples</title>
82 <para>
83 Here is an example of the cossegr opcode. It uses the file <ulink url="examples/cossegr.csd"><citetitle>cossegr.csd</citetitle></ulink>.
84
85 <example>
86 <title>Example of the cossegr opcode.</title>
87 <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>
88 <xi:include href="examples-xml/cossegr.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
89 </example>
90 </para>
91 </refsect1>
92
93 <refsect1>
94 <title>See also</title>
95 <para><link linkend="SiggenLineexp"><citetitle>Linear and Exponential Generators</citetitle></link></para>
96 </refsect1>
97
98 <refsect1>
99 <title>Credits</title>
100 <para>Author: &namejohn;</para>
101 <para>August 2012.</para>
102 <para>New in Csound 5.18</para>
103 </refsect1>
104 </refentry>