<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="wgpluck">
  <refmeta>
    <refentrytitle>wgpluck</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>wgpluck</refname>
    <refpurpose>
      A high fidelity simulation of a plucked string.
      <indexterm id="IndexWgpluck"><primary>wgpluck</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      A high fidelity simulation of a plucked string, using interpolating delay-lines.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>wgpluck</command> icps, iamp, kpick, iplk, idamp, ifilt, axcite</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>icps</emphasis> -- frequency of plucked string
    </para>

    <para>
      <emphasis>iamp</emphasis> -- amplitude of string pluck
    </para>

    <para>
      <emphasis>iplk</emphasis> -- point along the string, where it is plucked, in the range of 0 to 1. 0 = no pluck
    </para>

    <para>
      <emphasis>idamp</emphasis> -- damping of the note. This controls the overall decay of the string. The greater the value of idamp1, the faster the decay. Negative values will cause an increase in output over time.
    </para>

    <para>
      <emphasis>ifilt</emphasis> -- control the attenuation of the filter at the bridge. Higher values cause the higher harmonics to decay faster.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kpick</emphasis> -- proportion of the way along the point to sample the output.
    </para>

    <para>
      <emphasis>axcite</emphasis> -- a signal which excites the string.
    </para>

    <para>
      A string of frequency <emphasis>icps</emphasis> is plucked with amplitude <emphasis>iamp</emphasis> at point <emphasis>iplk</emphasis>. The decay of the virtual string is controlled by <emphasis>idamp</emphasis> and <emphasis>ifilt</emphasis> which simulate the bridge. The oscillation is sampled at the point <emphasis>kpick</emphasis>, and excited by the signal <emphasis>axcite</emphasis>.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      The following example produces a moderately long note with rapidly decaying upper partials. It uses the files <ulink url="examples/wgpluck.orc"><citetitle>wgpluck.orc</citetitle></ulink> and <ulink url="examples/wgpluck.sco"><citetitle>wgpluck.sco</citetitle></ulink>.

      <example>
        <title>An example of the wgpluck opcode.</title>

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

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

    </para>

   <para>
     The following example produces a shorter, brighter note. It uses the files <ulink url="examples/wgpluck_brighter.orc"><citetitle>wgpluck_brighter.orc</citetitle></ulink> and <ulink url="examples/wgpluck_brighter.sco"><citetitle>wgpluck_brighter.sco</citetitle></ulink>.

      <example>
        <title>An example of the wgpluck opcode with a shorter, brighter note.</title>

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

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