Debian Codegraph @

opcodes/trigger.xml

raw symbols SCIP
1
2 <refentry id="trigger">
3 <indexterm id="IndexTrigger"><primary>trigger</primary></indexterm>
4 <refentryinfo><title>Instrument Control:Sensing and Control</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>trigger</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>trigger</refname>
13
14 <refpurpose>
15 Informs when a krate signal crosses a threshold.
16 </refpurpose>
17 </refnamediv>
18
19 <refsect1>
20 <title>Description</title>
21 <para>
22 Informs when a krate signal crosses a threshold.
23 </para>
24 </refsect1>
25
26 <refsect1>
27 <title>Syntax</title>
28 <synopsis>kout <command>trigger</command> ksig, kthreshold, kmode</synopsis>
29 </refsect1>
30
31 <refsect1>
32 <title>Performance</title>
33 <para>
34 <emphasis>ksig</emphasis> -- input signal
35 </para>
36
37 <para>
38 <emphasis>kthreshold</emphasis> -- trigger threshold
39 </para>
40
41 <para>
42 <emphasis>kmode</emphasis> -- can be 0 , 1 or 2
43 </para>
44
45 <para>
46 Normally <emphasis>trigger</emphasis> outputs zeroes: only each time <emphasis>ksig</emphasis> crosses <emphasis>kthreshold</emphasis> <emphasis>trigger</emphasis> outputs a 1. There are three modes of using <emphasis>ktrig</emphasis>:
47 <itemizedlist>
48 <listitem><para><emphasis>kmode</emphasis> = 0 - (down-up) <emphasis>ktrig</emphasis> outputs a 1 when current value of <emphasis>ksig</emphasis> is higher than <emphasis>kthreshold,</emphasis> while old value of <emphasis>ksig</emphasis> was equal to or lower than <emphasis>kthreshold</emphasis>.</para></listitem>
49 <listitem><para><emphasis>kmode</emphasis> = 1 - (up-down) <emphasis>ktrig</emphasis> outputs a 1 when current value of <emphasis>ksig</emphasis> is lower than <emphasis>kthreshold</emphasis> while old value of <emphasis>ksig</emphasis> was equal or higher than <emphasis>kthreshold</emphasis>.</para></listitem>
50 <listitem><para><emphasis>kmode</emphasis> = 2 - (both) <emphasis>ktrig</emphasis> outputs a 1 in both the two previous cases.</para></listitem>
51 </itemizedlist>
52 </para>
53 </refsect1>
54
55 <refsect1>
56 <title>Examples</title>
57 <para>
58 Here is an example of the trigger opcode. It uses the file <ulink url="examples/trigger.csd"><citetitle>trigger.csd</citetitle></ulink>.
59 <example>
60 <title>Example of the trigger opcode.</title>
61 <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>
62 <xi:include href="examples-xml/trigger.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
63 </example>
64 </para>
65 </refsect1>
66
67 <refsect1>
68 <title>See also</title>
69 <para><link linkend="ControlSensing"><citetitle>Sensing and Control: Tempo and Sequencing</citetitle></link></para>
70 </refsect1>
71
72 <refsect1>
73 <title>Credits</title>
74 <para>
75 <simplelist>
76 <member>Author: &namegabriel;</member>
77 <member>Italy</member>
78 </simplelist>
79 </para>
80 <para>New in Csound version 3.49</para>
81 </refsect1>
82 </refentry>