Debian Codegraph @

scoregens/gen19.xml

raw symbols SCIP
1
2 <refentry id="GEN19">
3 <indexterm id="IndexGEN19"><primary>GEN19</primary></indexterm>
4 <refmeta>
5 <refentrytitle>GEN19</refentrytitle>
6 </refmeta>
7
8 <refnamediv>
9 <refname>GEN19</refname>
10 <refpurpose>
11 Generate composite waveforms made up of weighted sums of simple sinusoids.
12 </refpurpose>
13 </refnamediv>
14
15 <refsect1>
16 <title>Description</title>
17 <para>
18 These subroutines generate composite waveforms made up of weighted sums of simple sinusoids. The specification of each contributing partial requires 4 p-fields using <emphasis>GEN19</emphasis>.
19 </para>
20 </refsect1>
21
22 <refsect1>
23 <title>Syntax</title>
24 <synopsis><command>f</command> # time size 19 pna stra phsa dcoa pnb strb phsb dcob ...</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>pna, pnb</emphasis>, etc. -- partial no. (relative to a fundamental that would occupy <emphasis>size</emphasis> locations per cycle) of sinusoid a, sinusoid b, etc. Must be positive, but need not be a whole number, i.e., non-harmonic partials are permitted. Partials may be in any order.
35 </para>
36
37 <para>
38 <emphasis>stra, strb</emphasis>, etc. -- strength of partials <emphasis>pna, pnb</emphasis>, etc. These are relative strengths, since the composite waveform may be rescaled later. Negative values are permitted and imply a 180 degree phase shift.
39 </para>
40
41 <para>
42 <emphasis>phsa, phsb</emphasis>, etc. -- initial phase of partials <emphasis>pna, pnb,</emphasis> etc., expressed in degrees.
43 </para>
44
45 <para>
46 <emphasis>dcoa, dcob</emphasis>, etc. -- DC offset of partials <emphasis>pna, pnb</emphasis>, etc. This is applied <emphasis>after</emphasis> strength scaling, i.e. a value of 2 will lift a 2-strength sinusoid from range [-2,2] to range [0,4] (before later rescaling).
47 </para>
48
49 <note>
50 <title>Note</title>
51 <para>
52 <itemizedlist>
53 <listitem>
54 <para>
55 These subroutines generate stored functions as sums of sinusoids of different frequencies. The two major restrictions on <emphasis>GEN10</emphasis> that the partials be harmonic and in phase do not apply to <emphasis>GEN09</emphasis> or <emphasis>GEN19</emphasis>.
56 </para>
57
58 <para>
59 In each case the composite wave, once drawn, is then rescaled to unity if p4 was positive. A negative p4 will cause rescaling to be skipped.
60 </para>
61 </listitem>
62 </itemizedlist>
63 </para>
64 </note>
65 </refsect1>
66
67 <refsect1>
68 <title>Examples</title>
69 <para>
70 Here is an example of the GEN19 routine. It uses the files <ulink url="examples/gen19.csd"><citetitle>gen19.csd</citetitle></ulink>.
71 <example>
72 <title>An example of the GEN19 routine.</title>
73 <xi:include href="examples-xml/gen19.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
74 </example>
75
76 <textobject>
77 <phrase>This is the diagram of the waveform of the GEN19 routines, as used in the example:</phrase>
78 </textobject>
79
80 <mediaobject>
81 <imageobject>
82 <imagedata fileref="images/gen19_1.png" format="PNG"/>
83 </imageobject>
84
85 <textobject>
86 <phrase>f 2 0 1024 19 .5 .5 270 .5 - a rising sigmoid</phrase>
87 </textobject>
88
89 <caption>
90 <para>f 2 0 1024 19 .5 .5 270 .5 - a rising sigmoid</para>
91 </caption>
92 </mediaobject>
93
94 </para>
95 </refsect1>
96
97
98 <refsect1>
99 <title>See Also</title>
100 <para>
101 <link linkend="GEN09"><citetitle>GEN09</citetitle></link> and
102 <link linkend="GEN10"><citetitle>GEN10</citetitle></link>
103 </para>
104 </refsect1>
105
106 </refentry>