| 1 | |
| 2 | <refentry id="wgclar"> |
| 3 | <indexterm id="IndexWgclar"><primary>wgclar</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Waveguide Physical Modeling</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>wgclar</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>wgclar</refname> |
| 13 | <refpurpose> |
| 14 | Creates a tone similar to a clarinet. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | Audio output is a tone similar to a clarinet, using a physical model developed from &nameperry;, but re-coded for Csound. |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis>ares <command>wgclar</command> kamp, kfreq, kstiff, \ |
| 28 | iatt, idetk, kngain, kvibf, kvamp [, ifn] [, iminfreq]</synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Initialization</title> |
| 33 | <para> |
| 34 | <emphasis>iatt</emphasis> -- time in seconds to reach full blowing pressure. 0.1 seems to correspond to reasonable playing. A longer time gives a definite initial wind sound. |
| 35 | </para> |
| 36 | |
| 37 | <para> |
| 38 | <emphasis>idetk</emphasis> -- time in seconds taken to stop blowing. 0.1 is a smooth ending |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | <emphasis>ifn</emphasis> (optional) -- table of shape of |
| 43 | vibrato, defaults yo te usual sine table. |
| 44 | </para> |
| 45 | |
| 46 | <para> |
| 47 | <emphasis>iminfreq</emphasis> (optional) -- lowest frequency at which the instrument will play. If it is omitted it is taken to be the same as the initial <emphasis>kfreq</emphasis>. If <emphasis>iminfreq</emphasis> is negative, initialization will be skipped. |
| 48 | </para> |
| 49 | </refsect1> |
| 50 | |
| 51 | <refsect1> |
| 52 | <title>Performance</title> |
| 53 | <para> |
| 54 | A note is played on a clarinet-like instrument, with the arguments as below. |
| 55 | </para> |
| 56 | |
| 57 | <para> |
| 58 | <emphasis>kamp</emphasis> -- Amplitude of note. |
| 59 | </para> |
| 60 | |
| 61 | <para> |
| 62 | <emphasis>kfreq</emphasis> -- Frequency of note played. |
| 63 | </para> |
| 64 | |
| 65 | <para> |
| 66 | <emphasis>kstiff</emphasis> -- a stiffness parameter for the reed. Values should be negative, and about -0.3. The useful range is approximately -0.44 to -0.18. |
| 67 | </para> |
| 68 | |
| 69 | <para> |
| 70 | <emphasis>kngain</emphasis> -- amplitude of the noise component, about 0 to 0.5 |
| 71 | </para> |
| 72 | |
| 73 | <para> |
| 74 | <emphasis>kvibf</emphasis> -- frequency of vibrato in Hertz. Suggested range is 0 to 12 |
| 75 | </para> |
| 76 | |
| 77 | <para> |
| 78 | <emphasis>kvamp</emphasis> -- amplitude of the vibrato |
| 79 | </para> |
| 80 | </refsect1> |
| 81 | |
| 82 | <refsect1> |
| 83 | <title>Examples</title> |
| 84 | <para> |
| 85 | Here is an example of the wgclar opcode. It uses the file <ulink url="examples/wgclar.csd"><citetitle>wgclar.csd</citetitle></ulink>. |
| 86 | |
| 87 | <example> |
| 88 | <title>Example of the wgclar opcode.</title> |
| 89 | |
| 90 | |
| 91 | |
| 92 | <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> |
| 93 | <xi:include href="examples-xml/wgclar.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 94 | </example> |
| 95 | </para> |
| 96 | </refsect1> |
| 97 | |
| 98 | <refsect1> |
| 99 | <title>See also</title> |
| 100 | <para><link linkend="SiggenWavguide"><citetitle>Waveguide Physical Modeling</citetitle></link></para> |
| 101 | </refsect1> |
| 102 | |
| 103 | <refsect1> |
| 104 | <title>Credits</title> |
| 105 | <para> |
| 106 | <simplelist> |
| 107 | <member>Author: &namejohn; (after &nameperry;)</member> |
| 108 | <member>University of Bath, Codemist Ltd.</member> |
| 109 | <member>Bath, UK</member> |
| 110 | </simplelist> |
| 111 | </para> |
| 112 | |
| 113 | <para>New in Csound version 3.47</para> |
| 114 | <para>ifn optional in 6.06</para> |
| 115 | </refsect1> |
| 116 | </refentry> |