On expanding dynamic range

StylusEpix

New member
I'm new to recording, and I notice that without an analog compressor, the dynamic range of digital recordings is greatly restricted.

I also do photography, and we have a similar problem with digital cameras; properly expose the picture (gain ajustment) and you lose dynamic range in the light tones. For static photographs, there is a solution: with a tripod, take the same photo two or three times at different exposure levels. You can then digitally combine the images to regain the lost dynamic range.

Now, it is clear to me that this same solution can be used in digital sound recording. For example, let's say that I have amic, a mixer and a computer. I'll ajust my recording levels properly, so that I avoid clipping, and will record that as one channel. Then, I will record the same signal simultaneously, but with added gain (I don't know, around 10 to 25 dB ?). I could use the right and left channels of a stereo pair.

So, I end up with two recordings of the same mic; one at the proper levels, one at levels way to high. In the channel with proper levels, the quieter sounds lack definition - which they have in the high gain channel. Digital signal compression usually gives bad results due to this very lack of definition in the quieter sounds - but now, it is availaible in the high-gain channel.

A digital filter can then be applied to merge the two signals together into a single, higher bit-depth channel. The results of running a compression filter on that high-definition channel will be much better than those run on a normal digital recording.

Now, I think I'm describing something that exists already. However, I just don't know what kind of software I need to do that. Does anybody know of a digital audio filter that would do what I'm describing ? I don't have the budget for a compressor, and with this technique, I think I can produce better recordings at a minimal cost.

So, how do I do this digital processing ?

Thanks.
 
It sounds like you're taking what seems to be a rational approach to your problem. Very good thinking in this industry.

And yes, sound does work in many ways in the same way the principles of light work. However, it's not as simple as applying cross techniques. Don't get too religious on comparing sound with light.

Within each band of EQ, you have hundreds of frequencies to make note of. All of which range from 20hz-20000hz, the threshold for human hearing. That's very important for bringing out things within your mix. Of course I can't just break down 14+ years of knowledge in one post, but thats a start.


A compressor actually does the opposite of what you are thinking. It is intended to restrict or control dynamic range. It makes the highs lower, and the lows a little higher. It strictly works on amplitude, not frequencies. Hence the name, "dynamic processing".

The point of a compressor is to basically bring a sound out of a noise floor and into a more audiable range. Which means, equipment usually has limitations. Noisefloors are one of those limitations. Any unwanted noise (hum, buzz, static, etc) in your mix will inevitably reduce your overall dynamic range. Thats your noisefloor. A compressor helps bring out the better qualities of a sound and rejects the negative. Thats if you know how to use it properly.


But I'm thinking you need just a basic home recording setup. I don't know exactly whats hot in terms of home recording these days, but alot of people tend to go with cubase, acid, Adobe Audition. Any of those would have the tools you need to get a good recording going.
 
You have a conceptual problem - film has less contrast (7 stops) than human vision (30 stops or so, I think), but digital recording doesn't have that problem--there is as much dynamic range as is useful for human hearing. A good set of 24 bit converters will give you 110 dB of dynamic range; you won't be recording sources that are more dynamic than that. Sure, there are sources that loud, but then do they get that quiet? Only in an extreme example of classical music. But if you can't afford a compressor, you aren't recording classical music.

If your problem is that you only have crappy converters, noisy preamps, and noisy mics, I guess you could try your approach with dynamic processing--gates, etc., but I doubt it would sound very good. The basic problem is that such gear has more flaws than just the noise floor.

I wouldn't worry about. Work carefully and learn to get the best out of your gear. Most modern music doesn't even have a 40dB dynamic range.
 
To restrict the range, I must first expand it

Thanks for the reply. I think that I didn't explain my approach properly. My ultimate goal is indeed to restrict the dynamic range of my recording, so that it stays at similar levels. This is what an analog compressor does, without significant loss of signal definition.

Now, if I make a recording at proper levels without a compressor, and I then apply a digital compressor filter, my dynamic range will be limited in the same way that an analog compressor would. However, the digital compressor has a cost: the quieter sounds do not have as much precision as the louder ones, thus there will be a loss of defintion.

I'm not sure if I'm using the right terms - I'm not very familiar with the audio jargon. But what I want to do, without use of an analog compressor, requires me to obtain a higher-definition signal, with greater dynamic range, before I apply the digital compressor filter to restrict said dynamic range.

With this dual-channel recording technique, I'd hopefully have enough signal resolution to do digital compression without the losses normally associated with it. This improved signal resolution allows more digital processing to be done without degrading the signal. This is part of the reason why 24 bit is so popular, even though it usually ends up in 16 bits: the greater dynamic range is useful for signal processing.

Now, I'm using 16-bit recording equipment, cause I haven't got the budget to go 24 bit yet. By doing an interpolated recording such as I've described, I should obtain a higher resolution signal, giving me better sound quality.

One attitude I've seen far too often here (not from you) is: "What's 200$ more ? I'm sure you can save up that much to get more equipment ! Before then, there' s no way you can get a good recording !". I had a total budget of 200$. A Behringer mixer and a Studio Project B1 are all I've got - and I'm not running out to get a DMP3, and Audiophile 2496 and a RNC - even if it'd improve my recordings. I've got to do with what I have.

So I'm looking at ways to get better sound out of the limited equipement I have. Perhaps what I describe is not possible, but since I can't afford proper analog gear, I have to believe in the power of digital signal processing.
 
StylusEpix said:
This is what an analog compressor does, without significant loss of signal definition.

Now, if I make a recording at proper levels without a compressor, and I then apply a digital compressor filter, my dynamic range will be limited in the same way that an analog compressor would. However, the digital compressor has a cost: the quieter sounds do not have as much precision as the louder ones, thus there will be a loss of defintion.

Why do you think that? If you compress an analog signal to a given dynamic range, and convert to digital, versus compressing a digital signal range to the same dynamic range, they should lose an equivalent amount of detail. It's the same with film: using a high-contrast film is analogous to using a 24 bit scanner. Once you scan or photograph a single image, you can't restore the lost detail.

So what you want to do, rather than using a low-contrast film/analog compressor, or a 36 bit scanner/24 bit converter, is combine two high-contrast images/low dynamic range sounds.

Let's say that worst case, your converters have 78dB of dynamic range. That's a fairly crappy 16 bit converter, operating effectively at only 13 bits, with 3 bits of noise. What you want to do is record a source with 96 decibels of dynamic range. You have two options: you can throw out the bottom 18 decibels of your signal, or you can use an analog compressor.

Once you are digital, you could expand the signal again, but it is inevitable that some detail has been lost in conversion. It's really the same as digital compression, in theory at least--the quality of individual analog & digital compressors will vary.

So what you want to do is record once at +0dBFS, and once at +18dBFS. The hotter signal will clip the crap out of your converters, but you don't care, since you throw that portion of the signal away. Once in the computer, you reduce gain on the hot signal by -18dB. Then you set a noise gate on the quiet track at -21dBFS (a few extra dB to allow a smooth transition before clipping). You would also need some type of reverse noise gate at -21dBFS(which I've never used, but I imagine they exist) on the hot track to eliminate the clipping. Both tracks would have to be very carefully recorded and managed, with identical coincident mics, preamps, soft knee dynamics, etc.

That's the theoretical approach, but again I don't think it will work too well. If you're having problems with insufficient dynamic range, read this:

http://www.bluebearsound.com/articles/levels.htm
 
StylusEpix said:
... However, the digital compressor has a cost: the quieter sounds do not have as much precision as the louder ones, thus there will be a loss of defintion.
Two quick thoughts here. First, the distortion caused by clipping at +18>FS would swamp the minor errors due to even very low levels.
Second, the practical and cost-less way to deal with the issue is to ride the recording gain during the quiet parts -much as you would have done when the S/N of tape was 70-80db, instead of the 90-96 you have now.
:)
Wayne
 
one thought--

if the "high gain" channel is clipping in digital, your finished product is gonna sound like crap.

oh wait... i think i see what you're talking about...

good idea!
 
Just use a digital compressor plugin, or ride the fader.

It's true that the quieter sounds will have less definition, but I bet there's no way you could hear the difference unless you have an amazing ear and are listening in a superbly treated room on excellent monitors.... and even then, put another track over it and it's completely gone.

In that respect, I dont think it's even much of a problem, as the quieter things will be less defined anyway, before losing precision, as they should be farther in the background at a more unfocused depth.

And on top of that, any clarity due to higher bit depth would most likely be far outweighed by distortions due to nonlinearities in the preamplification circuits that are running the higher gain mics, probably even with high end mic pre's (but extremely more so with not super-spensive ones)... and that's assuming that the converters pass the details in question.

Anyway, that is a pretty neat concept, but for the sake of a cleaner compression, I think it's not the answer... but I'd think it could be modified to do something useful for a different sound that might be pretty unique.
 
If you grasp what the theory is, it's the equivalent of compression then expansion. The problem is, unlike analog, by converting a compressed signal, you lose detail in dynamic range even after expansion. Thus you get around it by converting two pieces of an uncompressed signal, then combining only part of each.

It's an interesting concept, but I think that execution would be too difficult to be practical. The ear and the eye work very differently.

This I say having experience with both good quality digital recording and good quality digital scanning (Nikon film scanner; Kodachrome 64 & 25).
 
Enhancing recording quality

Sure, it's easy to record a signal at 24-bit/192kHz when you got the proper ADCs. But what if all you've got are noisy 16-bit/48kHz ADCs ?

I believe that the multiple gain level recording technique I described may well enhance quality. It may, however, be such a small gain that it is not useful. One factor that must be considered is that system noise can be reduced by such a technique.

There's one alternative approach that I've thought of - the phase quadrature technique. It is widely used in signal processing to combine a group of ADCs to record a signal of higher bandwith than each could record individually. The signal is electronically phase-shifted and recorded at once by multiple ADCs. Digital processing then recovers a higher bandwith signal from the combined recordings.

What I describe is probably not practical, but it is possible. By using multiple lower quality ADCs in conjunction and digitally processing the recordings, a higher quality signal can be recovered.
 
Cool thread. I don't know enough to say anything defintively, so I'll chime in with the rest of the punters. :)

I don't think there is a way to clean up a too-hot signal in digital. If you record at too-high levels, I don't think you can just take the "clean" bits. It seems like someone would have figured this out by now, as it is the most common problem in digital recording. That's why people limit the signal to digital recorders. I don't think you could limit your "hot" signal effectively enough to get your lower-level signals up far enough to make it worth while.
In any case you would need an unbelievable compressor, analog or digital.

And bringing up the low-level signals you are trying to capture better brings up the noise, as well. No getting around it. The lower level the signal, the less signal-to-noise ratio you have.


StylusEpix said:
Sure, it's easy to record a signal at 24-bit/192kHz when you got the proper ADCs. But what if all you've got are noisy 16-bit/48kHz ADCs ?

I believe that the multiple gain level recording technique I described may well enhance quality. It may, however, be such a small gain that it is not useful. One factor that must be considered is that system noise can be reduced by such a technique.

There's one alternative approach that I've thought of - the phase quadrature technique. It is widely used in signal processing to combine a group of ADCs to record a signal of higher bandwith than each could record individually. The signal is electronically phase-shifted and recorded at once by multiple ADCs. Digital processing then recovers a higher bandwith signal from the combined recordings.

What I describe is probably not practical, but it is possible. By using multiple lower quality ADCs in conjunction and digitally processing the recordings, a higher quality signal can be recovered.

You don't need more bandwidth. You need more resolution at low levels. To do what you describe would not entail phase shifting, but dividing the input by signal strength.
Say you have three bands, for lack of a better word. One from 0-.3 volts, one from .3 volts to .7 volts, and one from .8 volts to 1 volt. Each processed by it's own ADC.

Then the lower signal band is upped in strength and sampled to increase it's resolution, is that what you are saying?

Essentially that is compression. The upper signal level remains the same while the lower signal level is brought up in level.
 
boingoman said:
Cool thread. I don't know enough to say anything defintively, so I'll chime in with the rest of the punters. :)

I don't think there is a way to clean up a too-hot signal in digital. If you record at too-high levels, I don't think you can just take the "clean" bits.

No, you'd have to throw out that entire portion of the wave and replace with the unclipped wave from the cold signal. You could do it with edits, but it would take forever.

Stylus, I agree that conceptually it could work, but you are neglecting several practical difficulties:

1) You'd have to have a well-matched pair of microphones. The microphones you probably have won't do. You would also have to get the capsules of the mics right on top of each other, even so there would still be a potential for phase shift at very high frequencies. Any signal difference between the two channels will result in phase problems in the transition from cold to hot signals.

2) You have at least three other sources of noise that limit your dynamic range: your room, your microphone, and your preamp. If you can't achieve 90dB of dynamic range in the analog world, it doesn't really matter if you can digitally.

3) Low dynamic range is not the only problem with really bad converters. There are phase problems from anti-aliasing filters, harmonic distortion from jitter . . . those don't affect the theoretical gain in quality from your technique, but they do limit the quality of the conversion itself.

4) You would have to get the relative levels of the two tracks perfect, and the dynamic transition between tracks would have to be exactly inverse. That is not a trivial matter.


I'm willing to bet that your converters aren't as bad as you think, and aren't your major source of noise. And again, how much dynamic range do you really need? What is the stated dynamic range of your converters? You need to quantify that.

Are you getting sufficient hot signals into your ADCs? Does your preamp generate noise and distortion at high levels of gain? These are critical issues before you worry about conversion.

Also boingoman is right; your phase quadrature technique would increase sample rate, which gives you additional useless frequency response, but no added dynamic range. Read up on "Nyquist theory".
 
mshilarious said:
...
2) You have at least three other sources of noise that limit your dynamic range: your room, your microphone, and your preamp. If you can't achieve 90dB of dynamic range in the analog world, it doesn't really matter if you can digitally.

Mshilarious has nailed this in several ways, and other priorities come first. If the analog dynamic range fits with some margin within the AD conversion range, these errors are the small fish.
... Read up on "Nyquist theory".
:D
 
mshilarious 1) You'd have to have a well-matched pair of microphones. The microphones you probably have won't do. You would also have to get the capsules of the mics right on top of each other said:
i don't think that this is the case. you could simply route the signal from one channel to two different tracks and record at different levels of gain.

with regards to this entire idea, i'm not an expert by any means, but it seems to me that some simple software could accomplish this. it would be similar to the "combine sources" function in ms word, in a way. you would just take your two channels, identical in all respects but gain (one clipping), and use the "cold" signal when the "hot" signal clips. at all other times you would use the "hot" signal. sounds easy to me!

of course, normalizing the two would be a problem. and whether or not this is even worthwhile is another question....
 
Back
Top