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

  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>marimba</command> kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn, idec [, idoubles] [, itriples]</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 marimba opcode. It uses the files <ulink url="examples/marimba.orc"><citetitle>marimba.orc</citetitle></ulink>, <ulink url="examples/marimba.sco"><citetitle>marimba.sco</citetitle></ulink>, and <ulink url="examples/marmstk1.wav"><citetitle>marmstk1.wav</citetitle></ulink>.

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

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

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

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