Debian Codegraph @

scoregens/gen11.xml

raw symbols SCIP
1
2 <refentry id="GEN11">
3 <indexterm id="IndexGEN11"><primary>GEN11</primary></indexterm>
4 <refmeta>
5 <refentrytitle>GEN11</refentrytitle>
6 </refmeta>
7
8 <refnamediv>
9 <refname>GEN11</refname>
10 <refpurpose>
11 Generates an additive set of cosine partials.
12 </refpurpose>
13 </refnamediv>
14
15 <refsect1>
16 <title>Description</title>
17 <para>
18 This subroutine generates an additive set of cosine partials, in the manner of Csound generators <link linkend="buzz"><citetitle>buzz</citetitle></link> and <link linkend="gbuzz"><citetitle>gbuzz</citetitle></link>.
19 </para>
20 </refsect1>
21
22 <refsect1>
23 <title>Syntax</title>
24 <synopsis><command>f</command> # time size 11 nh [lh] [r]</synopsis>
25 </refsect1>
26
27 <refsect1>
28 <title>Initialization</title>
29 <para>
30 <emphasis>size</emphasis> -- number of points in the table. Must be a power of 2 or power-of-2 plus 1 (see <link linkend="f"><citetitle>f statement</citetitle></link>).
31 </para>
32
33 <para>
34 <emphasis>nh</emphasis> -- number of harmonics requested. Must be positive.
35 </para>
36
37 <para>
38 <emphasis>lh</emphasis>(optional) -- lowest harmonic partial present. Can be positive, zero or negative. The set of partials can begin at any partial number and proceeds upwards; if <emphasis>lh</emphasis> is negative, all partials below zero will reflect in zero to produce positive partials without phase change (since cosine is an even function), and will add constructively to any positive partials in the set. The default value is 1
39 </para>
40
41 <para>
42 <emphasis>r</emphasis>(optional) -- multiplier in an amplitude coefficient series. This is a power series: if the <emphasis>lh</emphasis>th partial has a strength coefficient of A the (<emphasis>lh</emphasis> + n)th partial will have a coefficient of A * r<superscript>n</superscript>, i.e. strength values trace an exponential curve. <emphasis>r</emphasis> may be positive, zero or negative, and is not restricted to integers. The default value is 1.
43 </para>
44
45 <note>
46 <title>Note</title>
47 <para>
48 <itemizedlist>
49 <listitem>
50 <para>
51 This subroutine is a non-time-varying version of the CSound <link linkend="buzz"><citetitle>buzz</citetitle></link>and <link linkend="gbuzz"><citetitle>gbuzz</citetitle></link> generators, and is similarly useful as a complex sound source in subtractive synthesis. With <emphasis>lh</emphasis> and <emphasis>r</emphasis> present it parallels <emphasis>gbuzz</emphasis>; with both absent or equal to 1 it reduces to the simpler <emphasis>buzz</emphasis> (i.e. <emphasis>nh</emphasis> equal-strength harmonic partials beginning with the fundamental).
52 </para>
53 </listitem>
54
55 <listitem>
56 <para>
57 Sampling the stored waveform with an oscillator is more efficient than using the dynamic buzz units. However, the spectral content is invariant and care is necessary, lest the higher partials exceed the Nyquist during sampling to produce fold-over.
58 </para>
59 </listitem>
60 </itemizedlist>
61 </para>
62 </note>
63 </refsect1>
64
65 <refsect1>
66 <title>Examples</title>
67 <para>
68 Here is an example of the GEN11 routine. It uses the files <ulink url="examples/gen01.csd"><citetitle>gen11.csd</citetitle></ulink>.
69 <example>
70 <title>An example of the GEN11 routine.</title>
71 <xi:include href="examples-xml/gen11.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
72 </example>
73
74 <textobject>
75 <phrase>These are the diagrams of the waveforms of the GEN11 routines, as used in the example:</phrase>
76 </textobject>
77
78 <mediaobject>
79 <imageobject>
80 <imagedata fileref="images/gen11_1.png" format="PNG"/>
81 </imageobject>
82
83 <textobject>
84 <phrase>f 1 0 16384 11 1 1</phrase>
85 </textobject>
86
87 <caption>
88 <para>f 1 0 16384 11 1 1</para>
89 </caption>
90 </mediaobject>
91
92 <mediaobject>
93 <imageobject>
94 <imagedata fileref="images/gen11_2.png" format="PNG"/>
95 </imageobject>
96
97 <textobject>
98 <phrase>f 2 0 16384 11 10 1 .7</phrase>
99 </textobject>
100
101 <caption>
102 <para>f 2 0 16384 11 10 1 .7</para>
103 </caption>
104 </mediaobject>
105
106 <mediaobject>
107 <imageobject>
108 <imagedata fileref="images/gen11_3.png" format="PNG"/>
109 </imageobject>
110
111 <textobject>
112 <phrase>f 3 0 16384 11 10 5 2</phrase>
113 </textobject>
114
115 <caption>
116 <para>f 3 0 16384 11 10 5 2</para>
117 </caption>
118 </mediaobject>
119
120 </para>
121 </refsect1>
122
123 <refsect1>
124 <title>See Also</title>
125 <para>
126 <link linkend="GEN10"><citetitle>GEN10</citetitle></link>
127 </para>
128 </refsect1>
129
130 </refentry>