Debian Codegraph @

opcodes/trigphasor.xml

raw symbols SCIP
1 <refentry id="trigphasor">
2 <indexterm id="Indextrigphasor"><primary>trigphasor</primary></indexterm>
3 <refentryinfo><title>Signal Generators:Phasors</title></refentryinfo>
4 <refmeta>
5 <refentrytitle>trigphasor</refentrytitle>
6 </refmeta>
7
8 <refnamediv>
9 <refname>trigphasor</refname>
10 <refpurpose>
11 A resettable linear ramp between two levels
12 </refpurpose>
13 </refnamediv>
14
15 <refsect1>
16 <title>Description</title>
17 <para>Plugin opcode in scugens.</para>
18 <para>
19 A resettable linear ramp between two levels (port of Supercollider's Phasor).
20 <emphasis>trigphasor</emphasis> is a linear ramp between <emphasis>kstart</emphasis> and
21 <emphasis>kend</emphasis> values. When its trigger input crosses from non-positive to
22 positive, trigphasor's output will jump to its reset position (or to
23 <emphasis>kstart</emphasis>if no reset value was given). Upon reaching the end of its
24 ramp, trigphasor will wrap back to its start.
25 </para>
26 </refsect1>
27
28 <refsect1>
29 <title>Syntax</title>
30 <synopsis>aindex <command>trigphasor</command> xtrig, xrate, kstart, kend [, kresetPos] </synopsis>
31
32 <synopsis>kindex <command>trigphasor</command> xtrig, xrate, kstart, kend [, kresetPos] </synopsis>
33
34 </refsect1>
35
36 <refsect1>
37 <title>Performance</title>
38 <para>
39 <emphasis>xtrig</emphasis> -- trigger, whenever this crosses from non-positive to possitive
40 </para>
41 <para>
42 <emphasis>xrate</emphasis> -- value added at each evaluation. When running at k-rate, this
43 value is added at each cycle; at a-rate, this value is added per sample (ksmps per cycle).
44 </para>
45 <para>
46 <emphasis>kstart, kend</emphasis> -- start and end values of the phasor
47 </para>
48 <para>
49 <emphasis>xtrig</emphasis> -- trigger, whenever this crosses from non-positive to possitive
50 </para>
51
52 <para>
53
54 <emphasis>kresetPos</emphasis> -- if specified, this value will be used to jump to after a
55 trigger. Otherwise, a trigger will set the position back to <emphasis>kstart</emphasis>
56 </para>
57 <para>
58 To generate a phasing signal from kstart to kend with a given period (duration of each
59 cycle), the calculation would be:
60
61 <literallayout>rate = (end - start) / (period * sr)</literallayout>
62
63 In the case of phasor being used at k-rate, use <emphasis>kr</emphasis> instead of
64 <emphasis>sr</emphasis> in the above formula.
65
66 </para>
67
68 </refsect1>
69
70 <refsect1>
71 <title>Examples</title>
72 <para>
73 Here is an example of the trigphasor opcode. It uses the file <ulink
74 url="examples/trigphasor.csd"><citetitle>trigphasor.csd</citetitle></ulink>.
75
76 <example>
77 <title>Example of the trigphasor opcode.</title>
78
79 <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>
80 <xi:include href="examples-xml/trigphasor.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
81 </example>
82 </para>
83 </refsect1>
84
85 <refsect1>
86 <title>See also</title>
87 <para><link linkend="SiggenPhasors"><citetitle>Phasors</citetitle></link></para>
88 </refsect1>
89
90 <refsect1>
91 <!-- And put your name and other relevant information here-->
92 <title>Credits</title>
93 <para>By: &nameeduardo; 2017</para>
94 </refsect1>
95 <!--Now remember to add a link from the appropriate category in the Opcode Overview.-->
96 <!--Add the entity to manual.xml-->
97 <!--Add the entity reference in the appropriate place in opcodes/top.xml-->
98 <!--And you're set! Maybe delete the comments as well...-->
99
100 </refentry>