<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="guide" id="autogain">
    <info>
        <link type="guide" xref="index#plugins" />
    </info>
    <title>Auto Gain</title>
    <p>Easy Effects Autogain is based on the library libebur128 which implements the EBU R 128 standard for loudness normalization. It changes the audio volume to a perceived loudness target that can be customized by the user.</p>
    <terms>
        <item>
            <title>
                <em style="strong" its:withinText="nested">Target</em>
            </title>
            <p>Loudness level.</p>
        </item>
        <item>
            <title>
                <em style="strong" its:withinText="nested">Silence</em>
            </title>
            <p>Silence threshold. While the momentary loudness is below this value the autogain won't make any changes to the current gain being applied to the signal level.</p>
        </item>
        <item>
            <title>
                <em style="strong" its:withinText="nested">Maximum History</em>
            </title>
            <p>Range of time taken into account for the calculation of loudness level and output gain.</p>
        </item>
        <item>
            <title>
                <em style="strong" its:withinText="nested">Reference</em>
            </title>
            <p>The parameter used as reference to evaluate the output gain.</p>
            <list>
                <item>
                    <p>
                        <em style="strong">Momentary</em>
                        - Measures the loudness of the past 400 milliseconds.
                    </p>
                </item>
                <item>
                    <p>
                        <em style="strong">Short-Term</em>
                        - Measures the loudness of the past 3 seconds.
                    </p>
                </item>
                <item>
                    <p>
                        <em style="strong">Integrated</em>
                        - Ideally it indicates how loud the content is on average. It measures the loudness on a long range of time, depending on the value set as Maximum History.
                    </p>
                </item>
                <item>
                    <p>
                        <em style="strong">Geometric Mean</em>
                        - Uses the geometric mean of all the above mentioned parameters, or two of them at user choosing.
                    </p>
                </item>
            </list>
        </item>
        <item>
            <title>
                <em style="strong" its:withinText="nested">Reset History</em>
            </title>
            <p>Resets the Autogain history related to chosen Reference.</p>
        </item>
        <item>
            <title>
                <em style="strong" its:withinText="nested">Monitor Parameters</em>
            </title>
            <p>Autogain values shown as stats.</p>
            <list>
                <item>
                    <p>
                        <em style="strong">Relative</em>
                        - Used to detect silence. Whenever the Momentary term is below a predetermined threshold, modifications to the output gain will be disabled.
                    </p>
                </item>
                <item>
                    <p>
                        <em style="strong">Loudness</em>
                        - The difference between its value and the target loudness determines the output gain.
                    </p>
                </item>
                <item>
                    <p>
                        <em style="strong">Range</em>
                        - Indicates how large is the dynamic range of the content played.
                    </p>
                </item>
                <item>
                    <p>
                        <em style="strong">Output Gain</em>
                        - The input signal is adjusted by this correction gain to bring its loudness to the target value.
                    </p>
                </item>
            </list>
        </item>
    </terms>
    <section>
        <title>References</title>
        <list>
            <item>
                <p>
                    <link href="https://en.wikipedia.org/wiki/EBU_R_128" its:translate="no">Wikipedia EBU R 128</link>
                </p>
            </item>
        </list>
        <list>
            <item>
                <p>
                    <link href="https://tech.ebu.ch/publications/r128/" its:translate="no">EBU - Loudness Normalisation and Permitted Maximum Level of Audio Signals</link>
                </p>
            </item>
        </list>
    </section>
</page>