Featherworks: Terra Control Panel: Automatic Gain Control and Audio Settings

Featherworks: Terra Control Panel: Automatic Gain Control and Audio Settings

For more advanced users, Terra offers the ability to customize the audio settings. This article will explain what the Automatic Gain Control (or AGC) does, plus some of the different settings, and what they will do.  You can access the controls discussed at https://featherworks.terralistens.com/apps/control.php
 as part of the Featherworks section of the Terra website.

AGC Theory of Operation

The Terra has two analog microphones in a binaural configuration to closely model the human listening experience. Each microphone is put through a separate amplifier stage, each with a configureable gain level. This is then put into an Analog to Digital Converter (ADC), where it can be recorded and processed for a variety of functions.

Ambient listening devices, such as Terra, as subject to very large dynamic ranges of sound. The Terra can detect very faint sounds, but can also automatically adjust to loud sounds. This is controlled via software. The behavior of the AGC is currently under active development, as we refine the perfect balance of responding quickly to loud sounds, but also allow the amplification of faint sounds during quiet periods.

Too much gain during loud events can cause clipping, which has an unpleasant buffeting sound. It can be so pronounced that may lose the ability to listen to the signal being recorded. On the other side, very quiet periods could also be amplified too much, increasing the amount of unwanted ambient noise. Too little gain can make the soundscape very quiet, impacting the bird identification range of Terra as well as making it too faint to listen to.

Terra's digital audio circuitry makes use of stereo 16-bit 48KHz audio sampling. In addition, the 9 bit gain control can be adjusted between 0 and 257. The current AGC software's default settings takes a look at the 16 bit signed value of the ADC in a 1024 sample window. If the value in that window exceeds 30,000, the gain control is dropped by a value of 5, and this will repeat until the signal reaches suitable levels. On the bottom side, if the loudest signal during a quiet period is never above 500, the gain control is increased by a value of 5, until the sound reaches that threshold. As the sound dynamics change, Terra will adjust the levels in a continuous fashion. Note that it will only react one step within that sample window, which calculates to about 20 milliseconds per each reaction step.

Additionally, each channel, Left and Right, are treated separately. This is to handle asymmetric sound levels, such as wind buffeting one microphone but not the other, a loud bird next to one of the microphones.

AGC settings are configured on startup from the server. This means that after each change on the website, you will need to power cycle your Terra. Yes, we understand this will be annoying. However, in a future software release, real time audio adjustment will be possible.

Since AGC may not work in all conditions, so we have opened it up for experimentation as we further refine how Automatic Gain Control works on Terra. You can even disable it, keeping one steady gain level. Here is a summary of the options available:

Setting
Meaning
AGC On/Off
Completely turn on or off the AGC behavior
Minimum Sound Level
If the maximum sound level in the window is below this level, the AGC will move up its configured step
Maximum Sound Level
If the maximum sound level in the window is above this level, the AGC will move down its configured step
Start Level
The starting point of the 9 bit gain control. If AGC is disabled, this will be the permanent gain setting.
Volume Step
The number of steps the gain will move up or down on an event that requires the gain to change
Period Size
The number of samples that will be taken before the maximum and minimum calculation will take place





    • Related Articles

    • What is Featherworks?

      Featherworks is our name for an experimental part of the terralistens.com website, which you can access at https://featherworks.terralistens.com Featherworks is the place where we will release new tools and features for Terra before we make them a ...
    • Terra's Geo Privacy Settings

      Terra contains an internal GPS antenna to determine where it is located. This is used for several purposes: Telling our bird identification engine which regional model to use Providing the exact location of the Motus receiver for any tags received ...
    • Basics of the Terra Listens App

      The Terra Listens app gives users the ability to setup their new Terra, listen to their Terra(s), see IDs and ID histories, and also listen to public sites from around the world. Here's a basic manual on using the app. Installing the App The Terra ...
    • Featherworks: Bird ID Review

      What is the Bird ID Review Tool? The Bird ID Review is a tool in Featherworks. You can access the Bird ID Review tool at https://featherworks.terralistens.com/apps/review.php The tool lets you listen to and give feedback on clips that are being ...
    • Terra's Sound Detection and ID

      Overview Terra users a proprietary set of algorithms to identify bird sounds. Here's the basic process: 1. A sound is detected by a Terra device in the field. The Terra automatically determines if it might be a bird sound, and clips out that section ...