| 1 | |
| 2 | <section id="OrchExpress"> |
| 3 | <title>Expressions</title> |
| 4 | |
| 5 | <para> |
| 6 | Expressions may be composed to any depth. Each part of an expression is evaluated at its own proper rate. For instance, if the terms within a sub-expression all change at the control rate or slower, the sub-expression will be evaluated only at the control rate; that result might then be used in an audio-rate evaluation. For example, in |
| 7 | <informalexample> |
| 8 | <programlisting> |
| 9 | k1 <emphasis role="op">+</emphasis> <emphasis role="opc">abs</emphasis>(<emphasis role="opc">int</emphasis>(p5) <emphasis role="op">+</emphasis> <emphasis role="opc">frac</emphasis>(p5) <emphasis role="op">*</emphasis> 100<emphasis role="op">/</emphasis>12 + <emphasis role="opc">sqrt</emphasis>(k1))</programlisting> |
| 10 | </informalexample> |
| 11 | </para> |
| 12 | |
| 13 | <para> |
| 14 | the 100/12 would be evaluated at orch init, the p5 expressions evaluated at note i-time, and the remainder of the expression evaluated every k-period. The whole might occur in a unit generator argument position, or be part of an assignment statement. |
| 15 | </para> |
| 16 | </section> |