SurroundByUs.com

A Stereo-to-Surround Community
It is currently Sun Oct 22, 2017 11:07 pm
  • No posting regarding file sharing of copyrighted material is allowed
  • AudioMuxer is here
  • Spec and SpecWeb are here
 

All times are UTC - 6 hours [ DST ]


Forum rules


The tools and techniques described and provided on this forum are intended for use on material owned by users and for their personal use as covered by "fair use" and other applicable copyright laws. The owners and moderators of this forum do not suggest or condone any violation of copyright or other applicable laws. Any use of these methods outside this forum in a manner which violates "fair use" or copyright is done so at the individual's own peril and is not the responsibility of surroundbyus.com. All Methods and Guides are Copyrighted © SurroundByUs.com. Overall forum rules can be read HERE.



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sun Sep 13, 2009 5:13 pm 
Offline
SBU Wiki Team
User avatar

Joined: Sun Aug 30, 2009 7:01 am
Posts: 212
SPEC 4.0 with Automated Real-Time Gain Control

Note this workflow has been superseded by "ZAG" http://www.surroundbyus.com/sbu/viewtopic.php?f=8&t=158

Attachment deleted.


The Automated Real-Time Gain Control (ARTGC) tool was originally developed by Zeerround and Fan51.

Quicklinks:

  1. Basic Operating Principles
  2. Layout Portability
  3. General Workflow
  4. Detailed Operating Instructions
  5. Additional Processing

This guide describes how to use the Automated Real-Time Gain Control (ARTGC) tool. If you are familiar with the manual process of using the Gain Calculation Spreadsheet, you know that, for every track on the album, it involves running the track through the layout, entering channel peak and average RMS data into the spreadsheet, performing gain calculations, entering the calculated gains into the gain fields in the layout and recording the converted track.

The automation tool described here performs all this work on the fly and does not require using the Gain Calculation Spreadsheet. It measures peak and RMS data by itself as the album is playing and uses this information to instantly calculate and adjust channel gains several times per second. It normally runs on a full album at once instead of individual tracks.


  1. Basic Operating Principles

    ARTGC uses two separate processes:

    1. The Surround Balance Control keeps the continual RMS levels of all the surround channels in balance.

    2. The AGC (Automatic Gain Control) process uses the summed continual RMS level of the original stereo to control the gain of all surround channels, so that the summed continual RMS levels are always the same from input to output of the entire layout.

      Because the Surround Channels now match the Original Stereo in loudness, whatever track to track normalization that existed in the Original Stereo will be duplicated in the Surround Channels.

      So the assumption is that your source material has good track to track normalization. If it doesn’t, or you are doing a compilation album, you simply do your own normalization OF THE STEREO SOURCES, before using as an input source in Plogue.

    The resultant gains from these two different processes are summed and applied to the surround channels in real time.

    Of course, if we make every channel exactly the same volume, and exactly match all those to the Original Stereo, at every sample, we will pretty much ruin things with the gains moving around too quickly (often called a “pumping” sound).

    We want to strike a balance between “one gain adjustment per track”, as with the Gain Calculation Spreadsheet, and an adjustment EVERY sample. This is called “smoothing”.

    In order to smooth out the results of our two gain adjustment processes, we apply the instantaneous (per sample) gain adjustments over a (relatively) long period of time. If you are familiar with older spam compressors that used a light bulb and photo cell to slow down response time, it’s the same idea. The filament of the light bulb takes time to heat up and cool off, a thermal “inertia”.

    What the real time technique cannot do is automatically guarantee that no clipping will occur, or that all the available headroom will be used because we cannot predict what peaks will be seen in the future.

    In order to address this, the AGC section has a “Safety Gain”, similar to the Safety setting in the spreadsheet. By putting negative gain values in this setting, you can create a “buffer zone” that will help prevent dynamic peaks from causing clipping. Similarly, if the layout causes low levels at the input to the Automated Gain Control group, positive Safety Gain numbers can be used to boost the peak levels closer to 0dB.

  2. Layout Portability

    The Automatic Real-Time Gain Control (ARTGC) group can be easily added to layouts. It does not require ANY parameter links to the layout and is fully self-contained.

    1. Inputs

      To add the ARTGC group to a layout, you need to connect the six surround channels to the first six input pins and the original stereo channels (OL and OR) to the next two pins. In layouts where you are not already using the OL and OR channels (possibly in post processing or after outside of Plogue pre-processing steps), it is still possible to use the ARTGC group by adding another linked player (connected to inputs 7 and 8 of the group) to play the OL and OR channels.

      The last input of the ARTGC group is to bridge the delay line between the group and processes above it in the layout. It can only be connected to a “delay line (samples)” output or left unconnected. The OL and OR channels must be in sync with the output of your layout so this input is called “Samples to Delay OL-OR”.



      If, however, you are not going to use the AGC process, you don’t have to connect the OL and OR channels or set the Delay Samples input.

    2. Outputs

      The first six outputs of the group should be connected directly to the recorder (and any live monitoring bidule).

      The 7th output of the group is the time synced summed OL-OR signal. This can be used with the right click monitor on the group to compare the OL-OR signal level to the Surround Channels (more on this in the detailed instructions), or it could be connected to your live monitoring setup for time synced A/B comparisons. In General, this output is left unconnected.

      The 8th output is a delay line in case you need it for further sync/delay operations such as the “Recording Delay” group. In General, this output is left unconnected.

  3. General Workflow

    Considering that ARTGC is just a group that can be inserted in any layout to replace the manual work typically done with a Gain Calculation Spreadsheet, it can be used in many different ways. Following is a typical workflow that is only meant to illustrate how it can be used. This workflow is optimized to allow easy live monitoring and is very easy on your PC resources.

    1. Stage 1: Extracting the basic channels

      Use a layout without ARTGC and without post-processing plugins. Load a 16bit 44.1 KHz stereo source. Use live monitoring to tweak the method patameters for soundfield and separation. Roughly set manual gains to achieve approximate channel levels without clipping. Record (offline) a single mch wave at 32bit float.

    2. Stage 2: Optimizing the channel levels

      Use a layout with ARTGC and post-processing plugins. Load the mch wave output from Stage 1 in a 6ch player and the stereo source in a 2ch player. Link the two players' "Play" parameters. Use live monitoring to tweak the post-processing plugins for sound quality. Use peak meters to measure headroom (for Stage 3). Record (offline) a single mch wave at 32bit float. If you have the power for it, you can easily combine Stages 1 and 2.

    3. Stage 3: Removing the headroom

      Use a layout like mch2monos (included in the attached package). Set the master gain to normalize the loudest channel peak to 0 dB. Record six 24bit monos.

  4. Detailed Operating Instructions

    1. Insert and connect the ARTGC group into your layout at described above.

    2. In order to set up the layout, including any post-processing plugins that may be included, set the ARTGC group mode to "Bypass".



    3. Do all your normal layout settings. Set your master gain (or pre-gain) to the typical default for the layout, and your output gains to zero. This example is for SPEC:



    4. When you’re happy with the sound, set the ARTGC group mode to "Processing".

    5. In ARTGC, start with the following settings:




      • Look Ahead (ms): This setting controls how far ahead the AGC process looks to anticipate upcoming volume variations. The default value is 500 ms.

      • AGC Section, Safety Gain: The default value, 0 dB, is simply a good middle starting point. The setting of this control will be highly source material and layout dependent.

      • AGC Section, Include LFE in AGC Calc: Enabling this option causes the LFE signal to be considered in calculating the overall level of the source, which can lead to some unwanted swings on many sources. The default value is Off.

      • AGC Section, Inertia: The default value of 2,000 ms means that each gain change will be slowly applied, over 2 seconds. The minimum setting, 1 ms, will cause gain adjustments to be “instantaneous”. Probably not what you want musically but good for seeing what happens as you adjust other settings. Use this control to avoid distracting, sudden or frequent gain changes or “pumping”.

      • AGC Section, Monitor: The slider is not an input control. It is instead a “monitor” of what the AGC section is calculating as the gain needed to make the Surround Channels have the same total loudness as the Original Stereo.
        The Monitor displays a range of -30 to +30 dB, however there is really no practical limit to the amount of gain that can be applied by the AGC process.

      • Surround Balance Section, Center Higher Than Fronts: Enter the dB amount you want the Center channel to differ from the fronts. A positive number will make the Center channel louder than the fronts, a negative number lower (same formula as the Gain Calculation Spreadsheet).

      • Surround Balance Section, Rears Lower Than Fronts: Enter the dB amount you want the Rear channels to differ from the fronts. A positive number will make the Rear channels quieter than the fronts, a negative number louder (same formula as the Gain calculation Spreadsheet).

      • Surround Balance Section, Inertia: The default value of 2,000 ms means that each gain change will be slowly applied, over 2 seconds. The same comments apply as for the AGC Section, Inertia.

      • Open Gain Limit Controls: Check this box to open a new control box where you can limit the range over which each individual channel gain will be allowed to move. Ultimately, setting both values for a channel to the same number "freezes" the gain, just like in the typical worksheet workflow. Normally, use a range of -60 dB to +15 dB unless you really get undesired behavior in one or more channels.



      • Surround Balance Section, Monitors: The sliders represent what the Surround Balance section is calculating as the gain needed to make each Surround Channels have a relative loudness according to your “Center Louder Than Fronts” and “Rears Lower Than Fronts” settings.

        Note that while the group is processing, but there is no audio playing, the monitors will be relative to each other according to your “Center Louder Than Fronts” and “Rears Lower Than Fronts” settings. However while audio is playing, the relative needed per channel gain is affected by how your layout separates the sound, and by any individual channel gain changes you made in the layout (in order to get “good” levels coming into the group).

      • LFE Controls Section, Bass Boost Off/On: This should be set to match your Bass Boost setting in the layout. Set it to “Processing” if you are using Bass Boost in your layout. Set it to “Mute” if you are not using Bass Boost.

      • LFE Controls Section, LFE at (dB): If you are using Bass Boost, set this to the level you want the LFE channel to be at, relative to the Front Channels (same formula as the Gain Calculation Spreadsheet).

      • LFE Controls Section, LFE Max Gain (dB): This sets the maximum positive gain that ARTGC will apply to the LFE signal.

      • LFE Controls Section, LFE Max Cut (dB): This sets the maximum negative gain that ARTGC will apply to the LFE signal.

      • LFE Controls, LFE Inertia (ms): This sets the specific inertia that will be applied to the LFE channel only. Considering that the LFE is typically made up of short bursts of sound (a bass is not like a violin…), it is best to use a relatively short LFE inertia period.

      • LFE Controls, LFE Monitor (dB) This slider displays the dynamic gain applied to the LFE channel.

    6. Load a stereo source in the Audio File Player, press Play and turn Bidule processing On.



    7. In the ARTGC window, watch how the gain monitors are moving. The goal is to have the AGC gain and the individual channel gains centered roughly around 0 dB, which is in the middle of the slider intervals. This rule applies over the entire album, so you should manually move the slider in the Player to "sample" several spots on the album and observe for a few seconds how the AGC and channel gains react.

      • To center the AGC gain slider, you play with the Safety Gain slider in ARTGC.

      • To center the channel gain sliders in ARTGC, you have two options:

        1. To center ALL the channel gain sliders, you play with the Master Gain or Pre-Gain slider in your layout (SPEC, for example).
        2. To center INDIVIDUAL channel gain sliders, you play with the channel gain sliders in your layout.

      Again, these adjustments are rough and apply to the entire album, so you don't need to be very accurate here as ARTGC will measure everything and do the proper adjustments in real time. All you're trying to do in this step is to give the gain sliders more "breathing room" on both sides.

    8. Once the adjustable gain sliders are set (Safety Gain in ARTGC, Master Gain and channel gains in the extraction layout), you are ready to process the file and record the output. With ARTGC, remember to first turn the Bidule On/Off button to ON, let the ARTGC gain sliders stabilize and then press the Play button in the Audio File Player.

  5. Additional Processing

    One thing ARTGC cannot do is achieve maximum output volume without clipping. It does balance each channel volume against the other ones, but it can leave some "headroom" under the 0 dB maximum recordable volume. If you want, you can solve this issue by following these steps:

    1. At the bottom of the layout with ARTGC, insert some level meters like RMS Buddy to measure the maximum absolute peak of each channel.



    2. Record a mch wav at a bit depth of 32 bit float.

    3. At the end of recording, looking at the level meters, find the highest absolute peak. In the above example, this value would be -1.65 dB, which means an additional gain of 1.65 dB could be added to all channels without going over 0 dB. Note that since you are recording at a bit depth of 32 bit float, it is acceptable to have a positive highest absolute peak. In this case, a negative master gain would be applied below.

    4. Use the recorded mch wav as input to a layout designed to add the same gain to all channels, like this:



    5. Set the Master Gain slider to the value found above. In our example, this would be +1.65 dB.

    6. Record the output at a bit depth of 24 bit.

  6. Attachments:

    1. A layout including SPEC 4.0 and ARTGC (store SPEC_4_ARTGC26.bidule in the ..\Plogue\Bidule\layouts folder). Note that the full SPEC 4.0 layout and plugins should first be downloaded and installed from here.

    2. The Automatic Real-Time Gain Control group for use in other layouts (store ARTGC26.grp in the ..\Plogue\Bidule\groups folder)

    3. A layout for the optional normalization step explained above (store mch2monos.bidule in the ..\Plogue\Bidule\layouts folder)


Click here for comments, feedback and discussion.

Change History

2009-09-20 Original guide published (Zeerround and Fan51)
2009-10-28 Under Attachments, added a comment about first installing SPEC 4.0 with its plugins (Fan51)


This guide is copyrighted 2009 by SurroundByUs.com.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP POWERED_BY