Expert Viewpoint: On the Level
Feb 1, 2008 12:00 PM, By Garret Maki
A crash course in modular audio DSP gain structure.
I can summarize what you need to know about audio DSP system gain structure in two basic points:
- Don't clip the converters.
- Internally, don't run levels too high or low with fixed-point digital audio.
The process of setting audio system gain structure by level matching has been discussed in many places. In this article, I'll cover some specifics of modular DSP systems assuming the reader already has a solid foundation in gain structure between analog components.
The first step is knowing the I/O clip point (how 0dB FS is indicated), the meter location relative to converters, and the gain-control location relative to converters. Sadly, many DSP GUIs are unclear on these issues.
You always want to make sure not to clip the input of the DSP. Analog-to-digital converters (ADC) and digital-to-analog converters (DAC) don't overload gracefully.
Some DSP products have analog input gain in steps, some have analog gain that is continuously variable, some have both, and some have none. The products with variable analog gain have a clip point that varies with the gain setting; the ones with none have a fixed clip point. All products have some maximum input level.
If the maximum output of the preceding device exceeds the maximum input level, a pad should be inserted at the input of the DSP to reduce the maximum level to slightly less (~1dB) than the maximum input level. It's not too uncommon to find a mixing console with a maximum output of +28dBu. If the DSP clip point is +24dBu, with a 5dB pad in between, the ADC cannot be clipped. If the ADC is clipped, there is no use turning the level down in the DSP downstream — that would simply reduce the level of the already distorted signal (see the DSP block diagram at right).
Some people advocate placing an analog limiter in front of the DSP input to keep it out of clipping. I recommend against this. First, the analog limiter would have to have a max input spec as high as the previous device max out or greater — just as the DSP would — or its input will be clipped just as that of the DSP would have. A “U” pad consists of three resistors and an XLR barrel (or similar) to house it, which cost only a few dollars. The limiter costs hundreds to thousands of dollars per channel. The pad will leave the audio unchanged, other than attenuation. While in gain reduction, a limiter will typically have increased distortion, which also results in reduced dynamic range for the system considering its noise floor and the gain reduction involved.
With electronics such as a mixing console or a CD player as the source, there is no guesswork about the ideal gain setting: Simply match clip levels. A spec of around 108dB dynamic range is pretty typical for a DSP today. This is rarely the lowest dynamic range component in the system. While running some numbers, it became clear that with today's wide-bit-path processors and converters, today's products are much more forgiving to suboptimal gain structure. That means that one may not run the input right up to the clip point and will probably still end up with a usable system, but optimizing gain will result in the best signal-to-noise ratio.
A microphone doesn't have this nice, defined maximum output level. There can be a great amount of variation with expected usage of the mic. Assuming there is no operator to monitor the mic input level and make adjustments, it is best to set the gain conservatively to make sure the ADC doesn't clip. The extra noise from setting the preamp conservatively is less objectionable than the sound of a badly clipped signal, and the noise is treatable in DSP with the use of gates, expanders, and gain share auto mixers. But if you clip the input, there is no antidistortion block to save you.
There are legitimate reasons for needing headroom between the input and outputs of a DSP beyond full scale of a single input — whether analog, AES3, CobraNet, or otherwise. Summing multiple inputs and having an EQ with boost are a couple of examples. One can't assume that because none of the inputs are clipped, the output won't be clipped. Therefore, one should turn the gain down before the output, or put a limiter in to make sure one can't clip the output in these situations.
How do we know if we're in this situation? If the level in the DSP is reading higher than the clip point of the DAC, then the level must be turned down in the digital domain to prevent clipping the converter. The clip point of the DAC is represented differently, depending on the product.
As the analog output of the DSP interfaces with the next product, you'll also want to level match the clip points. A common setup is a DSP followed by a power amp with a 0.775V (0dBu) maximum input level when its input attenuators are wide open. If the DSP max out is +24dBu, we need a 24dB reduction. This could be done at the input attenuators of the power amp, but if there is analog gain control from the DSP, it is preferred to adjust here as it allows all the amp knobs to be set wide open for ease of resetting. Virtual knobs tend to be more tamper-proof, and the process is easier and faster to adjust later if more reduction is needed to achieve the desired SPL.
Once the audio is brought into the DSP, there are only a couple of gain issues to be aware of: clipping and loss of resolution. Floating-point processing was developed to address these issues. There is no reason to avoid fixed-point processors — they have their advantages too. But it is important to avoid doing a few things internally with them. Regardless of whether the signal processing is done fixed or floating point, all products deal with the audio as fixed point as it enters and exits the DSP. This is because ADCs, DACs, and sample-rate converters operate fixed-point. Floating-point processors have fix-to-float and float-to-fix conversions on each end of the DSP engine (see the diagram above).
Most fixed-point units have approximately 12dB of internal processing headroom above 0dB FS of the ADC/DAC. The Peavey MediaMatrix mainframe, for example, shifts the audio down by two bits as it enters and up by two as it leaves. So in addition to remaining below the I/O full scale — which applies to all manufacturers — fixed-bit processors also have an internal maximum level above which clipping occurs just as it would in an analog device, such as at the mix bus of a mixing console.
LOSS OF RESOLUTION
With fixed-point, if the gain is reduced resolution is lost, and you cannot get the resolution back if the level is brought back up. Because fixed-point DSPs use a 24-bit-or-greater bit path, there is quite a lot of room before this becomes of any concern. However, putting two gain blocks back to back and turning the signal down 90dB in one block and up 90dB in the next block will not sound the same as a straight wire — especially because internally, dither is generally not used between algorithms, so the nature of the quantization distortion draws attention to itself more than it would at the DAC output, which often has the option to dither. There should be no reason to operate with massive digital level reduction, so don't.
This loss of resolution is also why one should take large amounts of reduction — say, for interfacing to a power amp or device with mic level — in the analog domain to make use of all available bits. Also, in general, most of the noise in the analog output stage comes from the DAC, not the analog line driver. So reducing the level after the DAC reduces most of the output noise with it.
Floating-point won't have these issues in the DSP engine, but again, because fixed-point analog converters or digital-transport protocols are used, there is a float-to-fix conversion that happens between the DSP and the converter.
For gain structure, you need to know one main thing: How close are you to I/O full scale? Most audio meters are labeled in decibels. A decibel is always a ratio. A ratio is an argument that needs two values to be valid, just as words such as “under” or “before” need a reference to have any meaning. One of the problems currently with GUI meters is the lack of a standard reference.
Digital audio meters are almost universally peak meters referenced to “full scale” (0dB FS) while analog audio meters are referenced to some voltage. What is the relationship between these scales? In the broadcast industry, SMPTE RP155 states 0dB FS corresponds to +24dBu, and EBU R68 states 0dB FS correspond to +18dBu. In Japan, France, and other countries, converters are calibrated to +22dBu.
Currently, the manufacturers' modular DSP for sound reinforcement are split with some referencing GUI meters to dBu values using their I/O boxes, and others are using the more universal 0dB FS reference. Hopefully, we'll see a standard emerge in the near future.
BENEFIT OF LEVEL MATCHING AND METERING
Imagine a system at such a venue as a stadium or multiroom facility. In these cases, being able to monitor levels accurately from a central location, or any location with access to the network, is a huge asset. No longer does being physically distant from a device hide its meters from you. But only when gain structure is set so devices clip at the same point is the DSP's meter providing useful information about the devices connected to it.
(As a practical warning, getting the data from many continually changing meters from a DSP to a GUI can create a tremendous amount of traffic and a heavy load on the graphics processor and DSP host, so beware when creating a page filled with meters. If a page such as this is needed, it shouldn't be left open when not needed.)
DIGITAL TRANSPORT BENEFITS
If all analog components had the same maximum input and output level, this wouldn't be the rich topic it is, but that's just not the analog world we live in. However, it is one of the advantages of digital transport. I am a fan of transporting audio digitally and “audio networking.” Interfacing digitally tends to use less cable and terminations. It practically eliminates the ingress of hum and noise into the audio during transport, and it eliminates the chore of matching output to input clip points of various products. The full-scale levels are already aligned regardless of manufacturer or consumer vs. pro format.
Garret Maki is a consultant at K2 Audio in Boulder, Colo. He specializes in large-scale DSP systems and mechanical design for integration.
Acceptable Use Policy blog comments powered by Disqus