Debian Codegraph @

opcodes/vco.xml

raw symbols SCIP
1
2 <refentry id="vco">
3 <indexterm id="IndexVco"><primary>vco</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Dynamic Spectrum Oscillators</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>vco</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>vco</refname>
13 <refpurpose>
14 Implementation of a band limited, analog modeled oscillator.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 Implementation of a band limited, analog modeled oscillator, based on integration of band limited impulses. <emphasis>vco</emphasis> can be used to simulate a variety of analog wave forms.
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis>ares <command>vco</command> xamp, xcps, iwave, kpw [, ifn] [, imaxd] [, ileak] [, inyx] \
28 [, iphs] [, iskip]</synopsis>
29 </refsect1>
30
31 <refsect1>
32 <title>Initialization</title>
33 <para>
34 <emphasis>iwave</emphasis> -- determines the waveform:
35 <itemizedlist>
36 <listitem>
37 <para><emphasis>iwave</emphasis> = 1 - sawtooth</para>
38 </listitem>
39
40 <listitem>
41 <para><emphasis>iwave</emphasis> = 2 - square/PWM</para>
42 </listitem>
43
44 <listitem>
45 <para><emphasis>iwave</emphasis> = 3 - triangle/saw/ramp</para>
46 </listitem>
47 </itemizedlist>
48 </para>
49
50 <para>
51 <emphasis>ifn</emphasis> (optional, default = 1) -- Must point to a
52 valid table which contains a sine wave. Csound will report an
53 error if this parameter is not set and table 1 does not exist.
54 </para>
55
56 <para>
57 <emphasis>imaxd</emphasis> (optional, default = 1) -- is the maximum delay time. A time of 1/<emphasis>ifqc</emphasis> may be required for the PWM and triangle waveform. To bend the pitch down this value must be as large as 1/(minimum frequency).
58 </para>
59
60 <para>
61 <emphasis>ileak</emphasis> (optional, default = 0) -- if <emphasis>ileak</emphasis> is between zero and one (0 &lt; ileak &lt; 1) then <emphasis>ileak</emphasis> is used as the leaky integrator value. Otherwise a leaky integrator value of .999 is used for the saw and square waves and .995 is used for the triangle wave. This can be used to <quote>flatten</quote> the square wave or <quote>straighten</quote> the saw wave at low frequencies by setting <emphasis>ileak</emphasis> to .99999 or a similar value. This should give a hollower sounding square wave.
62 </para>
63
64 <para>
65 <emphasis>inyx</emphasis> (optional, default = .5) -- this is used to determine the number of harmonics in the band limited pulse. All overtones up to <emphasis>sr</emphasis> * <emphasis>inyx</emphasis> will be used. The default gives <emphasis>sr</emphasis> * .5 (<emphasis>sr</emphasis>/2). For <emphasis>sr</emphasis>/4 use <emphasis>inyx</emphasis> = .25. This can generate a <quote>fatter</quote> sound in some cases.
66 </para>
67
68 <para>
69 <emphasis>iphs</emphasis> (optional, default = 0) -- this is a phase value. There is an artifact (bug-like feature) in <emphasis>vco</emphasis> which occurs during the first half cycle of the square wave which causes the waveform to be greater in magnitude than all others. The value of <emphasis>iphs</emphasis> has an effect on this artifact. In particular setting <emphasis>iphs</emphasis> to .5 will cause the first half cycle of the square wave to resemble a small triangle wave. This may be more desirable than the large wave artifact which is the current default.
70 </para>
71 <para>
72 <emphasis>iskip</emphasis> (optional, default = 0) -- if non zero
73 skip the initialisation of the filter. (New in Csound version
74 4.23f13 and 5.0)
75 </para>
76 </refsect1>
77
78 <refsect1>
79 <title>Performance</title>
80 <para>
81 <emphasis>kpw</emphasis> -- determines either the pulse width (if <emphasis>iwave</emphasis> is 2) or the saw/ramp character (if <emphasis>iwave</emphasis> is 3) The value of <emphasis>kpw</emphasis> should be greater than 0 and less than 1. A value of 0.5 will generate either a square wave (if <emphasis>iwave</emphasis> is 2) or a triangle wave (if <emphasis>iwave</emphasis> is 3).
82
83 </para>
84 <para>
85 <emphasis>xamp</emphasis> -- determines the amplitude
86 </para>
87
88 <para>
89 <emphasis>xcps</emphasis> -- is the frequency of the wave in cycles per second.
90 </para>
91 </refsect1>
92
93 <refsect1>
94 <title>Examples</title>
95 <para>
96 Here is an example of the vco opcode. It uses the file <ulink url="examples/vco.csd"><citetitle>vco.csd</citetitle></ulink>.
97
98 <example>
99 <title>Example of the vco opcode.</title>
100
101
102
103 <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>
104 <xi:include href="examples-xml/vco.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
105 </example>
106 </para>
107 </refsect1>
108
109 <refsect1>
110 <title>See Also</title>
111 <para>
112 <link linkend="SiggenDynamic"><citetitle>Dynamic Spectrum Oscillators</citetitle></link>
113 </para>
114 </refsect1>
115
116 <refsect1>
117 <title>Credits</title>
118 <para>
119 <simplelist>
120 <member>Author: &namehans;</member>
121 <member>December 1998</member>
122 </simplelist>
123 </para>
124
125 <para>New in Csound version 3.50</para>
126 <para>November 2002. Corrected the documentation for the <emphasis>kpw</emphasis> parameter thanks to &nameluis; and &namehans;.</para>
127 </refsect1>
128 </refentry>