| 1 |
|
| 2 |
<refentry id="GEN02"> |
| 3 |
<indexterm id="IndexGEN02"><primary>GEN02</primary></indexterm> |
| 4 |
<refmeta> |
| 5 |
<refentrytitle>GEN02</refentrytitle> |
| 6 |
</refmeta> |
| 7 |
|
| 8 |
<refnamediv> |
| 9 |
<refname>GEN02</refname> |
| 10 |
<refpurpose> |
| 11 |
Transfers data from immediate pfields into a function table. |
| 12 |
</refpurpose> |
| 13 |
</refnamediv> |
| 14 |
|
| 15 |
<refsect1> |
| 16 |
<title>Description</title> |
| 17 |
<para> |
| 18 |
This subroutine transfers data from immediate pfields into a function table. |
| 19 |
</para> |
| 20 |
</refsect1> |
| 21 |
|
| 22 |
<refsect1> |
| 23 |
<title>Syntax</title> |
| 24 |
<synopsis><command>f</command> # time size 2 v1 v2 v3 ...</synopsis> |
| 25 |
</refsect1> |
| 26 |
|
| 27 |
<refsect1> |
| 28 |
<title>Initialization</title> |
| 29 |
<para> |
| 30 |
<emphasis>size</emphasis> -- number of points in the table. |
| 31 |
|
| 32 |
|
| 33 |
The maximum tablesize is 16777216 |
| 34 |
(2<superscript>24</superscript>) points. |
| 35 |
The value may be given as zero, in which case the number of values |
| 36 |
decides the table length. |
| 37 |
</para> |
| 38 |
|
| 39 |
<para> |
| 40 |
<emphasis>v1, v2, v3,</emphasis> etc. -- values to be copied |
| 41 |
directly into the table space. |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
The values copied may include the table guard point; any table locations not filled will contain zeros. |
| 46 |
</para> |
| 47 |
|
| 48 |
<note> |
| 49 |
<title>Note</title> |
| 50 |
<para> |
| 51 |
If p4 (the GEN routine number) is positive, the table will be |
| 52 |
post-normalized (rescaled to a maximum absolute value of 1 after |
| 53 |
generation). A negative p4 will cause rescaling to be skipped. You will |
| 54 |
usually want to use -2 with this GEN function, so that your values are |
| 55 |
not normalized. |
| 56 |
</para> |
| 57 |
</note> |
| 58 |
</refsect1> |
| 59 |
|
| 60 |
<refsect1> |
| 61 |
<title>Examples</title> |
| 62 |
<para> |
| 63 |
Here is an example of the GEN02 routine. It uses the files <ulink url="examples/gen02.csd"><citetitle>gen02.csd</citetitle></ulink>. |
| 64 |
|
| 65 |
<example> |
| 66 |
<title>Example of the GEN02 routine.</title> |
| 67 |
<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> |
| 68 |
<xi:include href="examples-xml/gen02.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 69 |
</example> |
| 70 |
|
| 71 |
<textobject> |
| 72 |
<phrase>These are the diagrams of the waveforms of the GEN02 routines, as used in the example:</phrase> |
| 73 |
</textobject> |
| 74 |
|
| 75 |
<mediaobject> |
| 76 |
<imageobject> |
| 77 |
<imagedata fileref="images/gen02_1.png" format="PNG"/> |
| 78 |
</imageobject> |
| 79 |
|
| 80 |
<textobject> |
| 81 |
<phrase>f 2 0 5 2 0 2 0</phrase> |
| 82 |
</textobject> |
| 83 |
|
| 84 |
<caption> |
| 85 |
<para>f 2 0 5 2 0 2 0</para> |
| 86 |
</caption> |
| 87 |
</mediaobject> |
| 88 |
|
| 89 |
<mediaobject> |
| 90 |
<imageobject> |
| 91 |
<imagedata fileref="images/gen02_2.png" format="PNG"/> |
| 92 |
</imageobject> |
| 93 |
|
| 94 |
<textobject> |
| 95 |
<phrase>f 3 0 5 2 0 2 10 0</phrase> |
| 96 |
</textobject> |
| 97 |
|
| 98 |
<caption> |
| 99 |
<para>f 3 0 5 2 0 2 10 0</para> |
| 100 |
</caption> |
| 101 |
</mediaobject> |
| 102 |
|
| 103 |
<mediaobject> |
| 104 |
<imageobject> |
| 105 |
<imagedata fileref="images/gen02_3.png" format="PNG"/> |
| 106 |
</imageobject> |
| 107 |
|
| 108 |
<textobject> |
| 109 |
<phrase>f 4 0 9 2 0 2 10 100 0</phrase> |
| 110 |
</textobject> |
| 111 |
|
| 112 |
<caption> |
| 113 |
<para>f 4 0 9 2 0 2 10 100 0</para> |
| 114 |
</caption> |
| 115 |
</mediaobject> |
| 116 |
|
| 117 |
</para> |
| 118 |
</refsect1> |
| 119 |
|
| 120 |
<refsect1> |
| 121 |
<title>See Also</title> |
| 122 |
<para> |
| 123 |
<link linkend="GEN17"><citetitle>GEN17</citetitle></link> |
| 124 |
</para> |
| 125 |
</refsect1> |
| 126 |
|
| 127 |
<refsect1> |
| 128 |
<title>Credits</title> |
| 129 |
<para>December 2002. Thanks to &namerasmus;, corrected the limit |
| 130 |
of the <emphasis>PMAX</emphasis> variable.</para> |
| 131 |
<para>Use of length zero new in version 6.12</para> |
| 132 |
</refsect1> |
| 133 |
</refentry> |