Debian Codegraph @

opcodes/turnoff2.xml

raw symbols SCIP
1
2 <refentry id="turnoff2">
3 <indexterm id="IndexTurnoff2"><primary>turnoff2</primary></indexterm>
4 <refentryinfo><title>Instrument Control:Duration Control</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>turnoff2</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>turnoff2</refname>
11
12 <refpurpose>
13 Turn off instance(s) of other instruments at performance time.
14 </refpurpose>
15 </refnamediv>
16
17 <refsect1>
18 <title>Description</title>
19 <para>
20 Turn off instance(s) of other instruments at performance time.
21 </para>
22 </refsect1>
23
24 <refsect1>
25 <title>Syntax</title>
26 <synopsis><command>turnoff2</command> kinsno, kmode, krelease
27 </synopsis>
28 <synopsis><command>turnoff2_i</command> insno, imode, irelease
29 </synopsis>
30 </refsect1>
31
32 <refsect1>
33 <title>Initialization</title>
34 <para>
35 <emphasis>insno</emphasis>
36 -- instrument to be turned off (can be fractional) if zero or
37 negative, no instrument is turned off
38 </para>
39
40 <para>
41 <emphasis>imode</emphasis>
42 -- sum of the following values:
43
44 <itemizedlist>
45 <listitem>
46 <para>
47 0, 1, or 2: turn off all instances (0), oldest only
48 (1), or newest only (2)
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 4: only turn off notes with exactly matching
54 (fractional) instrument number, rather than ignoring
55 fractional part
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 8: only turn off notes with indefinite duration (p3
61 &lt; 0 or MIDI)
62 </para>
63 </listitem>
64 </itemizedlist>
65 </para>
66
67 <para>
68 <emphasis>irelease</emphasis>
69 -- if non-zero, the turned off instances are allowed to release,
70 otherwise are deactivated immediately (possibly resulting in
71 clicks)
72 </para>
73 </refsect1>
74
75 <refsect1>
76 <title>Performance</title>
77 <para>
78 <emphasis>kinsno</emphasis>
79 -- instrument to be turned off (can be fractional) if zero or
80 negative, no instrument is turned off
81 </para>
82
83 <para>
84 <emphasis>kmode</emphasis>
85 -- sum of the following values:
86
87 <itemizedlist>
88 <listitem>
89 <para>
90 0, 1, or 2: turn off all instances (0), oldest only
91 (1), or newest only (2)
92 </para>
93 </listitem>
94 <listitem>
95 <para>
96 4: only turn off notes with exactly matching
97 (fractional) instrument number, rather than ignoring
98 fractional part
99 </para>
100 </listitem>
101 <listitem>
102 <para>
103 8: only turn off notes with indefinite duration (p3
104 &lt; 0 or MIDI)
105 </para>
106 </listitem>
107 </itemizedlist>
108
109
110
111 </para>
112
113 <para>
114 <emphasis>krelease</emphasis>
115 -- if non-zero, the turned off instances are allowed to release,
116 otherwise are deactivated immediately (possibly resulting in
117 clicks)
118 </para>
119 <note><para>
120 As a rule of thumb, you should turn off instruments with a higher instrument number than the one where turnoff is called, as doing otherwise might cause initialization issues.
121 </para></note>
122
123 </refsect1>
124
125 <refsect1>
126 <title>Examples</title>
127 <para>
128 Here is an example of the turnoff2 opcode. It uses the file <ulink url="examples/turnoff2.csd"><citetitle>turnoff2.csd</citetitle></ulink>.
129 <example>
130 <title>Example of the turnoff2 opcode.</title>
131 <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>
132 <xi:include href="examples-xml/turnoff2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
133 </example>
134 </para>
135 </refsect1>
136
137 <refsect1>
138 <title>See also</title>
139 <para><link linkend="ControlDurctl"><citetitle>Duration Control Statements</citetitle></link></para>
140 </refsect1>
141
142 <refsect1>
143 <title>Credits</title>
144 <para>
145 <simplelist>
146 <member>Author: Istvan Varga</member>
147 <member>2005</member>
148 </simplelist>
149 </para>
150 <para>New in Csound 5.00</para>
151 </refsect1>
152
153 </refentry>