| 1 | <refentry id="wterrain2"> |
| 2 | <indexterm id="IndexWterrain2"><primary>wterrain2</primary></indexterm> |
| 3 | <refentryinfo><title>Signal Generators:Wave Terrain Synthesis</title></refentryinfo> |
| 4 | <refmeta> |
| 5 | <refentrytitle>wterrain2</refentrytitle> |
| 6 | </refmeta> |
| 7 | |
| 8 | <refnamediv> |
| 9 | <refname>wterrain2</refname> |
| 10 | <refpurpose> |
| 11 | A wave-terrain synthesis opcode using different curves |
| 12 | </refpurpose> |
| 13 | </refnamediv> |
| 14 | |
| 15 | <refsect1> |
| 16 | <title>Description</title> |
| 17 | <para> |
| 18 | A wave-terrain synthesis opcode that enhances the <link linkend="wterrain"><citetitle>wterrain</citetitle></link> opcode by providing some more curves, krate table parameters and a parameter for rotating the curve. |
| 19 | </para> |
| 20 | </refsect1> |
| 21 | |
| 22 | <refsect1> |
| 23 | <title>Syntax</title> |
| 24 | <synopsis>aout <command>wterrain2</command> kamp, kcps, kx, ky, krx, kry, krot, \ |
| 25 | ktab0, ktab1, kcurve, kcurveparam |
| 26 | </synopsis> |
| 27 | </refsect1> |
| 28 | |
| 29 | <refsect1> |
| 30 | <title>Performance</title> |
| 31 | <para> |
| 32 | <emphasis>ktabx, ktaby</emphasis> -- The two tables that define the terrain - they can be changed at krate. |
| 33 | </para> |
| 34 | <para> |
| 35 | The output is the result of traversing at frequency <emphasis>kcps</emphasis> the curve <emphasis>kcurve</emphasis> with the parameter <emphasis>kcurveparam</emphasis> (see below), scaled with <emphasis>krx</emphasis> and <emphasis>kry</emphasis> and centered at <emphasis>kx</emphasis>, <emphasis>ky</emphasis> on the terrain and rotated around the center with <emphasis>krot</emphasis> radians. |
| 36 | </para> |
| 37 | <para> |
| 38 | <emphasis>kcurve=0: ellipse</emphasis> as in the wterrain opcode but with a special extension. kcurveparam controls a speed change of the traversing point. The formula is: |
| 39 | <literallayout> |
| 40 | fx(t) = kx + krx * sin( t + kcurveparam * sin(t) ) |
| 41 | fy(t) = ky + kry * cos( t + kcurveparam * sin(t) ) |
| 42 | </literallayout> |
| 43 | </para> |
| 44 | <para> |
| 45 | <emphasis>kcurve=1: lemniskate</emphasis> - this is a simple 8. here also the kcurveparam controls a speed change of the traversing point. The formula is: |
| 46 | <literallayout> |
| 47 | fx(t) = kx + krx * cos( t + kcurveparam * sin(t) ) |
| 48 | fy(t) = ky + kry * sin( t + kcurveparam * sin(t) ) * cos( t + kcurveparam * sin(t) ) |
| 49 | </literallayout> |
| 50 | </para> |
| 51 | <para> |
| 52 | <emphasis>kcurve=2: limacon</emphasis> |
| 53 | <literallayout> |
| 54 | fx(t) = kx + krx * sin(t) * (cos(t) + kcurveparam); |
| 55 | fy(t) = ky + kry * cos(t) * (cos(t) + kcurveparam); |
| 56 | </literallayout> |
| 57 | <mediaobject> |
| 58 | <imageobject> |
| 59 | <imagedata fileref="images/limacon.png" format="PNG"/> |
| 60 | </imageobject> |
| 61 | <textobject> |
| 62 | <phrase>limacon curve with different parameters</phrase> |
| 63 | </textobject> |
| 64 | <caption>limacon curve with different parameters</caption> |
| 65 | </mediaobject> |
| 66 | </para> |
| 67 | <para> |
| 68 | <emphasis>kcurve=3: cornoid</emphasis> |
| 69 | <literallayout> |
| 70 | fx(t) = kx + krx * cos(t) * cos(2*t) |
| 71 | fy(t) = ky + kry * sin(t) * (kcurveparam + cos(2*t)) |
| 72 | </literallayout> |
| 73 | <mediaobject> |
| 74 | <imageobject> |
| 75 | <imagedata fileref="images/cornoid.png" format="PNG"/> |
| 76 | </imageobject> |
| 77 | <textobject> |
| 78 | <phrase>cornoid with different parameters</phrase> |
| 79 | </textobject> |
| 80 | <caption>a cornoid curve with different parameters</caption> |
| 81 | </mediaobject> |
| 82 | </para> |
| 83 | <emphasis>kcurve=4: trisectrix (Ceva)</emphasis> |
| 84 | <literallayout> |
| 85 | fx(t) = kx + krx * cos(t) * (1+kcurveparam*sin(2*t)); |
| 86 | fy(t) = ky + kry * sin(t) * (1+kcurveparam*sin(2*t)); |
| 87 | </literallayout> |
| 88 | <mediaobject> |
| 89 | <imageobject> |
| 90 | <imagedata fileref="images/trisextic.png" format="PNG"/> |
| 91 | </imageobject> |
| 92 | <textobject> |
| 93 | <phrase>trisectrix curve with different parameters</phrase> |
| 94 | </textobject> |
| 95 | <caption>a trisectrix curve with different parameters</caption> |
| 96 | </mediaobject> |
| 97 | <para> |
| 98 | </para> |
| 99 | <para> |
| 100 | <emphasis>kcurve=5: scarabeus</emphasis> |
| 101 | <literallayout> |
| 102 | fx(t) = kx + krx * cos(t) * (1+kcurveparam*sin(2*t)); |
| 103 | fy(t) = ky + kry * sin(t) * (1+kcurveparam*sin(2*t)); |
| 104 | </literallayout> |
| 105 | <mediaobject> |
| 106 | <imageobject> |
| 107 | <imagedata fileref="images/scarabeus.png" format="PNG"/> |
| 108 | </imageobject> |
| 109 | <textobject> |
| 110 | <phrase>scarabeus curve with different parameters</phrase> |
| 111 | </textobject> |
| 112 | <caption>a scarabeus curve with different parameters</caption> |
| 113 | </mediaobject> |
| 114 | </para> |
| 115 | <para> |
| 116 | <emphasis>kcurve=6: folium</emphasis> |
| 117 | <literallayout> |
| 118 | fx(t) = kx + krx * cos(t) * cos(t) * (sin(t)*sin(t) - kcurveparam); |
| 119 | fy(t) = ky + kry * sin(t) * cos(t) * (sin(t)*sin(t) - kcurveparam); |
| 120 | </literallayout> |
| 121 | <mediaobject> |
| 122 | <imageobject> |
| 123 | <imagedata fileref="images/folium.png" format="PNG"/> |
| 124 | </imageobject> |
| 125 | <textobject> |
| 126 | <phrase>folium with different parameters</phrase> |
| 127 | </textobject> |
| 128 | <caption>a folium with different parameters</caption> |
| 129 | </mediaobject> |
| 130 | </para> |
| 131 | <para> |
| 132 | <emphasis>kcurve=7: Talbot curve</emphasis> |
| 133 | <literallayout> |
| 134 | fx(t) = kx + krx * cos(t) * (1 + kcurveparam * sin(t)*sin(t)); |
| 135 | fy(t) = ky + kry * sin(t) * (1 - kcurveparam - kcurveparam*cos(t)*cos(t)); |
| 136 | |
| 137 | </literallayout> |
| 138 | <mediaobject> |
| 139 | <imageobject> |
| 140 | <imagedata fileref="images/talbot.png" format="PNG"/> |
| 141 | </imageobject> |
| 142 | <textobject> |
| 143 | <phrase>Talbot curve with different parameters</phrase> |
| 144 | </textobject> |
| 145 | <caption>a Talbot curve with different parameters</caption> |
| 146 | </mediaobject> |
| 147 | </para> |
| 148 | |
| 149 | </refsect1> |
| 150 | |
| 151 | <refsect1> |
| 152 | <title>Examples</title> |
| 153 | <para> |
| 154 | Here is an example of the wterrain2 opcode. It uses the file |
| 155 | <ulink url="examples/wterrain2_1.csd"><citetitle>wterrain2.csd</citetitle></ulink>. |
| 156 | <example> |
| 157 | <title>Example of the wterrain2 opcode.</title> |
| 158 | <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> |
| 159 | <xi:include href="examples-xml/wterrain2_1.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 160 | </example> |
| 161 | </para> |
| 162 | <para> |
| 163 | Here is an other example of the wterrain2 - a sound fugue. |
| 164 | It uses the file <ulink url="examples/wterrain2_2.csd"><citetitle>wterrain2_2.csd</citetitle></ulink>. |
| 165 | <example> |
| 166 | <title>Another Example of the wterrain2 opcode - a sound fugue</title> |
| 167 | <xi:include href="examples-xml/wterrain2_2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 168 | </example> |
| 169 | </para> |
| 170 | </refsect1> |
| 171 | |
| 172 | <refsect1> |
| 173 | <title>See Also</title> |
| 174 | <para><link linkend="SiggenWaveterr"><citetitle>Wave Terrain Synthesis</citetitle></link></para> |
| 175 | </refsect1> |
| 176 | |
| 177 | <refsect1> |
| 178 | <title>Credits</title> |
| 179 | <para> |
| 180 | <simplelist> |
| 181 | <member>Author: Christian Bacher</member> |
| 182 | <member>New in version 6.15</member> |
| 183 | </simplelist> |
| 184 | </para> |
| 185 | </refsect1> |
| 186 | </refentry> |