| 1 | <section id="PrefaceToot4"> |
| 2 | <title>Toot 4</title> |
| 3 | <para> |
| 4 | Next we'll animate the basic sound by mixing it with two slightly de-tuned copies of itself. We'll employ Csound's <link linkend="cpspch"><citetitle>cpspch</citetitle></link> value converter which will allow us to specify the pitches by octave and pitch-class rather than by frequency, and we'll use the <link linkend="ampdb"><citetitle>ampdb</citetitle></link> converter to specify loudness in decibels rather than linearly. |
| 5 | </para> |
| 6 | <para> |
| 7 | Since we are adding the outputs of three oscillators, each with the same amplitude envelope, we'll scale the amplitude before we mix them. Both <emphasis>iscale</emphasis> and <emphasis>inote</emphasis> are arbitrary names to make the design a bit easier to read. Each is an i-rate variable, evaluated when the instrument is initialized. |
| 8 | </para> |
| 9 | <para> |
| 10 | Here's the file <ulink url="examples/toot4.csd"><citetitle>toot4.csd</citetitle></ulink>: |
| 11 | </para> |
| 12 | <para> |
| 13 | <xi:include href="examples-xml/toot4.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 14 | </para> |
| 15 | </section> |