You are here: Reference for Processing Blocks and Controls > DSP Processing Blocks > Dynamics > AGC

Block Reference

AGC (Automatic Gain Control)

Functionality

The primary use of Automatic Gain Control (AGC) is to tame the substantial variations in signal levels encountered with speech and some music sources. For example, when various people speak into a microphone, the cumulative effect of soft talker versus loud talker in addition to varying distances between the talkers and the microphone can result in amplitude variations as great as 30 dB. In a fixed installation, the AGC serves as the hand on a knob maintaining the correct signal level. The goal of the AGC is to move the signal level closer to the ideal Target level without eliminating the natural dynamics of the signal.

A common and effective application of AGC is in background music applications where one song is too loud and the next one is too soft. Yet if the level variation across songs is too large (20 dB or more), a compressor may work better as it can be difficult to set the AGC’s Threshold appropriately for all possible level variations. These days, most background (and sadly, even foreground) music is severely compressed due to satellite and authored source compression, the MP3 data compression insanity, and the squash-the-dynamic-range-to-zero nature of most popular recorded music. This trend means that AGC on music is often unnecessary.

tip: The AGC Threshold is set automatically and is dependent on the selected Target, Ratio and Max Gain. You can tweak these three parameters to get the best compromise between coverage, compression and nominal output level.

note: The Automatic Gain Control is also known in the audio industry by other names such as Automatic Level Control (ALC) or Leveler.

Additional Background Information

AGC is similar to compression. Both functions compress the dynamic range of signals above a set Threshold. Unlike basic compression, however, AGC compresses any signal above the Threshold toward a Target by amplifying signals below the Target and attenuating signals above the Target. A compressor only attenuates signals above the threshold and, therefore, makeup gain is necessary to achieve the desired target volume. Applying makeup gain to all signals has the additional disadvantage of raising the noise floor.

AGC also differs from classic compression in several ways. Both functions include a Target parameter, and compress signals above the Threshold toward the Target. AGC uses the Target as the pivot point for the Ratio. Simple compressors use the Threshold as the pivot point for the Ratio. Note that changing the AGC Ratio does not move the Target while changing the Ratio in a simple compressor does. A second difference is the presence of a Hold parameter in an AGC, which determines how long the current AGC gain holds after the signal drops below the Threshold. This functionality allows pauses in speech without loss of gain, as well as the correct gain when speech resumes.

How to Use
Adding the Block to Your System
  1. Click the Processing tab to open the Processing Workspace.
  2. In the palette area, click the DSP tab.
  3. Expand the Dynamics category of blocks.
  4. Click and drag the AGC block into your Processing Map.
  5. Wire it into your system in the appropriate location.
  6. note: When nothing is wired to the Side-chain input, the Input channel is automatically internally wired to the Side-chain.

Configuring the Block
  • Open the AGC block's properties by double-clicking the block or hovering and clicking the properties icon that appears in the upper right of the block's title bar. From here you can do the following:
  • With the Output Gain at 0 dB (the default), set the Target (located in the Gain Calculation area) to correspond to the desired nominal rms output level. For most systems, this level is between -30 and -20 dBFS.
  • Set the Ratio for the compression desired. Typically, you need higher ratios (4:1 or more) for paging signals in noisy environments. Signals in quiet spaces, however, with low ratios such as 2:1 help maintain more natural level variations for dynamic talkers (such as preachers on a roll).
  • Set the Max Gain for the application. Sometimes the application specifies this value. The maximum gain the system can accommodate depends on how much gain before feedback the system can handle. Factors that affect the maximum allowable gain before feedback include the microphone used, how close the talker is to the microphone, the placement of reinforcement loudspeakers, and room acoustics. If the microphone gain is well optimized in a well-behaved system, you can achieve a maximum gain of 12 to 20 dB.
  • In the Rate Control area, set the gain Decrease Rate. This parameter determines how fast the AGC turns down the gain. The decrease rate is typically set quickly to prevent the annoyance of sudden, loud signals as well as to prevent system overload. A typical value is 100 to 200 dB/second. You should determine the final setting during a live listening test in situ.
  • Set the gain Increase Rate. This parameter determines how fast the AGC turns up the gain. Typically, the gain increase rate is significantly slower that the decrease rate, as lower level signals do not risk overload and are less annoying. In addition, a slower gain increase rate prevents pumping. A typical increase rate value is in the range of 6 to 20 dB/second. You should determine the final setting during a live listening test.

best practice: It is best to perform microphone gain calibration during a live test. Adjust microphone gain so a talker at the nominal distance from the microphone and at a normal loudness results in an average AGC gain of 0 dB (equal excursions above and below 0 dB with live speech). If the loudness at the microphone varies widely with different talkers, or the microphone-to-talker distance varies widely, you may need to set the microphone gain lower, reduce the Target, and use post compression makeup gain.

best practice: Limit your use of the Output Gain control as much as possible. Sometimes the Target is set lower than the desired nominal output level to get the desired compression coverage without exceeding the acceptable maximum gain. In this case, makeup gain restores the desired Target level. Lowering the Target results in compression with less gain and more attenuation. Increased output gain brings the nominal output level back to the desired level.

 

User Interface Elements
AGC Block

AGC Block

UI Element Purpose
Input node Connection point for wiring input to the AGC block
Side-chain node

The AGC’s detector is fed from a side-chain input node, allowing separate processing. If no external connection exists, the side-chain automatically connects to the input. A true rms signal detector is used.

Filters added before the side-chain input permit applications that benefit from band-limited detection for voice or instrument AGC.

Output node Connection point for wiring the gain-adjusted input signal to another block

 

AGC Block Properties

(Hover over the thumbnail below to view the properties dialog box.)

AGC Block Properties

 
UI Element Purpose

Response graph/meter

Graphical representation of signal. Use the green handles to adjust Target and Ratio. A real-time meter shows the AGC Gain calculated by the gain computer.
Output A signal meter displays the peak and rms levels of the AGC's output channel. An output gain control allows adjustment of the nominal output signal level.
Gain Calculation

Target sets the ideal level (in dBFS) toward which the detector or gain computer compresses an above-Threshold signal. Signals amplify when above the Threshold and below the Target. Signals attenuate when above the Target. AGC gain is unity when the side-chain signal equals the Target level. Note that the Target point is the pivot point for the Ratio.

Ratio sets the slope (ratio) of side-chain level change (x-axis) to output level change (Y-axis on the graph) normalized to a 1 dB output change. The ratio determines how aggressively signals above Threshold compress toward the Target.

Max Gain sets the highest gain allowed. The maximum gain occurs at the Threshold.

Rate Control

Increase Rate indicates in dB/second how fast the gain computer is able to increase gain.

Decrease Rate indicates in dB/second how fast the gain computer is able to decrease gain.

Hold Time sets how long the current AGC gain holds after the side-chain level drops below Threshold. Holding the gain at its current setting for some period after the signal drops below Threshold allows speech to briefly pause and resume at the same level without recalculating the gain value. Infinite hold allows gain adjustment only when the side-chain input level is above Threshold. If the signal level stays below threshold for longer than the Hold period, the gain returns to unity at 6 dB/second.

Bypass When checked, Bypass connects the input directly to the output, creating a wire. The output meter continues to operate and a yellow bar appears at the bottom of the block in the Processing Map, indicating bypass.