Technology of a Compressor?

Started by masinyourface, October 02, 2012, 03:24:15 PM

Previous topic - Next topic

masinyourface

I'm extremely curious to know in depth how different compressor circuits work. Adjusting gain/output and tone in a circuit is pretty straight forward, but what methods are possible to alter the ratio, threshold, or attack? How could these methods be implemented into a different circuit? Any help is appreciated!

R O Tiree

#1
OK, here goes... There are several basic methods of altering the gain.  A variably "leaking" FET (Orange Squeezer a prime example).  A trans-conductance amplifier, where a current controls the gain of the opamp (Ross/Dynacomp and all their gazillions of clones).  An LED/LDR pair (either separate circuit elements or a "Vactrol", which is the same thing encased in resin for you) to alter the gain of an opamp.  That's just 3 common methods, but there are a great many more, varying in their complexity from smack-forehead simple to almost impenetrable.  With the coming demise of through-hole JFETs, scarcity of (noisy) CA3080 chips (other TCAs are available) and the muppets in Brussels deciding that selling stuff with tiny little bits of Selenium in the LDRs deserves the same punishment as would be meted out to some mad axe-wielding paedo r@pist, and options for the hobbyist are becoming a little more limited.  People are starting to look seriously at photo-transistors and rring here has very kindly published his schematic on this site within the last week or so.

Then there's the issue of what's called the "side-chain".  Basically, you need to rectify and/or sense peaks in the signal and then feed back (or forwards) some kind of control signal (voltage, current, light) to change the gain of the heart of the circuit.  Do you do that before you amplify the input signal, or after you have done so.  Most stomp-box compressors do it afterwards, but have a search for some of Mark Hammer's posts here about the advantages and disadvantages of both methods.

A few months ago, I wrote an analysis of the Orange Squeezer.  You'll need to get the TonePad layout printed out in front of you, so you can follow the text.  Teh clicky.  It really is a true compressor... input signals above a certain threshold get amplified at gain less than 1, and in an ever-decreasing relationship as the input goes higher, so it's not a limiter.  Below that threshold, gain is greater than 1 and increases to about 15 (typically) where it maxes out.  The snag is that a FET with a comparatively low Vgs off (2N5457?) will compress very hard very early.  That might suit someone with single coils, but a chap with hot humbuckers might think it overly squished.  Substitute something like a 2N5485 and it won't start to compress hard until maybe +/-0.8V input amplitude.  The humbucker guy might love that one, but the single coil dude would think it un-necessarily loud and have to turn it down, ending up with a pretty flat, weak and boring compression curve.

Next up, get hold of a printout of a Ross Comp or a Dynacomp.  They're all over the place.  The trick with this circuit starts with Q2, just after the CA3080 (the TCA).  You'll see that the collector and emitter resistors are identical, which means that the output signal from the TCA Enters Q2 base and the result from the bottom of the collector resistor of Q2 is inverted with an identical but non-inverted signal appearing at the top of the emitter resistor.  These signals feed a pair of half-wave rectifiers at the bases of Q3 and Q4.  Really large outputs that exceed the Vf of those diodes turn those 2 transistors on so any charge in the 10µF cap connected to their collectors dribbles away through the transistors direct to GND.  There's a 150k resistor at the top of that cap which re-charges the cap once the signal gets small again, you'll notice.  Anyway, the harder Q3 and Q4 get turned on, the lower the voltage at their collectors gets.  OK, onwards to Q5, which also has its base connected to the top of the cap and Q3C and Q4C.  As the voltage drops at Q5B, so IC and therefore IE drop.  That current flows through the variable 500k resistor, then via (usually) a 27k into pin 5 of the TCA.  Small current in at that pin lowers the gain, so the output signal gets smaller, and so on around the circuit.  As the input signal dies away, the output from Q2C and Q2E isn't enough to keep those 2 diodes pumping away at the bases of Q3 and Q4, so they turn off.  This allows the 150k to (relatively) slowly re-charge the 10µF cap.  Voltage at the Q3/4 collectors rises, Q5 turns on a bit, which allows more current to flow (eventually) into pin 5 of the TCA, so gain ramps up.  Ta daaaaah!  You'll see that 150k replaced in some schematics by a 47k and a 100k variable resistor, so you can change how quickly the cap recharges.  It thus affects the recovery time, even though you'll frequently see it mis-labelled as an "Attack" pot.  EDIT Increasing the setting on that 500k pot means you limit the current flow into pin 5 of the TCA, so that reduces the amount of compression you get. /EDIT

The other feature of the Ross Comp, etc, is the network of resistors and caps at one of the TCA inputs (from pin 3 to GND).  These are a bandpass filter.  The CA3080 is quite a noisy chip, so getting rid of some of the highs is a good thing, it sez 'ere.  Getting rid of some of the bass frequencies stops them swamping out treble frequencies quite so badly.  The result is quite nasal, to my old ears, anyway, but guitarists quite like it.

With this topology, you're pretty much limited to putting the side-chain after the amplification stage, as you need a fairly large signal to get over the Vf in the rectifiers.  I suppose you could put a pre-amp ahead of the whole thing... Anyway, that's a potted version of that circuit.

Enuff a dat... What about LED/LDR pairs.  Essentially you once again use half- or full-wave rectification, caps/resistors to affect recovery and/or attack, and that voltage is amplified by a separate opamp or transistor stage to drive an LED.  The brighter the light, the less the resistance of the LDR.  Put that LDR between the output and the -ve input of an op-amp with a resistor "outside" and you have yourself a variable gain opamp.  Trouble is, LDRs can quite often get into the Meg-ohm range when fully dark (small signal, so LED is off).  Clearly, a 10k resistor "outside" would give you insane amounts of gain when the LED goes out, so any noise in your signal would make your ears bleed.  So, the usual trick is to put the LDR in parallel with a 200k or so resistor.  Thus the max possible gain gets cut to 20 (in this case).  You have to look carefully at the fully-illuminated, minimum "R on" of the LDR so you can choose a suitable "outside" resistor so you can get a modicum of less-than-unity gain if the input signal gets out of hand (EMGs, anyone?).

OK, some general thoughts...Clearly, someone with hot humbuckers would want the cross-over point where gain becomes less than 1 (or in the case of some stomp-box circuits, limiting gain) to be set fairly high, whereas someone with quite small output single coils might want it set quite low.  Or not... Thus simple circuits like these can not be all things to all men.

The next problem is that of noise when you're not playing.  Very small input signal means that gain ramps up to max and any noise out of the pedals ahead of your compressor get amplified to annoying levels.  Some kind of gating circuit might be in order to clean this up?  Or just live with it?

Bass frequencies tend to swamp out treble on a sustained chord... the thicker strings, having more mass, vibrate for longer.  These all-pass, simple circuits don't care where the strongest signal is coming from - they just obey their amplification "law" implicitly.  Most designs bleed away some bass frequencies before they're amplified to get around this.  There are a great many designs out there, costing a great many $$$$ that process the various frequency bands differently, so you can see why they cost so much... even if you split the signal into 2 bands, you just mandated 2 separate compressor circuits, along with a whole bunch of associated circuitry to ensure that the final mix-down at the output doesn't have any unwanted "humps" in its frequency response.  Twice the number of compressors means twice the noise at the output... That's a very simplistic analysis, but you can see where it goes... money, and lots of it.

Next problem is that of attack time.  The Ross topology that I mentioned above reacts very fast indeed, with the result that you get the first few milliseconds of the pick strike and then the gain cuts back massively.  The result can be like someone hitting the strings with a teaspoon.  Horrible.  I suppose it might be possible to slow down the reaction time somewhat with a couple of resistors from the top of the 10µF cap to the collectors of Q3 and Q4 to slow down its discharge rate... never tried it because I just thought of it.  Mind you, if it was that simple, someone would surely have done it by now.  Wouldn't they?  What most of the more expensive Ross "clones" do is to mix a bit of the original signal back in after the rest of the circuit has done its magic.  So, the initial strike of the strings sounds a lot more natural and swamps out that "spit" as the circuit reacts to the pick strike.  It works quite well, as it turns out.  An LED/LDR topology reacts more slowly, because it takes a finite time for the LDR to react to a sudden change in illumination.  Hence they sound much more "natural", "warm", "smooth" and various other epithets, depending on which booteek site you visit.  Doesn't make it any less true, though.  Similarly, the LDR takes time to adapt to being dark again, so you perhaps don't have to work quite so hard at recovery as you do in a Ross layout.  Given that I think photo-transistors will become the mechanism of choice in the next few years, and given that their reaction time is of the order of nano-seconds, versus a typical couple of hundred milli-seconds for an LDR, and you can see that people will probably have to work a lot harder at the Attack aspect than they have in the past.  Again, the Orange Squeezer takes a little while to get its act together in cutting back the gain, so that sounds very nice (if you can get the gain cross-over right for your guitar).

I hope that my musings have helped.  I think I got my stories straight but, if I've made any mistakes, one of the wiser heads will point it out.
...you fritter and waste the hours in an off-hand way...

armdnrdy

Excellent explanation! The ins and outs of the different compressor types on one page! Great job!
I just designed a new fuzz circuit! It almost sounds a little different than the last fifty fuzz circuits I designed! ;)

R O Tiree

Thanks, mate.  Compressors are my favourite.  Could you tell? ;D
...you fritter and waste the hours in an off-hand way...

Minion

And dont forget VCA"s , many rackmount and studio compressors use VCA"s like DBX compressors ..... There some pretty good VCA IC"s out there like those made by THAT corp ......

Cheers
Go to bed with itchy Bum , wake up with stinky finger !!

R O Tiree

Very true, Minion.  I just covered the 3 commonest methods that I've seen in stomp-boxes.
...you fritter and waste the hours in an off-hand way...

masinyourface

My mind is currently blown. Amazing explanation! Exactly what I was looking for!   ;D

midwayfair

RO, thank you for that. I'll be linking to that in the future, I'm sure. :D
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

R O Tiree

You're welcome, Mason.  If you want to know more, please ask.

And thanks, Jon - I know compressors are high up on your list of favourite circuits as well.
...you fritter and waste the hours in an off-hand way...

Mark Hammer

Thanks, buddy.  Saved me a heap of typing.  :icon_wink:

R O Tiree

No worries, Mark - I enjoyed doing it.  Anything wildly out of tune in that wall of text?

Also, do you have any thoughts on my wacky idea to slow down the Attack time of a Ross topology?  Putting a resistor from the top of the 10µF cap to each of the collectors of Q3 and Q4 would certainly reduce the current dribbling through those transistors to GND when the circuit is hit with a large input signal, but it might also lower the voltages at those collectors when they should be high sufficiently to mess up the response in other ways, or maybe keep them artificially high when they should be at their lowest... time to simulate, perhaps, before breadboarding.
...you fritter and waste the hours in an off-hand way...

merlinb

Quote from: R O Tiree on October 03, 2012, 09:25:00 PM
Also, do you have any thoughts on my wacky idea to slow down the Attack time of a Ross topology? 
It is easily done- there's even a diagram over at the other forum:

THE other FORUM.org/viewtopic.php?f=1&t=2086&p=186101&hilit=control#p186184

R O Tiree

Thanks for that, merlin.  I did search, honest... guess I used the wrong search string, eh?

It seems that breaking out the cap like that makes the 2 controls react to one another, according to the thread, so I ran a sim...



The input waveform is a sinewave, offset at +2.9VDC, to simulate the output from pin 6 of the OTA.  That's a reasonable bias compared with RL.  I switched the amplitude between 2mV and 2V, and then a sudden drop again to 2mV and took readings of the times taken to reach within 1V of steady state, then waited until the sim reached steady state before switching the other way and timing again.

You can see the extra resistors I added between the top of the 10µF cap and the collectors of Q3 and Q4.  (I've labelled them according to the vast majority of the schems out there).  I used a 27k resistor to GND and took readings of the steady-state current, simulating the current going in to pin 5 of the OTA (gain control pin).

Changing the values of those resistors up as far as 10k did not change the highest state of Q5E at all (tiny input signal).  Going from 2V down to 2mV, it always stabilised at 8.09V with a Q5 Ie of 300µA and it always took a shade over 2 seconds to get through 7.09V (1V less than steady state).  Again, that gels nicely with RL observations probing that pad on my 'scope.  So far, so good, then, as this has not introduced any change to the side-chain's behaviour.

Looking now at the results for the step jump from 2mV up to 2V.  At 10k/10k, it took ages for the voltage at Q5E to drop and it stabilised at over 1V, so there would still be appreciable current flowing into the gain control pin... unuseable, therefore, for what we're looking for, as we're losing the latter stages of the compression curve.

Here are the rest of the results for the lowest voltage at Q5E:

                         @ 4.7k/4.7k    @ 2k/2k    @ 1k/1k    @ 0/0
                                                              (no resistors, wire only)
Q5E drop time:               220ms        63ms       37ms       27ms
Q5 Ie:                         3µA         1nA        0A         0A
Q5 Ve                         82mV        27µV        0V         0V


It seems that a dual-gang 5k pot might be just the ticket, then.  In simulation, at least, it does not appear to affect the general behaviour of the side-chain until you get above 2k/2k, and even maxed out, the residual effect is very small indeed.

Time to breadboard it, but I've got another project on at the moment, which will take me well into next week.  Anyone want to try it and report back?
...you fritter and waste the hours in an off-hand way...

masinyourface

I've got another project at the moment too lol, I'm just thinking ahead for my next project really!!  ;D

What about a release control?

merlinb

Quote from: R O Tiree on October 04, 2012, 12:49:59 PM
Looking now at the results for the step jump from 2mV up to 2V.  At 10k/10k, it took ages for the voltage at Q5E to drop and it stabilised at over 1V, so there would still be appreciable current flowing into the gain control pin... unuseable, therefore, for what we're looking for, as we're losing the latter stages of the compression curve.

The version at the other forum doesn't alter the compression characteristic of the stock circuit. The attack can be set completely independently. Release is somewhat altered by the setting of the attack control, but since you would always have the attack much faster than the release, it's not really noticeable.

Your circuit alters the characteristics of the stock circuit, so you can't get as much maximum compression. A dual gang also seems over complicated to me, compared with the version on the other forum...?

Masinyourface: The version at the other forum has a release control too.

R O Tiree

I see your point... I was looking mainly at the small-signal response (max gain), which is unchanged, at least in sim.  Large-signal response is only mildly altered and, if anything, might make it slightly less "squished" (but only slightly).  You might even get less of that "hitting the strings with a teaspoon" thing.  Attack time is more than doubled at 2k/2k and I cannot think that 1nA at pin5 of the OTA is going to be noticeable with large input signals?  It might even be worth hard-wiring it at 1.8k/1.8k which would bring the steady-state voltage down to as near 0V as makes no difference; Q5 Ve <20 µV, Iabc < 1nA and it still more than doubles the Attack timing.  Recovery time looks to be completely unaffected and it's only the discharge time that changes... time to build it and see what it actually sounds like, I guess.

Many thanks for your analysis, though, because I was attracted to the max gain end of the spectrum, and, although I'd clocked the residual current, it seemed too small to worry about at the max compression end until you got above 2k/2k.  The Intersil datasheet stops all its graphs at Iabc = 100nA, for example. 
...you fritter and waste the hours in an off-hand way...

PRR

> It seems that a dual-gang 5k pot might be just the ticket, then.

? ? ? Only one resistor works at a time. Tie the collector resistors together, use one attack resistor.

Also: the series-string of attack and decay retricts your control range, as you describe. For the more-usual case of attack shorter than decay, you can re-order the resistors.

  • SUPPORTER