<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="gain">
  <refmeta>
    <refentrytitle>gain</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>gain</refname>
    <refpurpose>
      Adjusts the amplitude audio signal according to a root-mean-square value.
      <indexterm id="IndexGain"><primary>gain</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Adjusts the amplitude audio signal according to a root-mean-square value.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>gain</command> asig, krms [, ihp] [, iskip]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ihp</emphasis> (optional, default=10) -- half-power point (in Hz) of a special internal low-pass filter. The default value is 10.
    </para>

    <para>
      <emphasis>iskip</emphasis> (optional, default=0) -- initial disposition of internal data space (see <link linkend="reson"><citetitle>reson</citetitle></link>). The default value is 0.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>asig</emphasis> -- input audio signal
    </para>

    <para>
      <emphasis>gain</emphasis> provides an amplitude modification of <emphasis>asig</emphasis> so that the output <emphasis>ar</emphasis> has rms power equal to <emphasis>krms</emphasis>. <link linkend="rms"><citetitle>rms</citetitle></link> and <emphasis>gain</emphasis> used together (and given matching <emphasis>ihp</emphasis> values) will provide the same effect as <link linkend="balance"><citetitle>balance</citetitle></link>.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      <informalexample>
        <programlisting>
asrc <emphasis>buzz</emphasis>    10000,440, sr/440, 1 ; band-limited pulse train
a1   <emphasis>reson</emphasis>   asrc, 1000,100       ; sent through
a2   <emphasis>reson</emphasis>   a1,3000,500          ; 2 filters
afin <emphasis>balance</emphasis> a2, asrc             ; then balanced with source
        </programlisting>
      </informalexample>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="balance"><citetitle>balance</citetitle></link>,
      <link linkend="rms"><citetitle>rms</citetitle></link>
    </para>
  </refsect1>
</refentry>
