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

    <refpurpose>
      Apply tempo control to an uninterpreted score.
      <indexterm id="IndexTempo"><primary>tempo</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Apply tempo control to an uninterpreted score.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis><command>tempo</command> ktempo, istartempo</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>istartempo</emphasis> -- initial tempo (in beats per minute). Typically 60.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>ktempo</emphasis> -- The tempo to which the score will be adjusted.
    </para>

    <para>
      <emphasis>tempo</emphasis> allows the performance speed of Csound scored events to be controlled from within an orchestra. It operates only in the presence of the Csound <link linkend="FlagsMinusLowerT"><citetitle>-t</citetitle></link> flag. When that flag is set, scored events will be performed from their uninterpreted p2 and p3 (beat) parameters, initially at the given command-line tempo. When a <emphasis>tempo</emphasis> statement is activated in any instrument (<emphasis>ktempo</emphasis> 0.), the operating tempo will be adjusted to <emphasis>ktempo</emphasis> beats per minute. There may be any number of <emphasis>tempo</emphasis> statements in an orchestra, but coincident activation is best avoided.
    </para>
  </refsect1>

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

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

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

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

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

  <refsect1>
    <title>Credits</title>
    <para>Example written by &namekevin;.</para>
  </refsect1>
</refentry>
