What is Automatic Gain Control (AGC)?
Automatic gain control (AGC) is a signal processing technique used to ensure constant amplitude on digital communication channels. A tried and true method is to use a limiter to limit the peak amplitude of a signal, but this method doesn’t work correctly with voice signals (which change in amplitude over time) in cases where there is not enough bandwidth available or where the quality of service needs to be maintained. AGC attempts to solve that problem by monitoring the amplitude of a signal and then adjusting the gain of an amplifier (called the “controlled variable”) accordingly.
There are two major types of AGC:
Automatic Gain Control loops are typically closed only after one or more gain update steps, which results in a slow response to sudden events. A solution to this is fast AGC, which monitors the level at more frequent intervals and is used during handoff in wireless communications (e.g. in GSM).
How does AGC work in Discord servers?
This technic is used in Discord servers, such as voice channels. In a Discord server, one can have as many channels as they like. Each channel has an audio level gauge attached to it. Any time someone speaks into the microphone of that channel, the microphone circuit activates a voltage divider chain (which includes transistors and valves) which then reduces the voltage through a series of resistors and diodes. This reduces the amount of power going into the amplifier on the audio circuit’s chip. This process not only reduces the current, but it also reduces the amplitude of the signal. The voltage divider chain has a “settle time”, which means that it takes a certain amount of time for it to settle on a new value after each adjustment. The settle time is dependent on the resistance of the resistor leg and the length of that leg in a voltage divider chain.
In Discord servers, when you speak into the microphone of a voice channel, this reduces the audio levels going into the Discord server’s chip to the minimum required by sound card specs. This keeps users from having their voices drowned out by other users’ voices. It also gives users a chance to reduce or turn down their own voice level as well. Those that adjust the volume loud enough for others in the server will be heard by all users.
This not only reduces and distributes the audio levels of the users, but it also distributes other sounds such as footsteps and voice chat to all of the users.
These are a few screenshots from a Discord server describing how AGC works. This is just one example and there are many different ways to reduce audio levels on a Discord server. The process described here is just one example of what is used in many Discord servers.
And that’s how AGC works… or so most people believe.
By : Jai-Lasic
ARTICLE END ]
Why is AGC important for Discord servers?
If there is a sudden increase in the amount of power being sent through the audio circuit’s chip, the chip might amplify too much. This can cause low volume audio to put out a high powered signal that can damage your computer’s speakers or microphone. AGC helps to avoid this power surge in a number of ways. First, AGC only reduces the signal to a certain point. If the incoming signal is too high, it won’t be reduced any further. Second, AGC will have time to react after the signal hits a certain threshold. After that threshold is reached, it will take some time for the AGC to reduce the power enough to avoid a high powered surge.
Ultimately, AGC is a safety system that helps our server’s audio from getting damaged. It reduces the amount of power going through the sound chip, which will keep your speakers and microphone safe when things start to get out of hand on our servers.
It also helps to keep audio quality intact. When the power gets too high, it can cause static or digital distortion which isn’t good for anyone.
How can you adjust the AGC settings on your server?
There are a couple of ways to adjust the AGC settings on your server. If you’re not familiar with how AGC works, we recommend that you don’t mess with these settings unless you have a good understanding of what they do. Instead, don’t modify AGC settings unless you absolutely have no other choice. For example, if you’re on a very low bandwidth server, and you’re only allowed one channel to talk at a time, it’s likely that the AGC will have to be adjusted to make sure that the person talking is heard.
In the Dashboard, head over to the Voice Channel tab and select the channel you want to adjust. Next, click “Properties” in the top right corner of the page. This will bring up a little text box where you can enter commands that affect the voice channel you’re adjusting. For example, let’s say you want to turn on AGC for a channel:
/voice_enable 0 1
This disables automatic gain control on this server (voice_enable) and turns it on (1).
Let’s say that you want to turn on automatic gain control, but you also want to set the level at which the AGC kicks in. One way of doing this is:
/voice_enable 0 1 55
Are there any risks associated with adjusting the AGC settings on your server?
We don’t think so. This is such a common operation in servers, and it’s not done primarily to help with audio quality, but rather to ensure that someone doesn’t hit the maximum audio level before they’re done talking. If you run a Discord server, and you’re worried about adjusting AGC settings without knowing what you’re doing, then we recommend that you only adjust these settings for your server if you have a system administrator on hand to do so for you. There are a few things to know about AGC before we explain it:
It’s not really adjusted by the server itself. The server is using a method called “ARQ” to send audio data back and forth between the client and server. This means that you, as you talk on Discord, the client, are actually talking at higher and higher levels than the system thinks it should be sent to your speaker. So, when you adjust the AGC, you’re helping that process along.
The system is adjusted by you. If you have an idea of what someone else is saying and you want them to be able to hear it, then all you need to do is adjust the audio output yourself, rather than leaving it up to a system admin. You’ll want to do this with caution and only when there’s a person around who can help if things go wrong.
If things go wrong, who’s on hand? This will depend on how permanent your speakers are. If you have long term speakers (like a closed back headphone set), then you can just set the AGC at their highest level and be fine. Some people like to use something like an app called MultiRTA to check the level of each individual mic before and after someone talks. If this is your practice, it’s important that you’re careful and know what you’re doing.