Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Reversing dynamic range compression (Read 4159 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Reversing dynamic range compression

Given that many CDs these days are compressed to death, is it feasible to determine how much they were compressed? If so, it ought to be possible to decompress them? Are there any major gotchas preventing this?

Reversing dynamic range compression

Reply #1
The correct term is called expansion and the answer to your first question is likely no.

These threads may be of some help:
http://www.hydrogenaudio.org/forums/index....showtopic=60239
http://www.hydrogenaudio.org/forums/index....showtopic=48063

Reversing dynamic range compression

Reply #2
Something done with a forward compression algorithm is most likely unexpandable.

Something done with a backwards compressor (i.e. measuring output) might be expandable, depending on settings.

But you'd have to know the actual settings, and hope they didn't clip.

http://i238.photobucket.com/albums/ff228/j.../plots/ughl.jpg

That is a histogram of a "Mars Volta" track. Yes, +- max are really an order and a half of magnitude more likely than zero.
-----
J. D. (jj) Johnston

Reversing dynamic range compression

Reply #3
It would be awesome if broadcasters transmitted their compressor gain signal alongside their audio signal, but given that such a signal is fundamentally not bandlimited, I suppose it wouldn't be something that could ever be encoded at a terribly low bitrate.

Reversing dynamic range compression

Reply #4
You may enjoy experimenting with a dynamic expander, and there may be improvement with some recordings.  But, there are (at least) three problems that prevent you from "reversing" compression... 

1. The compression (especially limiting) is often non-linear.  Typically, you've got lots of 0dB peaks and there is no way to know which 0dB peaks should be 0dB, which peaks should be +1dB, which peaks should be +9dB, etc.*  In that case, the peak information is lost and cannot be recovered.

2. We don't know the basic compressor settings (threshold, ratio, attack, release).  Multiband compression is even more complex with more unknowns.

3. Different compression/limiting settings can be used on different tracks/instruments before mixing.  Since we can't un-mix, this process can't be reversed. 

If you have a slightly compressed recording, you can probably make some improvement with expansion.  If you have a highly compressed recording, you don't have much dynamic information to feed-into the expander and you are unlikey to get good results...  you might make things worse.

I think most audio editors have an expander.  I use GoldWave, and it has a compressor/expander.  There appears to be an optional expander for Audacity.

You can get a de-clipper[/color].

I've heard of a "peak unlimiter", but it was a hardware device and I don't know if you can get a software effect/plug-in.  But, you can probably do the same thing with an expander.


* Of course, you can't go over 0dBFS.  So with upward expansion, you have to reduce the overall level of your file to accomatate the new "higher" peaks.    I don't know if there is terminology for this... it's the opposite of the "make-up gain" used with compression.

Reversing dynamic range compression

Reply #5
Given that many CDs these days are compressed to death, is it feasible to determine how much they were compressed?


In general no. If you pull it off, you will probably do it more due to luck than skill.

In times past, dynamic range compression was a relatively simple process, and could be described by as few as 4 parameters: Threshold, ratio, attack, release. Early on compression was dependent on the same signal as the signal being processed. One of the first general enhancements (maybe 1960s) was to apply bandpass and other filtering to the signal used to control the process. The next general enhancement (ca. 1970s) was to split the signal up into bands and compress each band separately. Thnngs have only gotten more complex since then.

If one wanted to determine signal processing parameters by standard mathematical means, calculations would be performed that were based on both the original signal and the compressed signal. It would be helpful if a special test signal were available to be analyzed this way so that the effects of individual parameters could be more easily sorted out.

In general none of the information that is required to proceed logically and mathematically is available. We don't have access to the signal prior to processing, and even if we had that signal, it would rarely if ever be a test signal, but instead would be just music, which is probably best modelled as a random collection of signals who at best their general statistics might be determined. We want to determine some very specific things, but few if any of the specifics are available, even if only in the form of examples. We're screwed!

Let me pose a  farr simpler but equally impossible challenge that illustrates the problem. I will give you a sample of music, and I want you to tell me the frequency response of the microphone that was used to record it. The frequency response of *no* other equipment or the venue that was used to record it is available to you.

There are thousands of microphones and other kinds of equipment that could have been used.  Microphone frequency response often depends on incidence angle and distance to the source which can be anything and is generally several different things at the same time. The rest of the equipment includes equalizers, each with potentially millions of different combinations of settings.  Now what?

Reversing dynamic range compression

Reply #6
FLUX has a De-compressor plug-in which allows to increase the dynamic range. Of course it's not possible to retrieve the exact original signal. But it can be usefull to refresh over-compressed audio.

Reversing dynamic range compression

Reply #7
It would be awesome if broadcasters transmitted their compressor gain signal alongside their audio signal, but given that such a signal is fundamentally not bandlimited, I suppose it wouldn't be something that could ever be encoded at a terribly low bitrate.

I think the Dolby codecs (DD, DD+, TrueHD) already do this, don't they?