<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="wgpluck2">
  <refmeta>
    <refentrytitle>wgpluck2</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>wgpluck2</refname>
    <refpurpose>
      Physical model of the plucked string.
      <indexterm id="IndexWgpluck2"><primary>wgpluck2</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      <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.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>wgpluck2</command> iplk, kamp, icps, kpick, krefl</synopsis>
 </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <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.
    </para>

    <para>
      <emphasis>icps</emphasis>  -- The string plays at <emphasis>icps</emphasis> pitch.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kamp</emphasis> -- Amplitude of note.
    </para>

    <para>
      <emphasis>kpick</emphasis> -- Proportion of the way along the string to sample the output.
    </para>

    <para>
      <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).
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the wgpluck2 opcode. It uses the files <ulink url="examples/wgpluck2.orc"><citetitle>wgpluck2.orc</citetitle></ulink> and <ulink url="examples/wgpluck2.sco"><citetitle>wgpluck2.sco</citetitle></ulink>.

      <example>
        <title>Example of the wgpluck2 opcode.</title>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/wgpluck2.orc" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/wgpluck2.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="repluck"><citetitle>repluck</citetitle></link>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namejohn; (after &nameperry;)</member>
        <member>University of Bath, Codemist Ltd.</member>
        <member>Bath, UK</member>
      </simplelist>
    </para>

    <para>New in Csound version 3.47</para>
  </refsect1>
</refentry>
