<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="vibes">
  <refmeta>
    <refentrytitle>vibes</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>vibes</refname>
    <refpurpose>
      Physical model related to the striking of a metal block.
      <indexterm id="IndexVibes"><primary>vibes</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Audio output is a tone related to the striking of a metal block as found in a vibraphone. The method is a physical model developed from &nameperry;, but re-coded for Csound.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>vibes</command> kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn, idec</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ihrd</emphasis> -- the hardness of the stick used in the strike. A range of 0 to 1 is used. 0.5 is a suitable value.
    </para>

    <para>
      <emphasis>ipos</emphasis> -- where the block is hit, in the range 0 to 1.
    </para>

    <para>
      <emphasis>imp</emphasis> -- a table of the strike impulses. The file <ulink url="examples/marmstk1.wav"><citetitle>marmstk1.wav</citetitle></ulink> is a suitable function from measurements and can be loaded with a <link linkend="GEN01"><citetitle>GEN01</citetitle></link> table. It is also available at <ulink
url="ftp://ftp.cs.bath.ac.uk/pub/dream/documentation/sounds/modelling/"><citetitle>ftp://ftp.cs.bath.ac.uk/pub/dream/documentation/sounds/modelling/</citetitle></ulink>.
    </para>

    <para>
      <emphasis>ivfn</emphasis> -- shape of vibrato, usually a sine table, created by a function
    </para>

    <para>
      <emphasis>idec</emphasis> --  time before end of note when damping is introduced
    </para>

    <para>
      <emphasis>idoubles</emphasis> (optional) -- percentage of double strikes. Default is 40%.
    </para>

    <para>
      <emphasis>itriples</emphasis> (optional) -- percentage of triple strikes. Default is 20%.
    </para>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kamp</emphasis> -- Amplitude of note.
    </para>

    <para>
      <emphasis>kfreq</emphasis> -- Frequency of note played.
    </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 vibes opcode. It uses the files <ulink url="examples/vibes.orc"><citetitle>vibes.orc</citetitle></ulink>, <ulink url="examples/vibes.sco"><citetitle>vibes.sco</citetitle></ulink>, and <ulink url="examples/marmstk1.wav"><citetitle>marmstk1.wav</citetitle></ulink>.

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

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

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

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="marimba"><citetitle>marimba</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>
