Debian Codegraph @

opcodes/oscil3.xml

raw symbols SCIP
1
2 <refentry id="oscil3">
3 <indexterm id="IndexOscil3"><primary>oscil3</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Basic Oscillators</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>oscil3</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>oscil3</refname>
11 <refpurpose>
12 A simple oscillator with cubic interpolation.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 <emphasis>oscil3</emphasis> reads table <emphasis>ifn</emphasis> sequentially and repeatedly at a frequency <emphasis>xcps</emphasis>. The amplitude is scaled by <emphasis>xamp</emphasis>. Cubic interpolation is applied for table look up from internal phase values.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis>ares <command>oscil3</command> xamp, xcps [, ifn, iphs]</synopsis>
26
27 <synopsis>kres <command>oscil3</command> kamp, kcps [, ifn, iphs]</synopsis>
28 </refsect1>
29
30 <refsect1>
31 <title>Initialization</title>
32 <para>
33 <emphasis>ifn</emphasis> (optional) -- function table
34 number. Requires a wrap-around guard point. Defaults to -1
35 indicating a sinewave.
36 </para>
37
38 <para>
39 <emphasis>iphs</emphasis> (optional) -- initial phase of sampling, expressed as a fraction of a cycle (0 to 1). A negative value will cause phase initialization to be skipped. The default value is 0.
40 </para>
41 </refsect1>
42
43 <refsect1>
44 <title>Performance</title>
45 <para>
46 <emphasis>kamp, xamp</emphasis> -- amplitude
47 </para>
48
49 <para>
50 <emphasis>kcps, xcps</emphasis> -- frequency in cycles per second.
51 </para>
52
53 <para>
54 <emphasis>oscil3</emphasis> is identical to <link linkend="oscili"><citetitle>oscili</citetitle></link>, except that it uses cubic interpolation.
55 </para>
56 <para>
57 Table <emphasis>ifn</emphasis> is incrementally sampled modulo the table length and the value obtained is multiplied by <emphasis>amp</emphasis>.
58 </para>
59 <para>
60 If you need to change the oscillator table with a k-rate signal, you can use <link linkend="oscilikt"><citetitle>oscilikt</citetitle></link>.
61 </para>
62 </refsect1>
63
64 <refsect1>
65 <title>Examples</title>
66 <para>
67 Here is an example of the oscil3 opcode. It uses the file <ulink url="examples/oscil3.csd"><citetitle>oscil3.csd</citetitle></ulink>.
68
69 <example>
70 <title>Example of the oscil3 opcode.</title>
71 <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>
72 <xi:include href="examples-xml/oscil3.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
73 </example>
74 </para>
75 </refsect1>
76
77 <refsect1>
78 <title>See also</title>
79 <para><link linkend="SiggenBasic"><citetitle>Basic Oscillators</citetitle></link></para>
80 </refsect1>
81
82 <refsect1>
83 <title>Credits</title>
84 <para>Author: &namejohn;</para>
85 <para>New in Csound version 3.50</para>
86 </refsect1>
87 </refentry>