<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="wgbow">
  <refmeta>
    <refentrytitle>wgbow</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>wgbow</refname>
    <refpurpose>
      Creates a tone similar to a bowed string.
      <indexterm id="IndexWgbow"><primary>wgbow</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Audio output is a tone similar to a bowed string, using a physical model developed from &nameperry;, but re-coded for Csound.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>wgbow</command> kamp, kfreq, kpres, krat, kvibf, kvamp, ifn [, iminfreq]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ifn</emphasis> -- table of shape of vibrato, usually a sine table, created by a function
    </para>

    <para>
      <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.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      A note is played on a string-like instrument, with the arguments as below.
    </para>

    <para>
      <emphasis>kamp</emphasis> -- amplitude of note.
    </para>

    <para>
      <emphasis>kfreq</emphasis> -- frequency of note played.
    </para>

    <para>
      <emphasis>kpres</emphasis> -- a parameter controlling the pressure of the bow on the string. Values should be about 3. The useful range is approximately 1 to 5.
    </para>

    <para>
      <emphasis>krat</emphasis> -- the position of the bow along the string. Usual playing is about 0.127236. The suggested range is 0.025 to 0.23.
    </para>

    <para>
      <emphasis>kvibf</emphasis> -- frequency of vibrato in Hertz. Suggested range is 0 to 12
    </para>

    <para>
      <emphasis>kvamp</emphasis> -- amplitude of the vibrato
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the wgbow opcode. It uses the files <ulink url="examples/wgbow.orc"><citetitle>wgbow.orc</citetitle></ulink> and <ulink url="examples/wgbow.sco"><citetitle>wgbow.sco</citetitle></ulink>.

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

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

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/wgbow.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </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>
