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

  <refnamediv>
    <refname>cent</refname>
    <refpurpose>
      Calculates a factor to raise/lower a frequency by a given amount of cents.
      <indexterm id="IndexCent"><primary>cent</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      Calculates a factor to raise/lower a frequency by a given amount of cents.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis><command>cent</command>(x) </synopsis>

    <para>
      This function works at a-rate, i-rate, and k-rate.
    </para>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>x</emphasis> -- a value expressed in cents.
    </para>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      The value returned by the <emphasis>cent</emphasis> function is a factor. You can multiply a frequency by this factor to raise/lower it by the given amount of cents.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the cent opcode. It uses the files <ulink url="examples/cent.orc"><citetitle>cent.orc</citetitle></ulink> and <ulink url="examples/cent.sco"><citetitle>cent.sco</citetitle></ulink>.

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

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

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

      Its output should include lines like:
      <screen>
instr 1:  iroot = 440.000
instr 1:  ifactor = 1.189
instr 1:  inew = 523.229
      </screen>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="db"><citetitle>db</citetitle></link>,
      <link linkend="octave"><citetitle>octave</citetitle></link>,
      <link linkend="semitone"><citetitle>semitone</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Example written by &namekevin;.</para>
    <para>New in version 4.16</para>
  </refsect1>
</refentry>
