Some ideas for compressor side-chains

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

etheory

Well-known member
Joined
Mar 21, 2011
Messages
604
Location
Sydney, Australia
I've been looking into compressor side-chain designs for some of my own compressor designs and have become interested in how you can make a faster and smoother side-chain.

I've noticed that in most designs the main source of distortion in the VCA is the superposition of the CV-rectifier ripple on top of the audio signal at the output, and the main issue is the discontinuity at the rectification "change of direction" that you want to "get rid of".

Here-in is the infamous real-world trade-off part ;)
The more you filter the CV after rectification, the less your multiplied distortion (a vca is, after all, just a multiplier, hence your output distortion is only as good as your operands), but the slower your attack time, due to the increased filtering increasing the filter step response time.

So you have two options. Filter less (but that increases distortion), or derive "more push" from your signal to charge your cap faster, or, indeed, maybe both?

Here is an interesting approach I came up with which might never leave the simulator (due to issues I will discuss in a bit), and it is very likely not an original concept, but it is interesting and combines the idea of fast attack with a smooth signal. Well, kinda....

Take the area of a sine wave from 0 to π. The area under this curve is 1. This is the amount of "push" we have to charge a cap over π units of time.
How can we improve this?

Well, if we phase shift the signal by 90 degrees (π/2 time delay), or shift the signal -45 degrees (-π/4 time delay) to 45 degrees (π/4 time delay), and rectify both the phase shifted signals, then we have more area under our curve per unit time. Hence our integral area increases, and the amount of energy we have to charge the cap also increases.

However, our CV frequency has now also doubled, and we have twice as many discontinuities to remove (twice the zero crossings per unit time). So there is a trade-off here I'm still figuring out.

But, a schematic speaks a thousand equations, so, this is the idea (I've referenced back to the original sources for the sub-circuits in the schematic).

The way it works is this. Take an input (shown in green). Derive a 100Hz to 10kHz 1% accurate -45 degree and 45 degree split phase-shifted signal representation for each signal, and then rectify each independently (shown in red and blue).

From here, charge a cap with the summation of the two signals.

This would be an interesting thing to try on full-frequency audio signals, as no doubt the use of phase shifters will make full frequency content much messier than a nice sine wave. However the reference at http://webpages.charter.net/wa1sov/technical/allpass/allpass.html suggests the results should be OK.

Downsides:
A LOT of opamps, and probably a lot of noise (but most of that should be filtered out).
Less correlation to the original signal, since we are "generating" data instead of working with it directly, so no doubt this will introduce response lag (cause you can't look forwards in time, even in the analog domain).

Thoughts?
 

Attachments

  • etheory_smoother_cv_v01_01.jpg
    etheory_smoother_cv_v01_01.jpg
    429.7 KB · Views: 155
Thoughts? Me? Well...

I had recently on breadboard the approach of two fw rectifiers in series before the lp filter, which gave also better control voltage, more brutish than your thoughts, but also a bit simpler to build...did you already try it?
 
No, I didn't try it.
I think it's too big/complex to try for the moment.
I am working on a much more standard circuit for the moment, but this idea was in my head so I wanted to jot it down.

If anyone beats me to it I'd love to know how you go.

I'm also sharing in case it inspires another crazy idea 8)

L
 
Voltage and current are in some cases 90 degrees apart.
I've also wondered if you could use this relationship also to derive a more "constant" representation of envelope.

Another good one would be an analog hilbert transform.

You could also use a phased locked oscillator and take the difference in magnitude.

But none of these could be called simple!

Anyone know other ways apart from rectify and filter?
 
Welcome to dynamics design 101. Don't forget release time too. Fast-release causes more distortion than attack time.

I think you are confusing filtering (LPF) with slower attack times. It isn't a matter of available current, just poles and time constants.

There is a great deal of art to mitigate this control voltage modulation distortion.

One strategy is to dynamically smooth the side chain CV so small level changes see long attack/release time-constants (for low distortion) while large signal step changes receive a faster time constant so the dynamics process is still responsive. Human hearing can ignore transient distortion only present for a few cycles much easier than steady state distortion.  This way you can kind of have your cake (fast attack and or release) and eat it (low distortion).

These can vary in complexity. I have posted one of my old kit designs here before. My last tape noise reduction, a glorified fixed 2:1 compressor, with symmetrical 1:2 playback expander. I included several tricks like a capacitance multiplier topology to form a CV ripple filter for modest signal changes, while the ripple filter was current limited so large changes were faster. I also had a parallel fast path to respond to large sudden level changes. The design goal for NR companding was to make the processing as transparent as possible. Note: There is some extra frequency response shaping (HF pre/de-emphasis ) to whiten the recorded signal for some extra reduction of tape hiss on playback.

Chew on this for a while. I don't know if the ne572 is still available but I liked it because it had two rectifier outputs and an OK low cost gain cell for use in a tape path.

p-522.jpg


There is a LOT of different things going on so rather than trying to explain everything I will answer specific questions about what the different parts are doing. If anybody is interested.

JR

PS: Note: there is a trig identity SIN^2 + COS^2 =1 that suggests a ripple free rectified result from squaring a sine wave and a 90' phase shifted version then summing them. Unfortunately dynamics processors are dealing with complex waveforms so single sine wave tricks have limited utility.
 
First of all nice design JR, what about GML 8900, it also has not 2 but 3 time constants...

JohnRoberts said:
PS: Note: there is a trig identity SIN^2 + COS^2 =1 that suggests a ripple free rectified result from squaring a sine wave and a 90' phase shifted version then summing them. Unfortunately dynamics processors are dealing with complex waveforms so single sine wave tricks have limited utility.

Superposition theorem says that you can sum any sources and the result of the circuit will be the sum of the results of the solution with all the independent sources... But this is only with linear circuits, so the solution won't be the case for this because there is a cuadratic solution, same for rectifiers, true RMS, etc. So can't use this application and see the complex wave as fourier said just because this are not linear stuff, even if it's a constant wave but with harmonics, for this an square wave is as complex as a snare or any other musical content.

At which frecuency start to get worst this distortion, what about use a 2nd RC filter but at lower time constant (higher frec) to avoid the distortion at this frec, if distortion over 2kHz is the problem add a second order filter at 0.5ms just add 1ms of lag (a lot for a limiter but won't harm a lot in a compressor) it will just work alone if 1ms is wanted and the original RC filter if longer time constant are wanted. For some rectification apps I've seen caps in parallel with diodes to get them slower but for 50/60 Hz so I don't think it would help in audio signals.

JS
 
joaquins said:
First of all nice design JR, what about GML 8900, it also has not 2 but 3 time constants...
Capacitance multiplier, as in JR's circuit (and also in most dbx compressors) has not only two time constants, it has an infinity of continuously-variable time-constants.
 
abbey road d enfer said:
joaquins said:
First of all nice design JR, what about GML 8900, it also has not 2 but 3 time constants...
Capacitance multiplier, as in JR's circuit (and also in most dbx compressors) has not only two time constants, it has an infinity of continuously-variable time-constants.

I meant, as in GML desing, independent controls for Fast RMS and Peak crest factor in relationship with slow RMS where time constant are aplied, I don't know how though.

JS
 
joaquins said:
First of all nice design JR, what about GML 8900, it also has not 2 but 3 time constants...

JohnRoberts said:
PS: Note: there is a trig identity SIN^2 + COS^2 =1 that suggests a ripple free rectified result from squaring a sine wave and a 90' phase shifted version then summing them. Unfortunately dynamics processors are dealing with complex waveforms so single sine wave tricks have limited utility.

Superposition theorem says that you can sum any sources and the result of the circuit will be the sum of the results of the solution with all the independent sources... But this is only with linear circuits, so the solution won't be the case for this because there is a cuadratic solution, same for rectifiers, true RMS, etc. So can't use this application and see the complex wave as fourier said just because this are not linear stuff, even if it's a constant wave but with harmonics, for this an square wave is as complex as a snare or any other musical content.
I have no idea what you just said, but it sounds important.  8)
At which frecuency start to get worst this distortion, what about use a 2nd RC filter but at lower time constant (higher frec) to avoid the distortion at this frec, if distortion over 2kHz is the problem add a second order filter at 0.5ms just add 1ms of lag (a lot for a limiter but won't harm a lot in a compressor) it will just work alone if 1ms is wanted and the original RC filter if longer time constant are wanted. For some rectification apps I've seen caps in parallel with diodes to get them slower but for 50/60 Hz so I don't think it would help in audio signals.

JS
Distortion is most audible from fast release on lower frequency tones or held notes, where the release is visibly altering (distorting)  the waveform in real time. For complex waveforms there is some self-masking of this distortion. If you filter this enough to reduce the distortion you also forfeit the fast release.

While my bench work is probably dated (decades ago), back in the day the problem was mostly artifacts, from the compressor gain reduction no responding fast enough, so there was transient clipping. Poor quality gain elements also suffered from CV feed through. Imagine a DC offset at input of VCA.. This DC term gets multiplied by gain changes.

For complementary NR systems tracking is very important and several of the tricks in my tape NR circuit were to deal specifically with quirks of recording vinyl to magnetic tape. 

Note: There are also characteristics of human audition that can be taken advantage of.  Our hearing perception has time constants associated with it so sensitivity for quiet sounds proximate to loud sounds is reduced so there is a grace period or time to make large gain changes immediately around large level shifts.

JR
 
abbey road d enfer said:
joaquins said:
First of all nice design JR, what about GML 8900, it also has not 2 but 3 time constants...
Capacitance multiplier, as in JR's circuit (and also in most dbx compressors) has not only two time constants, it has an infinity of continuously-variable time-constants.

I didn't know that this was so widely used, but I thought it was a good idea so it should be.  8)

While I need to sweep aside a lot of cobwebs, it seems there were only a few dominant time constants involve with mine, while the NE572 control port not a simple R to ground but IIRC a R feeding a current mirror (a couple base drops up from ground) so deviates from the simple RC at lower CV levels. (No I don't remember the internal R value)

Fast time constant for large signal changes  is .1uF  C13, just the .1uF by itself when opamp output clips against negative supply so ripple filter stops subtracting ripple current.

For small signal changes the time constant looks like fast .1uF in parallel with the slow 1uF.

There is also an current boost helper. Q1 connected to another 1uF so signal transients larger than about 5V fast charge the swinging 1uF from the fixed 1uF to speed up the attack time. To improve the long term tracking (in tape NR application) this fast attack actually "borrows" current from the second 1uf cap, which remains connected through high impedance DC path so over time the borrowed current gets paid back and long term average remains accurate, so not affected by phase shift or level errors like simple fast attack.

Then slow time constant ultimately involves both 1uF caps while there is a pole between first and second 1uF, and the fast is pretty much just the .1 uF alone.  While the fact that these caps are feeding a current mirror through a resistor means they are not simple RxC time constants (slower-longer time constant for small signal levels).   
======

One could use diode steering to model 4 time constants with different attack and release for both large and small signal changes while generally for small signal changes very slow attack and release are acceptable. 

I suspect this is already widely done also.

Another dynamics trick is a "hold" time. Imagine a release that doesn't start releasing until after X mSec. In principle you could eliminate the common waveform distortion from the release starting immediately, but release as fast as you want, starting right after that hold.

As i said lots of art surrounding side chains. We are just scratching the surface. While some of these tricks are more to measure good on the bench with sine wave testing, than to sound good with real world signals.

One tool that I found incredibly helpful when I was doing dynamic design a few decades ago was a special burst generator. I effectively gated an input on-off at zero crossings  with variable on time and off time. I managed the direction of zero cross switching so there was no DC component caused by the burst gating an odd number of ups and downs. I also had a variable dry feed around the gate so I could vary the depth of the burst on/off ratio. Finally I could feed sine waves or complex audio signals into this gate circuit, to punch up the dynamic content of random audio test signals available.  I wasted too many hours of my life trying to make dynamics processors sound like nothing..  ;D  A good burst generator is a powerful tool to help coax out artifacts from faulty approaches. It is a little too easy to design something that sounded good with one recording, then beeped or farted with another.  (i found many rude noises along the journey).


JR
 
JohnRoberts said:
[...]
Another dynamics trick is a "hold" time. Imagine a release that doesn't start releasing until after X mSec. In principle you could eliminate the common waveform distortion from the release starting immediately, but release as fast as you want, starting right after that hold.
[...]
JR

GML has an hysteresis control, not hold but will help in some similar way... I talk about GML because it's a really clean comp as I'd heard, never had the chance of using one... It has a really strange set of controls from where we can guess, I've never found an scheme.

JS
 
joaquins said:
JohnRoberts said:
[...]
Another dynamics trick is a "hold" time. Imagine a release that doesn't start releasing until after X mSec. In principle you could eliminate the common waveform distortion from the release starting immediately, but release as fast as you want, starting right after that hold.
[...]
JR

GML has an hysteresis control, not hold but will help in some similar way... I talk about GML because it's a really clean comp as I'd heard, never had the chance of using one... It has a really strange set of controls from where we can guess, I've never found an scheme.

JS

I have used hysteresis in noise gates thresholds to prevent chattering on/off when low level signal/noise floor is right at a threshold. For an above threshold compressor/limiter I am not sure how much benefit threshold hysteresis offers since signals don't usually hover around thresholds.

I am guessing you are talking about something other than threshold hysteresis?

JR





 
JohnRoberts said:
...
Another dynamics trick is a "hold" time.
...
Some plugins have this and I find it invaluable when using very short release settings.

Other than that, there are numeruous tricks possible with the variable PN-junction resistance, f.e. Scholtz used such deep trickery in Rockman processors for fast transient response and fairly slow leveling.

But there's also cheapo trickery with only R-C networks possible. Either passive or around an opamp.

There's also a different usage scenario possible with the BJT cap. multiplier, where it is connected traditionally (like in PSU rail filters), and you exploit the fact that BE junction is a diode, this way you can "diode sum" fast and averaged response ... hmm otoh perhaps not so much of interest for compressors, but more for envelope filters.
 
> Take the area of a sine wave from 0 to p.
> Well, if we phase shift the signal by 90 degrees


Music is not sines.

Even if it were.... it's not single-frequency sines.

How do you do 90 degrees on a non-sine which may be anything from 50Hz to 5,000Hz?

Your "phase shifter" gives a 90 degree *difference* of two outputs. Yes, I suppose this may fill-in some ripple. But what is the time delay through the networks? (I don't know offhand, but it's gotta be some.)

In fact what you are asking is "foresee the future". When a transient starts, is it gonna go way up, or break before threshold? Look at actual musical starting transients (piano, guitar, trumpet) and you'll see no simple sure way to predict until after the fact.

Alternatives: For the release ripple, I have seen a scheme to S/H the signal at a higher rate in multiple S/Hes and take the highest value.

You can digitize the release function. Hold the CV steady until sure that transient is fading, then slope at a constant rate (or as a function of level below threshold) rather than as a dumb old R-C network.

You can put a delay in the straight path so that the sidechain really can work after-the-fact. In fact this is a major reason I switched to computer massaging... everything is delayed on disk so the sidechain can easily look-ahead and "predict the future". (I'm now interested in analog limiters only as safety devices in live recording; and unless I totally screwd the gain setting I'll limit only a few dB for fractions of a second, and most flaws go unnoticed.)

BTW: I don't think you need to buffer that type (ESP #6) rectifier. Many types, you do (or can work-around, as when I was converting whole-Watt AC samples to drive a 10Meg 0.2V DC meter); but U15 (? hard to read a JPEG) is already a low-Z output.
 
JohnRoberts said:
joaquins said:
JohnRoberts said:
[...]
Another dynamics trick is a "hold" time. Imagine a release that doesn't start releasing until after X mSec. In principle you could eliminate the common waveform distortion from the release starting immediately, but release as fast as you want, starting right after that hold.
[...]
JR

GML has an hysteresis control, not hold but will help in some similar way... I talk about GML because it's a really clean comp as I'd heard, never had the chance of using one... It has a really strange set of controls from where we can guess, I've never found an scheme.

JS

I have used hysteresis in noise gates thresholds to prevent chattering on/off when low level signal/noise floor is right at a threshold. For an above threshold compressor/limiter I am not sure how much benefit threshold hysteresis offers since signals don't usually hover around thresholds.

I am guessing you are talking about something other than threshold hysteresis?

JR

Pretty sure it's threshold hysteresis, I guess that is at slow RMS so signal won't change so much and maybe get some slower (or no) release when signal is just below average of the last 2 seconds... this way the slow compressor is not attacking/realeasing all the time but it keeps more stable (what hysteresis cycle do in any system) but I could be wrong, schemes never been seen of such a thing.

Other option is symetryx 501 aproach here http://www.symetrixaudio.com/kb/501_sch.pdf
Has an automatic att/rel pretty simple and it works nice but in log mode, not a problem for a FF VCA, I guess it's what we are talking about.

Another idea that cames to mind is to use the release discharge resistor to the rectified signal instead (in combination probably better) of ground, a diode  with a low value resistor  (lower than discharge to ground) in series from cap to a rectified, filtered and buffered signal in order to get a faster release when signals drop down too fast and slower when signals are dropping slow. Just thinking at loud, don't know if it has any use or advantage.

JSS
 
joaquins said:
...
Another idea that cames to mind is to use the release discharge resistor to the rectified signal instead (in combination probably better) of ground, a diode  with a low value resistor  (lower than discharge to ground) in series from cap to a rectified, filtered and buffered signal in order to get a faster release when signals drop down too fast and slower when signals are dropping slow.
...
Scholz did that (a bit more involved though) in Rockman processors, as I said before. It works, obviously... but I think it's patented "technology".
 
tv said:
joaquins said:
...
Another idea that cames to mind is to use the release discharge resistor to the rectified signal instead (in combination probably better) of ground, a diode  with a low value resistor  (lower than discharge to ground) in series from cap to a rectified, filtered and buffered signal in order to get a faster release when signals drop down too fast and slower when signals are dropping slow.
...
Scholz did that (a bit more involved though) in Rockman processors, as I said before. It works, obviously... but I think it's patented "technology".
If it's patented, we can look up the patent and learn how it works. That is the good part of the patent system, it shares and expands knowledge..  Weren't those Rockmans done decades ago? Any protected IP may be expired by now. That's the deal, free to use by everybody after expired.

JR
 
joaquins said:
Pretty sure it's threshold hysteresis, I guess that is at slow RMS so signal won't change so much and maybe get some slower (or no) release when signal is just below average of the last 2 seconds... this way the slow compressor is not attacking/realeasing all the time but it keeps more stable (what hysteresis cycle do in any system) but I could be wrong, schemes never been seen of such a thing.
Threshold hysteresis wouldn't alter att/release behavior just cause threshold to shift up.dn based on prior state.
Other option is symetryx 501 aproach here http://www.symetrixaudio.com/kb/501_sch.pdf
Has an automatic att/rel pretty simple and it works nice but in log mode, not a problem for a FF VCA, I guess it's what we are talking about.
"Automatic att/rel" can be code for "we don't know how to quantify this". Depending on the side chain and gain elements used there may not be simple concise time constants. Like the example NR I posted above. It looks like simple RC time constants at high levels but at low level the diodes in the current mirror add their impedance to the R in the RxCs to increase time constants dramatically. I have done cheap compressors where the gain element was not operating with simple control law, I just labelled a 3 pos switch fast-med-slow.
Another idea that cames to mind is to use the release discharge resistor to the rectified signal instead (in combination probably better) of ground, a diode  with a low value resistor  (lower than discharge to ground) in series from cap to a rectified, filtered and buffered signal in order to get a faster release when signals drop down too fast and slower when signals are dropping slow. Just thinking at loud, don't know if it has any use or advantage.

JSS
yes, diode steering is the common way to incorporate alternate level dependent functions.

JR
 
PRR said:
> Take the area of a sine wave from 0 to p.
> Well, if we phase shift the signal by 90 degrees


Music is not sines.

Even if it were.... it's not single-frequency sines.
ding ding ding...  righto
How do you do 90 degrees on a non-sine which may be anything from 50Hz to 5,000Hz?
I guess you could put a LP active integrator stage in the feedback loop, similar to a SVF where the HP/BP/LP outputs are generally in quadrature between bandpasses, but again only possibly useful for single sine waves.  (I recall a thread where I discussed this with Brad years ago and he even found an example of it in a one frequency at a time oscillator AGC loop). 
Your "phase shifter" gives a 90 degree *difference* of two outputs. Yes, I suppose this may fill-in some ripple. But what is the time delay through the networks? (I don't know offhand, but it's gotta be some.)
Yup, filters are delay. Ironic delay is how you make filters in the digital domain.
In fact what you are asking is "foresee the future". When a transient starts, is it gonna go way up, or break before threshold? Look at actual musical starting transients (piano, guitar, trumpet) and you'll see no simple sure way to predict until after the fact.
yup
Alternatives: For the release ripple, I have seen a scheme to S/H the signal at a higher rate in multiple S/Hes and take the highest value.
peak hold?
You can digitize the release function. Hold the CV steady until sure that transient is fading, then slope at a constant rate (or as a function of level below threshold) rather than as a dumb old R-C network.
I have been accused of suggesting microprocessors as the solution for everything, but this could be an attractive application, where the flexibility of digital decision making could be exploited. This has been a pet project of mine, I just don't have a neat control interface ( I want to be able to tweak every last variable, too many knobs and switches without soft controls). 
You can put a delay in the straight path so that the sidechain really can work after-the-fact. In fact this is a major reason I switched to computer massaging... everything is delayed on disk so the sidechain can easily look-ahead and "predict the future". (I'm now interested in analog limiters only as safety devices in live recording; and unless I totally screwd the gain setting I'll limit only a few dB for fractions of a second, and most flaws go unnoticed.)
One early application for high quality delay was look-ahead.
BTW: I don't think you need to buffer that type (ESP #6) rectifier. Many types, you do (or can work-around, as when I was converting whole-Watt AC samples to drive a 10Meg 0.2V DC meter); but U15 (? hard to read a JPEG) is already a low-Z output.
Non-realtime processing opens up many doors.You could even experiment with processing files while played backwards where standard dynamics of music turn into slow ramps up, with sudden drops lower, much easier to process with finite attack times.

JR
 
http://www.google.com/patents/US5133015

see schem on p.5 - around the fet there are diode string doing the "voltage dependent resistance".

The whole thing is tailored towards specifics of guitar signal, so don't second guess the validity of this approach within this context - it was tweaked to the max. This may therefore not work "as expected" on your music programme material.
 
Back
Top