Debian Codegraph @

opcodes/linenr.xml

raw symbols SCIP
1
2 <refentry id="linenr">
3 <indexterm id="IndexLinenr"><primary>linenr</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Envelope Generators</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>linenr</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>linenr</refname>
11 <refpurpose>
12 The <emphasis>linen</emphasis> opcode extended with a final release segment.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 <emphasis>linenr</emphasis> -- same as <link linkend="linen"><citetitle>linen</citetitle></link> except that the final segment is entered only on sensing a MIDI note release. The note is then extended by the decay time.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis>ares <command>linenr</command> xamp, irise, idec, iatdec</synopsis>
26
27 <synopsis>kres <command>linenr</command> kamp, irise, idec, iatdec</synopsis>
28 </refsect1>
29
30 <refsect1>
31 <title>Initialization</title>
32 <para>
33 <emphasis>irise</emphasis> -- rise time in seconds. A zero or negative value signifies no rise modification.
34 </para>
35
36 <para>
37 <emphasis>idec</emphasis> -- decay time in seconds. Zero means no decay.
38 </para>
39
40 <para>
41 <emphasis>iatdec</emphasis> -- attenuation factor by which the closing steady state value is reduced exponentially over the decay period. This value must be positive and is normally of the order of .01. A large or excessively small value is apt to produce a cutoff which is audible. A zero or negative value is illegal.
42 </para>
43 </refsect1>
44
45 <refsect1>
46 <title>Performance</title>
47 <para>
48 <emphasis>kamp, xamp</emphasis> -- input amplitude signal.
49 </para>
50
51 <para>
52 <emphasis>linenr</emphasis> is unique within Csound in containing a <emphasis>note-off sensor</emphasis> and <emphasis>release time extender</emphasis>. When it senses either a score event termination or a MIDI noteoff, it will immediately extend the performance time of the current instrument by <emphasis>idec</emphasis> seconds, then execute an exponential decay towards the factor <emphasis>iatdec</emphasis>. For two or more units in an instrument, extension is by the greatest <emphasis>idec</emphasis>.
53 </para>
54
55 <para>
56 You can use other pre-made envelopes which start a release segment upon receiving a note off message, like <link linkend="linsegr"><citetitle>linsegr</citetitle></link> and <link linkend="expsegr"><citetitle>expsegr</citetitle></link>, or you can construct more complex envelopes using <link linkend="xtratim"><citetitle>xtratim</citetitle></link> and <link linkend="release"><citetitle>release</citetitle></link>. Note that you don't need to use <link linkend="xtratim"><citetitle>xtratim</citetitle></link> if you are using <emphasis>linenr</emphasis>, since the time is extended automatically.
57 </para>
58
59 <para>
60 These <quote>r</quote> units can also be modified by MIDI noteoff velocities (see veloffs).
61 </para>
62
63 </refsect1>
64
65 <refsect1>
66 <title>Examples</title>
67 <para>
68 Here is an example of the linenr opcode. It uses the file <ulink url="examples/linenr.csd"><citetitle>linenr.csd</citetitle></ulink>.
69 <example>
70 <title>Example of the linenr opcode.</title>
71 <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>
72 <xi:include href="examples-xml/linenr.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
73 </example>
74 </para>
75 </refsect1>
76
77 <refsect1>
78 <title>See Also</title>
79 <para>
80 <link linkend="SiggenEnvelope"><citetitle>Envelope Generators</citetitle></link>
81 </para>
82 </refsect1>
83
84 </refentry>