Debian Codegraph @

opcodes/xtratim.xml

raw symbols SCIP
1
2 <refentry id="xtratim">
3 <indexterm id="IndexXtratim"><primary>xtratim</primary></indexterm>
4 <refentryinfo><title>Real-time MIDI:Event Extenders</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>xtratim</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>xtratim</refname>
11
12 <refpurpose>
13 Extend the duration of real-time generated events.
14 </refpurpose>
15 </refnamediv>
16
17 <refsect1>
18 <title>Description</title>
19 <para>
20 Extend the duration of real-time generated events and handle their extra life (Usually for usage along with <link linkend="release"><citetitle>release</citetitle></link> instead of <link linkend="linenr"><citetitle>linenr</citetitle></link>, <link linkend="linsegr"><citetitle>linsegr</citetitle></link>, etc).
21 </para>
22 </refsect1>
23
24 <refsect1>
25 <title>Syntax</title>
26 <synopsis><command>xtratim</command> iextradur</synopsis>
27 </refsect1>
28
29 <refsect1>
30 <title>Initialization</title>
31 <para>
32 <emphasis>iextradur</emphasis> -- additional duration of current instrument instance
33 </para>
34 </refsect1>
35
36 <refsect1>
37 <title>Performance</title>
38 <para>
39 <emphasis>xtratim</emphasis> extends current MIDI-activated note duration by <emphasis>iextradur</emphasis> seconds after the corresponding noteoff message has deactivated the current note itself. It is usually used in conjunction with <link linkend="release"><citetitle>release</citetitle></link>. This opcode has no output arguments.
40 </para>
41 <para>
42 This opcode is useful for implementing complex release-oriented envelopes, whose duration is not known when the envelope starts (e.g. for real-time MIDI generated events).
43 </para>
44 </refsect1>
45
46 <refsect1>
47 <title>Examples</title>
48 <para>
49 Here is a simple example of the xtratim opcode. It uses the file <ulink url="examples/xtratim.csd"><citetitle>xtratim.csd</citetitle></ulink>.
50
51 <example>
52 <title>Example of the xtratim opcode.</title>
53 <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>
54 <para>This example shows how to generate a release segment for an ADSR envelope after a MIDI noteoff is received, extending the duration with <emphasis>xtratim</emphasis> and using <link linkend="release"><citetitle>release</citetitle></link> to check whether the note is on the release phase.</para>
55 <xi:include href="examples-xml/xtratim.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
56 </example>
57 </para>
58 <para>
59 Here is a more elaborate example of the xtratim opcode. It uses the file <ulink url="examples/xtratim-2.csd"><citetitle>xtratim-2.csd</citetitle></ulink>.
60
61 <example>
62 <title>More complex example of the xtratim opcode.</title>
63 <para>This example shows how to generate a release segment for an ADSR envelope after a MIDI noteoff is received, extending the duration with <emphasis>xtratim</emphasis> and using <link linkend="release"><citetitle>release</citetitle></link> to check whether the note is on the release phase. Two envelopes are generated simultaneously for the left and right channels.</para>
64 <xi:include href="examples-xml/xtratim-2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
65 </example>
66 </para>
67 </refsect1>
68
69 <refsect1>
70 <title>See also</title>
71 <para><link linkend="MidiExtender"><citetitle>Event Extenders</citetitle></link></para>
72 </refsect1>
73
74 <refsect1>
75 <title>Credits</title>
76 <para>Author: &namegabriel;</para>
77 <para>Italy</para>
78 <para>Examples by Gabriel Maldonado and Jonathan Murphy</para>
79
80 <para>New in Csound version 3.47</para>
81 </refsect1>
82 </refentry>