| 1 | <refentry id="arrayOpcodes"> |
| 2 | <indexterm id="Indexarray"> |
| 3 | <primary>Array opcodes</primary> |
| 4 | </indexterm> |
| 5 | <refentryinfo> |
| 6 | <title>Mathematical Operations</title> |
| 7 | </refentryinfo> |
| 8 | <refmeta> |
| 9 | <refentrytitle>Array Opcodes</refentrytitle> |
| 10 | </refmeta> |
| 11 | |
| 12 | <refnamediv> |
| 13 | <refname>Array Opcodes</refname> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <para> |
| 17 | List of Array Opcodes (6.12): |
| 18 | <itemizedlist> |
| 19 | <listitem><para><link linkend="init"><citetitle>init</citetitle></link> initiatlise array |
| 20 | </para></listitem> |
| 21 | <listitem><para><link linkend="fillarray"><citetitle>fillarray</citetitle></link> fill array with values |
| 22 | </para></listitem> |
| 23 | <listitem><para><link linkend="genarray"><citetitle>genarray</citetitle></link> create array with artithmetic sequence |
| 24 | </para></listitem> |
| 25 | <listitem><para><link linkend="assign"><citetitle>=</citetitle></link> create or reset array as copy of another array |
| 26 | </para></listitem> |
| 27 | <listitem><para><link linkend="slicearray"><citetitle>slicearray</citetitle></link> take slice of an array |
| 28 | </para></listitem> |
| 29 | <listitem><para><link linkend="maparray"><citetitle>maparray</citetitle></link> apply a function to an array |
| 30 | </para></listitem> |
| 31 | <listitem><para><link linkend="scalearray"><citetitle>scalearray</citetitle></link> scale values in an array |
| 32 | </para></listitem> |
| 33 | <listitem><para><link linkend="sorta"><citetitle>sorta</citetitle></link> sort an array in ascending order |
| 34 | </para></listitem> |
| 35 | <listitem><para><link linkend="sortd"><citetitle>sortd</citetitle></link> sort an array in descending order |
| 36 | </para></listitem> |
| 37 | <listitem><para><link linkend="limit"><citetitle>limit</citetitle></link> and <link linkend="limit1"><citetitle>limit1</citetitle></link> limit array values |
| 38 | </para></listitem> |
| 39 | <listitem><para><link linkend="reshapearray"><citetitle>reshapearray</citetitle></link> change dimensions of an array |
| 40 | </para></listitem> |
| 41 | <listitem><para><link linkend="trim"><citetitle>trim</citetitle></link> adjust size of a one-dimensional array |
| 42 | </para></listitem> |
| 43 | <listitem><para><link linkend="copya2ftab"><citetitle>copya2ftab</citetitle></link> copy array to a function table |
| 44 | </para></listitem> |
| 45 | <listitem><para><link linkend="copyf2array"><citetitle>copyf2array</citetitle></link> copy function table to an array |
| 46 | </para></listitem> |
| 47 | <listitem><para><link linkend="tab2array"><citetitle>tab2array</citetitle></link> copy a slice from a table to an array |
| 48 | </para></listitem> |
| 49 | <listitem><para><link linkend="dot"><citetitle>dot</citetitle></link> calculate dot product from two arrays |
| 50 | </para></listitem> |
| 51 | <listitem><para><link linkend="interleave"><citetitle>interleave</citetitle></link> interleave two arrays to a single one |
| 52 | </para></listitem> |
| 53 | <listitem><para><link linkend="deinterleave"><citetitle>deinterleave</citetitle></link> deinterleave an array to two ones |
| 54 | </para></listitem> |
| 55 | <listitem><para><link linkend="getrow"><citetitle>getrow</citetitle></link> get a row from a two-dimensional array |
| 56 | </para></listitem> |
| 57 | <listitem><para><link linkend="getcol"><citetitle>getcol</citetitle></link> get a column from a two-dimensional array |
| 58 | </para></listitem> |
| 59 | <listitem><para><link linkend="setrow"><citetitle>setrow</citetitle></link> set a row of a two-dimensional array |
| 60 | </para></listitem> |
| 61 | <listitem><para><link linkend="setcol"><citetitle>setcol</citetitle></link> set a column of a two-dimensional array |
| 62 | </para></listitem> |
| 63 | <listitem><para><link linkend="lenarray"><citetitle>lenarray</citetitle></link> returns length of an array |
| 64 | </para></listitem> |
| 65 | <listitem><para><link linkend="minarray"><citetitle>minarray</citetitle></link> returns minimum value in an array |
| 66 | </para></listitem> |
| 67 | <listitem><para><link linkend="maxarray"><citetitle>maxarray</citetitle></link> returns maximum value in an array |
| 68 | </para></listitem> |
| 69 | <listitem><para><link linkend="sumarray"><citetitle>sumarray</citetitle></link> returns sum of values in an array |
| 70 | </para></listitem> |
| 71 | <listitem><para><link linkend="cmp"><citetitle>cmp</citetitle></link> compare two arrays |
| 72 | </para></listitem> |
| 73 | <listitem><para><link linkend="printarray"><citetitle>printarray</citetitle></link> print an array |
| 74 | </para></listitem> |
| 75 | <listitem><para><link linkend="product"><citetitle>product</citetitle></link> calculates the product of an array |
| 76 | </para></listitem> |
| 77 | <listitem><para>the unary functions |
| 78 | <link linkend="ceil"><citetitle>ceil</citetitle></link> |
| 79 | <link linkend="floor"><citetitle>floor</citetitle></link> |
| 80 | <link linkend="round"><citetitle>round</citetitle></link> |
| 81 | <link linkend="int"><citetitle>int</citetitle></link> |
| 82 | <link linkend="frac"><citetitle>frac</citetitle></link> |
| 83 | <link linkend="powoftwo"><citetitle>powoftwo</citetitle></link> |
| 84 | <link linkend="abs"><citetitle>abs</citetitle></link> |
| 85 | <link linkend="log2"><citetitle>log2</citetitle></link> |
| 86 | <link linkend="log10"><citetitle>log10</citetitle></link> |
| 87 | <link linkend="log"><citetitle>log</citetitle></link> |
| 88 | <link linkend="exp"><citetitle>exp</citetitle></link> |
| 89 | <link linkend="sqrt"><citetitle>sqrt</citetitle></link> |
| 90 | <link linkend="cos"><citetitle>cos</citetitle></link> |
| 91 | <link linkend="sin"><citetitle>sin</citetitle></link> |
| 92 | <link linkend="tan"><citetitle>tan</citetitle></link> |
| 93 | <link linkend="cosinv"><citetitle>cosinv</citetitle></link> |
| 94 | <link linkend="sininv"><citetitle>sininv</citetitle></link> |
| 95 | <link linkend="taninv"><citetitle>taninv</citetitle></link> |
| 96 | <link linkend="sinh"><citetitle>sinh</citetitle></link> |
| 97 | <link linkend="cosh"><citetitle>cosh</citetitle></link> |
| 98 | <link linkend="tanh"><citetitle>tanh</citetitle></link> |
| 99 | <link linkend="cbrt"><citetitle>cbrt</citetitle></link> |
| 100 | <link linkend="limit1"><citetitle>limit1</citetitle></link> |
| 101 | and the binary functions |
| 102 | <link linkend="taninv2"><citetitle>taninv2</citetitle></link> |
| 103 | <link linkend="pow"><citetitle>pow</citetitle></link> |
| 104 | <link linkend="hypot"><citetitle>hypot</citetitle></link> |
| 105 | <link linkend="fmod"><citetitle>fmod</citetitle></link> |
| 106 | <link linkend="fmax"><citetitle>fmax</citetitle></link> |
| 107 | <link linkend="fmin"><citetitle>fmin</citetitle></link> |
| 108 | accept arrays as input. |
| 109 | </para></listitem> |
| 110 | |
| 111 | </itemizedlist> |
| 112 | </para> |
| 113 | |
| 114 | |
| 115 | <para> |
| 116 | Some instructions to work with arrays in Csound (see also the <ulink url="http://write.flossmanuals.net/csound/e-arrays/"><citetitle>array chapter in the Csound FLOSS Manual:</citetitle></ulink>) |
| 117 | </para> |
| 118 | |
| 119 | <refsect1> |
| 120 | <title>Variable Name</title> |
| 121 | <para> |
| 122 | An array must be created (via <link linkend="init"><citetitle>init</citetitle></link> |
| 123 | or <link linkend="fillarray"><citetitle>fillarray</citetitle></link>) as |
| 124 | kMyName <emphasis role="strong">plus</emphasis> ending brackets. The |
| 125 | brackets determine |
| 126 | the dimensions of the array. So, |
| 127 | <informalexample> |
| 128 | <programlisting> |
| 129 | kArr[] <emphasis role="opc">init</emphasis> 10</programlisting> |
| 130 | </informalexample> |
| 131 | creates a one-dimensional array of length 10, whereas |
| 132 | <informalexample> |
| 133 | <programlisting> |
| 134 | kArr[][] <emphasis role="opc">init</emphasis> 10, 10</programlisting> |
| 135 | </informalexample> |
| 136 | creates a two-dimensional array with 10 rows and 10 columns. |
| 137 | </para> |
| 138 | |
| 139 | <para> |
| 140 | After the initalization of the array, referring to the array as a whole is |
| 141 | done <emphasis role="strong">without</emphasis> any brackets. Brackets are |
| 142 | only used if an element is indexed: |
| 143 | <informalexample> |
| 144 | <programlisting> |
| 145 | kArr[] <emphasis role="opc">init</emphasis> 10 <emphasis role="comment">;with brackets because of initialization</emphasis> |
| 146 | kLen <emphasis role="op">=</emphasis> lenarray(kArr) <emphasis role="comment">;without brackets</emphasis> |
| 147 | kFirstEl <emphasis role="op">=</emphasis> kArr[0] <emphasis role="comment">;indexing with brackets</emphasis></programlisting> |
| 148 | </informalexample> |
| 149 | </para> |
| 150 | |
| 151 | <para> |
| 152 | The same syntax is used for a simple copy via the '=' operator: |
| 153 | <informalexample> |
| 154 | <programlisting> |
| 155 | kArr1[] <emphasis role="opc">fillarray</emphasis> 1, 2, 3, 4, 5 |
| 156 | kArr2[] <emphasis role="op">=</emphasis> kArr1 <emphasis role="comment">;creates kArr2 as copy of kArr1</emphasis></programlisting> |
| 157 | </informalexample> |
| 158 | </para> |
| 159 | </refsect1> |
| 160 | |
| 161 | <refsect1> |
| 162 | <title>k-rate</title> |
| 163 | <para> |
| 164 | Note that most array operations are currently k-rate only. So like any |
| 165 | other k-rate opcode, an operation on arrays will be automatically repeated |
| 166 | every k-cycle. For instance, this code will repeat re-writing the array |
| 167 | with different random values every k-cycle, as long as the instrument runs: |
| 168 | <informalexample> |
| 169 | <programlisting> |
| 170 | kArr[] <emphasis role="opc">init</emphasis> 10 |
| 171 | kIndx <emphasis role="op">=</emphasis> 0 |
| 172 | <emphasis role="octrl">until</emphasis> kIndx <emphasis role="op">==</emphasis> <emphasis role="opc">lenarray</emphasis>(kArr) <emphasis role="octrl">do</emphasis> |
| 173 | kArr[kIndx] <emphasis role="opc">rnd31</emphasis> 10, 0 |
| 174 | kIndx <emphasis role="op">+=</emphasis> 1 |
| 175 | <emphasis role="octrl">od</emphasis></programlisting> |
| 176 | </informalexample> |
| 177 | </para> |
| 178 | |
| 179 | <para> |
| 180 | If you want to avoid this, you must organize it in one of the usual ways, |
| 181 | for instance by using a trigger: |
| 182 | <informalexample> |
| 183 | <programlisting> |
| 184 | kArr[] <emphasis role="opc">init</emphasis> 10 |
| 185 | kTrig <emphasis role="opc">metro</emphasis> 1 |
| 186 | <emphasis role="octrl">if</emphasis> kTrig <emphasis role="op">==</emphasis> 1 <emphasis role="octrl">then</emphasis> <emphasis role="comment">;do the following once a second</emphasis> |
| 187 | kIndx <emphasis role="op">=</emphasis> 0 |
| 188 | <emphasis role="octrl">until</emphasis> kIndx <emphasis role="op">==</emphasis> <emphasis role="opc">lenarray</emphasis>(kArr) <emphasis role="octrl">do</emphasis> |
| 189 | kArr[kIndx] <emphasis role="opc">rnd31</emphasis> 10, 0 |
| 190 | kIndx <emphasis role="op">+=</emphasis> 1 |
| 191 | <emphasis role="octrl">od</emphasis> |
| 192 | <emphasis role="octrl">endif</emphasis></programlisting> |
| 193 | </informalexample> |
| 194 | </para> |
| 195 | </refsect1> |
| 196 | |
| 197 | <refsect1> |
| 198 | <title>Creation/Initialization</title> |
| 199 | <para> |
| 200 | The usual way to create an array is with init: |
| 201 | <informalexample> |
| 202 | <programlisting> |
| 203 | kArr[] <emphasis role="opc">init</emphasis> 10 <emphasis role="comment">;creates one-dimensional array with length 10</emphasis> |
| 204 | kArr[][] <emphasis role="opc">init</emphasis> 10, 10 <emphasis role="comment">;creates two-dimensional array</emphasis></programlisting> |
| 205 | </informalexample> |
| 206 | </para> |
| 207 | <para> |
| 208 | A one-dimensional array can also be created and filled with distinct values |
| 209 | by the opcode <emphasis>fillarray</emphasis>. This line creates a vector |
| 210 | with length 4 and puts in the numbers [1, 2, 3, 4]: |
| 211 | </para> |
| 212 | <informalexample> |
| 213 | <programlisting> |
| 214 | kArr[] <emphasis role="opc">fillarray</emphasis> 1, 2, 3, 4</programlisting> |
| 215 | </informalexample> |
| 216 | </refsect1> |
| 217 | |
| 218 | <refsect1> |
| 219 | <title>Length</title> |
| 220 | <para> |
| 221 | The function <emphasis>lenarray(kArr)</emphasis> reports the length of an |
| 222 | array. See example for function |
| 223 | <link linkend="lenarray"><citetitle>lenarray</citetitle></link>. |
| 224 | </para> |
| 225 | </refsect1> |
| 226 | |
| 227 | <refsect1> |
| 228 | <title>Copy Arrays to/from Tables</title> |
| 229 | <para> |
| 230 | <informalexample> |
| 231 | <programlisting> |
| 232 | <emphasis role="opc">copyf2array</emphasis> kArr, kfn</programlisting> |
| 233 | </informalexample> |
| 234 | copies data from an ftable to a vector. |
| 235 | </para> |
| 236 | <para> |
| 237 | <informalexample> |
| 238 | <programlisting> |
| 239 | <emphasis role="opc">copya2ftab</emphasis> kArr, kfn</programlisting> |
| 240 | </informalexample> |
| 241 | copies data from a vector to an function table. |
| 242 | </para> |
| 243 | <para> |
| 244 | See examples for opcodes |
| 245 | <link linkend="copyf2array"><citetitle>copyf2array</citetitle></link> and |
| 246 | <link linkend="copya2ftab"><citetitle>copya2ftab</citetitle></link>. |
| 247 | </para> |
| 248 | </refsect1> |
| 249 | |
| 250 | <refsect1> |
| 251 | <title>Array Operations: Math</title> |
| 252 | <refsect2> |
| 253 | <title>+, -, *, / on a Number</title> |
| 254 | <para> |
| 255 | If the four basic math operators are used between an array and a scalar |
| 256 | (number), the operation is applied to each element. The safest way to do |
| 257 | this is to store the result in a new array: |
| 258 | <informalexample> |
| 259 | <programlisting> |
| 260 | kArr1[] <emphasis role="opc">fillarray</emphasis> 1, 2, 3 |
| 261 | kArr2[] <emphasis role="op">=</emphasis> kArr1 <emphasis role="op">+</emphasis> 10 <emphasis role="comment">;(kArr2 is now [11, 12, 13])</emphasis></programlisting> |
| 262 | </informalexample> |
| 263 | Here is an example of array/scalar operations. It uses the file |
| 264 | <ulink url="examples/array_scalar_math.csd"><citetitle>array_scalar_math.csd</citetitle></ulink>. |
| 265 | <example> |
| 266 | <title>Example of array operations</title> |
| 267 | <xi:include href="examples-xml/array_scalar_math.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 268 | </example> |
| 269 | </para> |
| 270 | </refsect2> |
| 271 | <refsect2> |
| 272 | <title>+, -, *, / on a Second Array</title> |
| 273 | <para> |
| 274 | If the four basic math operators are used between two arrays, the |
| 275 | operation is applied element by element. The result can be |
| 276 | straightforward stored in a new array: |
| 277 | <informalexample> |
| 278 | <programlisting> |
| 279 | kArr1[] <emphasis role="opc">fillarray</emphasis> 1, 2, 3 |
| 280 | kArr2[] <emphasis role="opc">fillarray</emphasis> 10, 20, 30 |
| 281 | kArr3[] <emphasis role="op">=</emphasis> kArr1 <emphasis role="op">+</emphasis> kArr2 <emphasis role="comment">;(kArr3 is now [11, 22, 33])</emphasis></programlisting> |
| 282 | </informalexample> |
| 283 | Here is an example of array operations. It uses the file |
| 284 | <ulink url="examples/array_array_math.csd"><citetitle>array_array_math.csd</citetitle></ulink>. |
| 285 | <example> |
| 286 | <title>Example of array operations</title> |
| 287 | <xi:include href="examples-xml/array_array_math.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 288 | </example> |
| 289 | </para> |
| 290 | </refsect2> |
| 291 | </refsect1> |
| 292 | |
| 293 | <refsect1> |
| 294 | <title>Map a Function to an Array</title> |
| 295 | <para> |
| 296 | <informalexample> |
| 297 | <programlisting> |
| 298 | kArrRes <emphasis role="opc">maparray</emphasis> kArrSrc, "fun"</programlisting> |
| 299 | </informalexample> |
| 300 | maps the k-rate 1-arg function in the string to every element of the vector. |
| 301 | </para> |
| 302 | <para> |
| 303 | Possible functions are for instance <emphasis>abs, ceil, exp, floor, frac, |
| 304 | int, log, log10, round, sqrt</emphasis>. This is a simple example: |
| 305 | <informalexample> |
| 306 | <programlisting> |
| 307 | kArrSrc[] <emphasis role="opc">fillarray</emphasis> 1, 2, 3, 4, 5 |
| 308 | kArrRes[] <emphasis role="opc">init</emphasis> 5 |
| 309 | kArrRes <emphasis role="opc">maparray</emphasis> kArrSrc, "sqrt"</programlisting> |
| 310 | </informalexample> |
| 311 | See example for opcode |
| 312 | <link linkend="maparray"><citetitle>maparray</citetitle></link>. |
| 313 | </para> |
| 314 | </refsect1> |
| 315 | |
| 316 | <refsect1> |
| 317 | <title>Array Operations: min, max, sum, scale, slice</title> |
| 318 | <refsect2> |
| 319 | <title>Minimum and Maximum</title> |
| 320 | <para> |
| 321 | <informalexample> |
| 322 | <programlisting> |
| 323 | kMin [,kMinIndx] <emphasis role="opc">minarray</emphasis> kArr</programlisting> |
| 324 | </informalexample> |
| 325 | returns the smallest value in an array, and optionally its index. |
| 326 | </para> |
| 327 | <para> |
| 328 | <informalexample> |
| 329 | <programlisting> |
| 330 | kMax [,kMaxIndx] <emphasis role="opc">maxarray</emphasis> kArr</programlisting> |
| 331 | </informalexample> |
| 332 | returns the largest value in an array, and optionally its index. |
| 333 | See examples for opcodes |
| 334 | <link linkend="minarray"><citetitle>minarray</citetitle></link> and |
| 335 | <link linkend="maxarray"><citetitle>maxarray</citetitle></link>. |
| 336 | </para> |
| 337 | </refsect2> |
| 338 | |
| 339 | <refsect2> |
| 340 | <title>Sum</title> |
| 341 | <para> |
| 342 | <informalexample> |
| 343 | <programlisting> |
| 344 | kSum <emphasis role="opc">sumarray</emphasis> kArr</programlisting> |
| 345 | </informalexample> |
| 346 | returns the sum of all values in kArr. |
| 347 | See example for opcode |
| 348 | <link linkend="sumarray"><citetitle>sumarray</citetitle></link>. |
| 349 | </para> |
| 350 | </refsect2> |
| 351 | |
| 352 | <refsect2> |
| 353 | <title>Scale</title> |
| 354 | <para> |
| 355 | <informalexample> |
| 356 | <programlisting> |
| 357 | <emphasis role="opc">scalearray</emphasis> kArr, kMin, kMax</programlisting> |
| 358 | </informalexample> |
| 359 | scales all values in kArr between kMin and kMax. |
| 360 | </para> |
| 361 | <para> |
| 362 | <informalexample> |
| 363 | <programlisting> |
| 364 | kArr[] <emphasis role="opc">fillarray</emphasis> 1, 3, 9, 5, 6 |
| 365 | <emphasis role="opc">scalearray</emphasis> kArr, 1, 3</programlisting> |
| 366 | </informalexample> |
| 367 | changes <emphasis>kArr</emphasis> to [1, 1.5, 3, 2, 2.25]. |
| 368 | See example for opcode |
| 369 | <link linkend="scalearray"><citetitle>scalearray</citetitle></link>. |
| 370 | </para> |
| 371 | </refsect2> |
| 372 | |
| 373 | <refsect2> |
| 374 | <title>Slice</title> |
| 375 | <para> |
| 376 | <informalexample> |
| 377 | <programlisting> |
| 378 | <emphasis role="opc">slicearray</emphasis> kArr, iStart, iEnd</programlisting> |
| 379 | </informalexample> |
| 380 | returns a slice of <emphasis>kArr</emphasis> from index |
| 381 | <emphasis>iStart</emphasis> to index <emphasis>iEnd</emphasis> (included). |
| 382 | </para> |
| 383 | <para> |
| 384 | The array for receiving the slice must have been created in advance: |
| 385 | <informalexample> |
| 386 | <programlisting> |
| 387 | kArr[] <emphasis role="opc">fillarray</emphasis> 1, 2, 3, 4, 5, 6, 7, 8, 9 |
| 388 | kArr1[] <emphasis role="opc">init</emphasis> 5 |
| 389 | kArr2[] <emphasis role="opc">init</emphasis> 4 |
| 390 | kArr1 <emphasis role="opc">slicearray</emphasis> kArr, 0, 4 <emphasis role="comment">;[1, 2, 3, 4, 5]</emphasis> |
| 391 | kArr2 <emphasis role="opc">slicearray</emphasis> kArr, 5, 8 <emphasis role="comment">;[6, 7, 8, 9]</emphasis></programlisting> |
| 392 | </informalexample> |
| 393 | See example for opcode |
| 394 | <link linkend="slicearray"><citetitle>slicearray</citetitle></link>. |
| 395 | </para> |
| 396 | </refsect2> |
| 397 | <refsect2> |
| 398 | <title>Reshape</title> |
| 399 | <para> |
| 400 | Use reshapearray to change the shape of an array without changing its |
| 401 | capacity (change a 1D to a 2D array and viceversa). |
| 402 | See example for opcode <link linkend="reshapearray"><citetitle>reshapearray</citetitle></link>. |
| 403 | </para> |
| 404 | </refsect2> |
| 405 | </refsect1> |
| 406 | |
| 407 | <refsect1> |
| 408 | <title>Arrays in UDOs</title> |
| 409 | <para> |
| 410 | The dimension of an input array must be declared in two places: |
| 411 | <itemizedlist> |
| 412 | <listitem> |
| 413 | as k[] or k[][] in the type input list |
| 414 | </listitem> |
| 415 | <listitem> |
| 416 | as kName[], kName[][] etc in the xin list. |
| 417 | </listitem> |
| 418 | </itemizedlist> |
| 419 | For instance : |
| 420 | <informalexample> |
| 421 | <programlisting> |
| 422 | <emphasis role="oblock">opcode</emphasis> FirstEl, k, k[] |
| 423 | <emphasis role="comment">;returns the first element of vector kArr</emphasis> |
| 424 | kArr[] <emphasis role="opc">xin</emphasis> |
| 425 | <emphasis role="opc">xout</emphasis> kArr[0] |
| 426 | <emphasis role="oblock">endop</emphasis></programlisting> |
| 427 | </informalexample> |
| 428 | Here is an example of an array in an UDO. It uses the file |
| 429 | <ulink url="examples/array_udo.csd"><citetitle>array_udo.csd</citetitle></ulink>. |
| 430 | <example> |
| 431 | <title>Example of an array in an UDO</title> |
| 432 | <xi:include href="examples-xml/array_udo.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 433 | </example> |
| 434 | </para> |
| 435 | </refsect1> |
| 436 | |
| 437 | <refsect1> |
| 438 | <para> |
| 439 | Note that if an opcode (for example inrg), alters arguments on its right |
| 440 | hand argument list, an array index should not be used there. Unlike a |
| 441 | normal variable, the array won't changed by the opcode. |
| 442 | </para> |
| 443 | </refsect1> |
| 444 | |
| 445 | <refsect1> |
| 446 | <title>Credits</title> |
| 447 | <para> |
| 448 | <simplelist> |
| 449 | <member>This manual page has been written by Joachim Heintz.</member> |
| 450 | <member>July 2013</member> |
| 451 | </simplelist> |
| 452 | </para> |
| 453 | <para>New in Csound 6.00</para> |
| 454 | </refsect1> |
| 455 | </refentry> |
| 456 | |
| 457 |