| 1 | |
| 2 | <refentry id="GEN15"> |
| 3 | <indexterm id="IndexGEN15"><primary>GEN15</primary></indexterm> |
| 4 | <refmeta> |
| 5 | <refentrytitle>GEN15</refentrytitle> |
| 6 | </refmeta> |
| 7 | |
| 8 | <refnamediv> |
| 9 | <refname>GEN15</refname> |
| 10 | <refpurpose> |
| 11 | Creates two tables of stored polynomial functions. |
| 12 | </refpurpose> |
| 13 | </refnamediv> |
| 14 | |
| 15 | <refsect1> |
| 16 | <title>Description</title> |
| 17 | <para> |
| 18 | This subroutine creates two tables of stored polynomial functions, suitable for use in phase quadrature operations. |
| 19 | </para> |
| 20 | </refsect1> |
| 21 | |
| 22 | <refsect1> |
| 23 | <title>Syntax</title> |
| 24 | <synopsis><command>f</command> # time size 15 xint xamp h0 phs0 h1 phs1 h2 phs2 ...</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 a power-of-2 plus 1 (see <link linkend="f"><citetitle>f statement</citetitle></link>). The normal value is power-of-2 plus 1. |
| 31 | </para> |
| 32 | |
| 33 | <para> |
| 34 | <emphasis>xint</emphasis> -- provides the left and right values [<emphasis>-xint</emphasis>, <emphasis>+xint</emphasis>] of the <emphasis>x</emphasis> interval over which the polynomial is to be drawn. This subroutine will eventually call <link linkend="GEN03"><citetitle>GEN03</citetitle></link> to draw both functions; this p5 value is therefor expanded to a negative-positive p5, p6 pair before <emphasis>GEN03</emphasis> is actually called. The normal value is 1. |
| 35 | </para> |
| 36 | |
| 37 | <para> |
| 38 | <emphasis>xamp </emphasis> -- amplitude scaling factor of the sinusoid input that is expected to produce the following spectrum. |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | <emphasis>h0, h1, h2, ... hn</emphasis> -- relative strength of partials 0 (DC), 1 (fundamental), 2 ... that will result when a sinusoid of amplitude |
| 43 | |
| 44 | <literallayout> |
| 45 | xamp * int(size/2)/xint |
| 46 | </literallayout> |
| 47 | |
| 48 | is waveshaped using this function table. These values thus describe a frequency spectrum associated with a particular factor <emphasis>xamp</emphasis> of the input signal. |
| 49 | </para> |
| 50 | |
| 51 | <para> |
| 52 | <emphasis>phs0, phs1, ... </emphasis> -- phase in degrees of desired harmonics <emphasis>h0, h1, ...</emphasis> when the two functions of <emphasis>GEN15</emphasis> are used with phase quadrature. |
| 53 | </para> |
| 54 | |
| 55 | <note> |
| 56 | <title>Notes</title> |
| 57 | <para> |
| 58 | <emphasis>GEN15</emphasis> creates two tables of equal size, labeled <emphasis>f </emphasis># and <emphasis>f</emphasis> # + 1. Table # will contain a Chebyshev function of the first kind, drawn using <link linkend="GEN13"><citetitle>GEN13</citetitle></link> with partial strengths <emphasis>h0cos(phs0), h1cos(phs1), ...</emphasis> Table #+1 will contain a Chebyshev function of the 2nd kind by calling <link linkend="GEN14"><citetitle>GEN14</citetitle></link> with partials <emphasis>h1sin(phs1), h2sin(phs2),...</emphasis> (note the harmonic displacement). The two tables can be used in conjunction in a waveshaping network that exploits phase quadrature. |
| 59 | </para> |
| 60 | <para> |
| 61 | Before version 5.16 there was a bug (pointed out by Menno Knevel and fixed |
| 62 | by &namepinot;) on the number of pfields transmitted to gen13 and gen14 by |
| 63 | gen15. The consequence is that all the csd, or orc and sco files that used |
| 64 | gen15 before this bug was fixed, are likely to sound different now. |
| 65 | </para> |
| 66 | </note> |
| 67 | </refsect1> |
| 68 | |
| 69 | <refsect1> |
| 70 | <title>Examples</title> |
| 71 | <para> |
| 72 | Here is an example of the GEN15 routine. It uses the files <ulink url="examples/gen15.csd"><citetitle>gen15.csd</citetitle></ulink>. |
| 73 | <example> |
| 74 | <title>An example of the GEN15 routine.</title> |
| 75 | <xi:include href="examples-xml/gen15.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 76 | </example> |
| 77 | |
| 78 | <textobject> |
| 79 | <phrase>These are the diagrams of the waveforms of the GEN15 routine, as used in the example |
| 80 | (in each diagram, the curve in blue is for ftable 33 and the curve in green is for |
| 81 | table 34):</phrase> |
| 82 | </textobject> |
| 83 | |
| 84 | <mediaobject> |
| 85 | <imageobject> |
| 86 | <imagedata fileref="images/gen15-1.png" format="PNG"/> |
| 87 | </imageobject> |
| 88 | |
| 89 | <textobject> |
| 90 | <phrase>f 33 0 8193 -15 1 1 1 0 1 180 .8 45 .6 270 .5 90 .4 225 .2 135 .1 315</phrase> |
| 91 | </textobject> |
| 92 | |
| 93 | <caption> |
| 94 | <para>f 33 0 8193 -15 1 1 1 0 1 180 .8 45 .6 270 .5 90 .4 225 .2 135 .1 315</para> |
| 95 | </caption> |
| 96 | </mediaobject> |
| 97 | |
| 98 | <mediaobject> |
| 99 | <imageobject> |
| 100 | <imagedata fileref="images/gen15-2.png" format="PNG"/> |
| 101 | </imageobject> |
| 102 | |
| 103 | <textobject> |
| 104 | <phrase>f 33 0 8193 -15 1 1 1 0 1 0 1 180 1 180 1 0 1 0 1 180 1 180 1 0 1 0 1 180 1 180</phrase> |
| 105 | </textobject> |
| 106 | |
| 107 | <caption> |
| 108 | <para>f 33 0 8193 -15 1 1 1 0 1 0 1 180 1 180 1 0 1 0 1 180 1 180 1 0 1 0 1 180 1 180</para> |
| 109 | </caption> |
| 110 | </mediaobject> |
| 111 | |
| 112 | <mediaobject> |
| 113 | <imageobject> |
| 114 | <imagedata fileref="images/gen15-3.png" format="PNG"/> |
| 115 | </imageobject> |
| 116 | |
| 117 | <textobject> |
| 118 | <phrase>f 33 0 8193 -15 1 1 1 0 1 0 .9 180 .5 270 .75 90 .4 45 .2 225 .1 0</phrase> |
| 119 | </textobject> |
| 120 | |
| 121 | <caption> |
| 122 | <para>f 33 0 8193 -15 1 1 1 0 1 0 .9 180 .5 270 .75 90 .4 45 .2 225 .1 0</para> |
| 123 | </caption> |
| 124 | </mediaobject> |
| 125 | |
| 126 | <mediaobject> |
| 127 | <imageobject> |
| 128 | <imagedata fileref="images/gen15-4.png" format="PNG"/> |
| 129 | </imageobject> |
| 130 | |
| 131 | <textobject> |
| 132 | <phrase>f 33 0 8193 -15 1 1 1 0 1 0 .5 0 .9 0 .3 0 .75 0 .2 180 .6 180 .15 180 .5 180 .1 180</phrase> |
| 133 | </textobject> |
| 134 | |
| 135 | <caption> |
| 136 | <para>f 33 0 8193 -15 1 1 1 0 1 0 .5 0 .9 0 .3 0 .75 0 .2 180 .6 180 .15 180 .5 180 .1 180</para> |
| 137 | </caption> |
| 138 | </mediaobject> |
| 139 | |
| 140 | <mediaobject> |
| 141 | <imageobject> |
| 142 | <imagedata fileref="images/gen15-5.png" format="PNG"/> |
| 143 | </imageobject> |
| 144 | |
| 145 | <textobject> |
| 146 | <phrase>f 33 0 8193 -15 1 1 1 180 1 180 .5 180 .9 180 .3 180 .75 180 .2 0 .6 0 .15 0 .5 0 .1 0</phrase> |
| 147 | </textobject> |
| 148 | |
| 149 | <caption> |
| 150 | <para>f 33 0 8193 -15 1 1 1 180 1 180 .5 180 .9 180 .3 180 .75 180 .2 0 .6 0 .15 0 .5 0 .1 0</para> |
| 151 | </caption> |
| 152 | </mediaobject> |
| 153 | </para> |
| 154 | </refsect1> |
| 155 | |
| 156 | <refsect1> |
| 157 | <title>See Also</title> |
| 158 | <para> |
| 159 | <link linkend="GEN13"><citetitle>GEN13</citetitle></link>, and |
| 160 | <link linkend="GEN14"><citetitle>GEN14</citetitle></link>. |
| 161 | </para> |
| 162 | </refsect1> |
| 163 | </refentry> |