Page 3 of 3

Re: Any opinions about Nonlinear-Compressor XI.ny ?

Posted: Mon Jul 21, 2014 4:54 pm
by Paul L
Have you ever looked at histograms for peak dB minus rms dB?

For a square wave it is 0, for a sine wave it is 3, for speech it would vary a lot but sometimes be large. I often see very asymmetrical waveforms in vowels, tall narrow peaks balancing broader lower excursions on the opposite side of the line. Sometimes low frequency rolloff (a desirable thing to do) exaggerates this, because of different phase shifts in the harmonics, I suppose. It is often vowels like that that make peak limiting necessary after compression, at least as I do things.

Re: Any opinions about Nonlinear-Compressor XI.ny ?

Posted: Mon Jul 21, 2014 6:58 pm
by Robert J. H.
Paul L wrote:Have you ever looked at histograms for peak dB minus rms dB?

For a square wave it is 0, for a sine wave it is 3, for speech it would vary a lot but sometimes be large. I often see very asymmetrical waveforms in vowels, tall narrow peaks balancing broader lower excursions on the opposite side of the line. Sometimes low frequency rolloff (a desirable thing to do) exaggerates this, because of different phase shifts in the harmonics, I suppose. It is often vowels like that that make peak limiting necessary after compression, at least as I do things.
I would expect that the (local) DC-offset becomes less after the highpass filter.

Let's take the following sample sound:

Code: Select all

(buzz 20 40 (s-rest 1))
That's a 82 Hz tone with 20 harmonics and is very asymmetric:

Code: Select all

Analysis of first 2.500 seconds:
Peak Level: 0.0 dBFS
Peak Positive: 0.0 dBFS
Peak Negative: -12.1 dBFS
DC offset: 0.0 %
RMS: -16.0 dBFS
After highpassfilter (-12 dB at 100 Hz cut-off) and amplification:

Code: Select all

Peak Positive: -0.0 dBFS
Peak Negative: -5.8 dBFS
Same with two times the same highpass filter:

Code: Select all

Peak Positive: 0.0 dBFS
Peak Negative: -2.2 dBFS
And now, we reverse the sound before the second highpass filter:

Code: Select all

Peak Positive: -0.0 dBFS
Peak Negative: -7.2 dBFS
Reversing the sound gives something similar to a zero or min phase filter.
The second pass with the reversed sound establishes back some of the original offset since the phase drifts work in the opposite direction.
Also, the highest peak is only 0.5 dB lower than the original, whereas the normal 2-pass has a peak of -2.1 dB before amplification.
One should actually adapt the filter coefficients for the second run (similar to a cascaded 4th order filter).

By the way, Rms to Peak ratio is the Crest Factor and is widely used to categorize simple waveforms.
For our purpose however, one value has still to be absolute.
It could be interesting to put both features in a n x n matrix, where n would be the dB resolution.
For example, 1 dB distance from > 0 dB to <= -100 dB.
In col 10, row 20 would thus be filled with the amount of -20 dB Rms/-10 dB peak pairs in the whole Audio.