| 1 | |
| 2 | <refentry id="wgpluck2"> |
| 3 | <indexterm id="IndexWgpluck2"><primary>wgpluck2</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Waveguide Physical Modeling</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>wgpluck2</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>wgpluck2</refname> |
| 13 | <refpurpose> |
| 14 | Physical model of the plucked string. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | <emphasis>wgpluck2</emphasis> is an implementation of the physical model of the plucked string, with control over the pluck point, the pickup point and the filter. Based on the Karplus-Strong algorithm. |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis>ares <command>wgpluck2</command> iplk, kamp, icps, kpick, krefl</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | <emphasis>iplk</emphasis> -- The point of pluck is <emphasis>iplk</emphasis>, which is a fraction of the way up the string (0 to 1). A pluck point of zero means no initial pluck. |
| 34 | </para> |
| 35 | |
| 36 | <para> |
| 37 | <emphasis>icps</emphasis> -- The string plays at <emphasis>icps</emphasis> pitch. |
| 38 | </para> |
| 39 | </refsect1> |
| 40 | |
| 41 | <refsect1> |
| 42 | <title>Performance</title> |
| 43 | <para> |
| 44 | <emphasis>kamp</emphasis> -- Amplitude of note. |
| 45 | </para> |
| 46 | |
| 47 | <para> |
| 48 | <emphasis>kpick</emphasis> -- Proportion of the way along the string to sample the output. |
| 49 | </para> |
| 50 | |
| 51 | <para> |
| 52 | <emphasis>krefl</emphasis> -- the coefficient of reflection, indicating the lossiness and the rate of decay. It must be strictly between 0 and 1 (it will complain about both 0 and 1). |
| 53 | </para> |
| 54 | </refsect1> |
| 55 | |
| 56 | <refsect1> |
| 57 | <title>Examples</title> |
| 58 | <para> |
| 59 | Here is an example of the wgpluck2 opcode. It uses the file <ulink url="examples/wgpluck2.csd"><citetitle>wgpluck2.csd</citetitle></ulink>. |
| 60 | |
| 61 | <example> |
| 62 | <title>Example of the wgpluck2 opcode.</title> |
| 63 | |
| 64 | |
| 65 | |
| 66 | <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> |
| 67 | <xi:include href="examples-xml/wgpluck2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 68 | </example> |
| 69 | </para> |
| 70 | </refsect1> |
| 71 | |
| 72 | <refsect1> |
| 73 | <title>See also</title> |
| 74 | <para><link linkend="SiggenWavguide"><citetitle>Waveguide Physical Modeling</citetitle></link></para> |
| 75 | </refsect1> |
| 76 | |
| 77 | <refsect1> |
| 78 | <title>Credits</title> |
| 79 | <para> |
| 80 | <simplelist> |
| 81 | <member>Author: &namejohn; (after &nameperry;)</member> |
| 82 | <member>University of Bath, Codemist Ltd.</member> |
| 83 | <member>Bath, UK</member> |
| 84 | </simplelist> |
| 85 | </para> |
| 86 | |
| 87 | <para>New in Csound version 3.47</para> |
| 88 | </refsect1> |
| 89 | </refentry> |