<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="tempoval">
  <refmeta>
    <refentrytitle>tempoval</refentrytitle>
  </refmeta>

  <refnamediv>
    <refname>tempoval</refname>
    <refpurpose>
      Reads the current value of the tempo.
      <indexterm id="IndexTempoval"><primary>tempoval</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      Reads the current value of the tempo.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>kr <command>tempoval</command></synopsis>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kr</emphasis> -- the value of the tempo. If you use a positive value with the <link linkend="FlagsMinusLowerT"><citetitle>-t command-line flag</citetitle></link>, <emphasis>tempoval</emphasis> returns the percentage increase/decrease from the original tempo of 60 beats per minute. If you don't, its value will be 60 (for 60 beats per minute).
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the tempoval opcode. Remember, it only works if you use the <link linkend="FlagsMinusLowerT"><citetitle>-t</citetitle></link> flag with Csound. It uses the files <ulink url="examples/tempoval.orc"><citetitle>tempoval.orc</citetitle></ulink> and <ulink url="examples/tempoval.sco"><citetitle>tempoval.sco</citetitle></ulink>.

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

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

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

      Since 120 beats per minute is a 50&percnt; increase over the original 60 beats per minute, its output should include lines like:
      <screen>
kval = 0.500000
      </screen>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="tempo"><citetitle>tempo</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Example written by &namekevin;.</para>
    <para>New in version 4.15</para>
    <para>December 2002. Thanks to Drake Wilson for pointing out unclear documentation.</para>
  </refsect1>
</refentry>
