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

    <refpurpose>
      Returns a random number in a bi-polar range.
      <indexterm id="IndexBirnd"><primary>birnd</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Returns a random number in a bi-polar range.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>birnd</command>(x) (init- or control-rate only)</synopsis>

    <para>
      Where the argument within the parentheses may be an expression. These value converters sample a global random sequence, but do not reference <emphasis>seed</emphasis>. The result can be a term in a further expression.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      Returns a random number in the bipolar range -<emphasis>x</emphasis> to <emphasis>x</emphasis>. <emphasis>rnd</emphasis> and <emphasis>birnd</emphasis> obtain values from a global pseudo-random number generator, then scale them into the requested range. The single global generator will thus distribute its sequence to these units throughout the performance, in whatever order the requests arrive.
    </para>
  </refsect1>

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

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

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

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

      Its output should include lines like:
      <screen>
instr 1:  i1 = 0.947
instr 1:  i1 = -0.721
      </screen>
    </para>
  </refsect1>

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


  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namebarry;</member>
        <member>MIT</member>
        <member>Cambridge, Massachussetts</member>
        <member>1997</member>
      </simplelist>
    </para>
    <para>Example written by &namekevin;.</para>
  </refsect1>
</refentry>
