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

  <refnamediv>
    <refname>0dbfs</refname>
    <refpurpose>
      Sets the value of 0 decibels using full scale amplitude.
      <indexterm id="Index0dbfs"><primary>0dbfs</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      Sets the value of 0 decibels using full scale amplitude.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis><command>0dbfs</command> = iarg</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>iarg</emphasis> -- the value of 0 decibels using full scale amplitude.
    </para>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      The default is 32767, so all existing orcs <emphasis>should</emphasis> work.
    </para>

    <para>
      These calls should all work:

      <informalexample>
        <programlisting>
ipeak = 0dbfs
        </programlisting>
      </informalexample>

      <informalexample>
        <programlisting>
asig oscil 0dbfs,freq,1
out  asig * 0.3 * 0dbfs
        </programlisting>
      </informalexample>

      and so on.
    </para>

    <para>
      As for documentation: the usage should be obvious - the main thing is for people to start to code 0dbfs-relatively (and use the <link linkend="ampdb"><citetitle>ampdb()</citetitle></link> opcodes a lot more!), rather than use explicit sample values.
    </para>

    <para>
      Floats written to a file, when <emphasis>0dbfs = 1</emphasis>, will in effect go through no range translation at all. So the nunbers in the file are exactly what the orc says they are.
    </para>

    <note>
      <title>BIG NB</title>
      <para>
        All the main sample formats are supported, but I haven't got around to dealing with the char formats.  Probably it's straight-forward...
      </para>

      <para>
        I have tried to cover the main utils - adsyn,lpanal etc. But there are bound to be things missing, sorry.
      </para>

      <para>
        Some of the parsing code is a bit grungy because I have a variable with a leading digit!
      </para>
    </note>
  </refsect1>

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

      <example>
        <title>Example of the 0dbfs opcode.</title>

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

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

  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: Richard Dobson</member>
        <member>May 2002</member>
      </simplelist>
    </para>
    <para>Example written by &namekevin;.</para>
    <para>New in version 4.20</para>
  </refsect1>
</refentry>
