THE ENGINEER'S THUMB... At last, a better compressor!  [documentation]

Original effects with schematics, layouts and instructions, freely contributed by members or found in publications. Cannot be used for commercial purposes without the consent of the owners of the copyright.
User avatar
merlinb
Solder Soldier
Information
Posts: 176
Joined: 18 Nov 2010, 17:39
Been thanked: 160 times

Post by merlinb »

For a long time I've felt guilty that my pedal board didn't include a compressor. Finally, after about a year of breadboarding, I have produced a circuit that can take on a Dynacomp and win, boasting:

Up to five times more headroom than a Dynacomp
Less noise than a Dynacomp
Same available sustain as a Dynacomp
Fewer parts than a Dynacomp
Cheaper than a Dynacomp
Feedforward side chain
Possibility for all five controls
Fits in 1590B
Millennium bypass

Despite its final simplicity, I went though just about every possible configuration of OTA while chasing acceptable performance. As you can see from the schem, the OTA is working as a current-controlled resistor in the feedback loop of an opamp. This reduces the contribution of OTA noise.

The input signal is also coupled directly to the side chain, which consists of a precision rectifier (U1b) and precision current source (U2a) that dumps more current into the OTA control pin as the audio signal gets larger.

The ratio control blends compressed and uncompressed signals, so its variable from zero to infinite ratio (limiting)! I actually built two versions of this, one with threshold the other with ratio, but I found that basically the same sounds obtain with either, depending on how you use them, so I will probably sell one of them.

More info, sound clip and PCB layouts can be found here: http://www.valvewizard.co.uk/engineersthumb2.html
I'm now working on a five-knob version with VU meter...
engineersthumbschem.jpg
engineersthumbvero.jpg
engineersthumb1.jpg
CIMG7128.jpg

User avatar
marshmellow
Cap Cooler
Information
Posts: 469
Joined: 16 Aug 2007, 07:31
Location: Germany
Has thanked: 20 times
Been thanked: 127 times

Post by marshmellow »

Great work and article! Did you try out paralleling the second OTA for lower noise?

User avatar
juanro
Cap Cooler
Information
Posts: 488
Joined: 01 Jun 2009, 17:07
Location: Argentina
Has thanked: 51 times
Been thanked: 117 times

Post by juanro »

Merlin, great work!
Just a note: Am I looking at it bad, or there's a problem with the connection of the protection leds? Shouldn't they be connected from input to +4,5 instead of ground?

Regards,
Juanro
La única verdad es la realidad.

User avatar
merlinb
Solder Soldier
Information
Posts: 176
Joined: 18 Nov 2010, 17:39
Been thanked: 160 times

Post by merlinb »

juanro wrote:Merlin, great work!
Just a note: Am I looking at it bad, or there's a problem with the connection of the protection leds?
Well spotted! Drawing error- now fixed.

User avatar
HEAD
Resistor Ronker
Information
Posts: 442
Joined: 16 Dec 2008, 00:13
Location: Leipzig, Germany
Has thanked: 24 times
Been thanked: 49 times

Post by HEAD »

Did try it - so I must say I'm not convinced. The compression ratio between loud and low signals is way off. Loud signals get attenuated to much and low signals get amplified to much. There's also something wrong with the attack. It takes to long to recover from loud signals, so low signals tend to fade in hearable. So without any further analyse I would say the attack is too slow for guitar purposes.

User avatar
IvIark
Tube Twister
Information
Posts: 2235
Joined: 01 Jan 2008, 23:59
Location: Manchester UK
Has thanked: 562 times
Been thanked: 586 times
Contact:

Post by IvIark »

With it only using one side of the LM13700, would there be any issues in using a CA3080 or LM3080 instead? I've got all of them in my stash but am just thinking about doing a smaller layout.
"If anyone is a 'genius' for putting jacks in such a pedal in the only spot where they could physically fit, then I assume I too am a genius for correctly inserting my legs into my pants this morning." - candletears7 - TGP

User avatar
merlinb
Solder Soldier
Information
Posts: 176
Joined: 18 Nov 2010, 17:39
Been thanked: 160 times

Post by merlinb »

So without any further analyse I would say the attack is too slow for guitar purposes.
The attack is less than 10ms, which is as fast as you ever need in a guitar compressor- too fast to hear! Attack and release are both fully tweakable of course. Sounds like you might want a faster release (I'm using 470k release resistor now).
The compression ratio between loud and low signals is way off.
That's kinda what the ratio control is for... :lol:
IvIark wrote:With it only using one side of the LM13700, would there be any issues in using a CA3080 or LM3080 instead?
I have tried it with a CA3080. It works, but is less stable at high input levels. Not really a problem if you use the protection LEDs though.

User avatar
HEAD
Resistor Ronker
Information
Posts: 442
Joined: 16 Dec 2008, 00:13
Location: Leipzig, Germany
Has thanked: 24 times
Been thanked: 49 times

Post by HEAD »

You're it's the release time that doesn't fit my taste. For the compression ratio: I know attenuating loud signals and amplifying low signals is what a compressor does but this one here is too extreme for my taste. Not very musicaly - I've build several compressors which were in that case more suitable (mictesteser cheap comp, another optical comp by mictester, dod 280 and a ibanez cp 9) and all of them did that job better, though some of them had other withdraws I didn't like.
What I like about your design is that it is indeed very clean with a lot of headroom and that it colours the tone in a good way - not too muddy, not to sparkly.

User avatar
mictester
Old Solderhand
Information
Posts: 2923
Joined: 11 Sep 2008, 20:29
my favorite amplifier: Mesa Boogie, Roost Sessionmaster, AC30
Completed builds: Hundreds! Mostly originals, a few clones and lots of modifications.
Location: Somewhat closer to Amsterdam than before!
Has thanked: 32 times
Been thanked: 844 times
Contact:

Post by mictester »

:roll: "There's nothing new under the sun".... :roll:

The use of the transconductance amplifier as a voltage variable resistor isn't really the way to go, and gives a very non-linear control law. It's better (as I did) to introduce the OTA into the negative feedback path of the op-amp, and as the OTA gain increases, the distortion and noise it introduces are reduced by the cancellation effect of the negative feedback.


Small hint to the initiated - look at "A Voltage-Controlled Low-Distortion Audio Gain Cell" in the JAES in 1975!

The circuit as shown will exhibit a lot of overshoot, cutting a lot of the signal out in the first part of the recovery after the initial peak of each note. This will sound rather peculiar.

It's better to increase the attack time, and reduce the decay time. It'll sound more "natural", but I'm sure the "Valve Wizard" already knows that and incorporates the correct time constants into the ones he builds.
"Why is it humming?" "Because it doesn't know the words!"

User avatar
HEAD
Resistor Ronker
Information
Posts: 442
Joined: 16 Dec 2008, 00:13
Location: Leipzig, Germany
Has thanked: 24 times
Been thanked: 49 times

Post by HEAD »

mictester wrote: :roll: "There's nothing new under the sun".... :roll:

Small hint to the initiated - look at "A Voltage-Controlled Low-Distortion Audio Gain Cell" in the JAES in 1975!

The circuit as shown will exhibit a lot of overshoot, cutting a lot of the signal out in the first part of the recovery after the initial peak of each note. This will sound rather peculiar.

It's better to increase the attack time, and reduce the decay time. It'll sound more "natural", but I'm sure the "Valve Wizard" already knows that and incorporates the correct time constants into the ones he builds.

Hi Chris,

that's exactly what I have experienced with this circuit - though I wasn't able to express as professional as you did. :wink: Due to the points mentioned by you I had the feeling that it sounds "unnatural". Not as nice as e. g. your realy cheap compressor - which also has its withdraws though.
But don't get me wrong - I always appreciate such diy efforts and the will to share it with others. I know that merlin did already some quite good diy ciruits (e.g. the "u-boat"). :thumbsup

User avatar
merlinb
Solder Soldier
Information
Posts: 176
Joined: 18 Nov 2010, 17:39
Been thanked: 160 times

Post by merlinb »

mictester wrote:Almost a nice idea, but unfortunately there's rather a lot of "prior art"
Unfortunately for what? Using an OTA in a feedback loop is nothing new... my circuit is just one of many, but simpler than most. Hopefully you won't try to plagiarise this one from me.
The circuit as shown will exhibit a lot of overshoot, cutting a lot of the signal out in the first part of the recovery after the initial peak of each note. This will sound rather peculiar.
It's better to increase the attack time, and reduce the decay time. It'll sound more "natural", but I'm sure the "Valve Wizard" already knows that and incorporates the correct time constants into the ones he builds.
I assume you're referring to the MXR circuit which uses a feedback sidechain. Feedback sidechains always exhibit overshoot to some degree, because of the inherent delay in the loop, though contrary to what you suggest increasing the attack time will make this worse/more noticeable.

This was one of the things I wanted to avoid in my design, which is why I used the feedforward topology; there are no limitations to attack time with feedforward.

User avatar
mictester
Old Solderhand
Information
Posts: 2923
Joined: 11 Sep 2008, 20:29
my favorite amplifier: Mesa Boogie, Roost Sessionmaster, AC30
Completed builds: Hundreds! Mostly originals, a few clones and lots of modifications.
Location: Somewhat closer to Amsterdam than before!
Has thanked: 32 times
Been thanked: 844 times
Contact:

Post by mictester »

You evidently have little grasp of the principles involved in sidechains in compressors. You really should consult the original material. There are many limitations with feedforward compressors that don't delay the audio - the worst of them being overshoot. This is particularly so with a crude rectifier sidechain like the one you propose here. If you need a loan of the textbook that covers these principles, I'll happily send you the relevant extracts.

As for plagiarism - please look at the circuits I posted earlier. They all have two things in common - the OTA-controlled gain is just like yours (strangely enough) though you've got the values rather wrong around the 13700, and those designs (from almost 30 years ago) originated on my bench...

Reinventing the wheel springs to mind....
"Why is it humming?" "Because it doesn't know the words!"

User avatar
teleK
Breadboard Brother
Information
Posts: 70
Joined: 24 Aug 2010, 02:59
my favorite amplifier: 1973 Kasino Bass Club
Has thanked: 17 times
Been thanked: 3 times

Post by teleK »

You two need to learn to get along better :roll:
Although I guess you could be doing much worse.

User avatar
Greg
Old Solderhand
Information
Posts: 3047
Joined: 03 Nov 2007, 09:35
my favorite amplifier: Tophat Emplexador & Supreme 16.
Completed builds: LOTS..
Location: Australia
Has thanked: 65 times
Been thanked: 164 times

Post by Greg »

Professional rivalry between 2 clever Engineers.

We could do worse.. :)

Thanks to both of you for all the things you share here.
culturejam wrote: We are equal opportunity exposure artists.

User avatar
mictester
Old Solderhand
Information
Posts: 2923
Joined: 11 Sep 2008, 20:29
my favorite amplifier: Mesa Boogie, Roost Sessionmaster, AC30
Completed builds: Hundreds! Mostly originals, a few clones and lots of modifications.
Location: Somewhat closer to Amsterdam than before!
Has thanked: 32 times
Been thanked: 844 times
Contact:

Post by mictester »

timbo_93631 wrote:You do know that Merlin is a wizard, right?
That's all right, then. He can roundly abuse me in every thread I write in.

It actually doesn't matter to me at all, but I certainly object to his description of "a better compressor" because without a lot more work, this one is actually worse than the usual Dynacomp circuit:

The sidechain has been simplified to the point that it's going to overshoot wildly all the time (you can clearly hear that in his demo), and the range of attenuation available from the gain cell (as drawn) is going to be quite poor compared to a more conventional circuit. The bias values selected for the OTA also are rather less than optimal (that's being kind), and the attenuation curve will be anything but linear. If the attenuation followed a nice log or exponential curve or was ruler straight, you'd have a chance of using it, but as drawn, it's going to be rather unpredictable.

A much more stable approach is taken in the Morley / Telray circuit, which takes the level-sensing rectifier feed from the output of the voltage-controlled gain cell. This approach is also used in the MXR circuits, and you'll find it in most variants of the Black Finger from Electro Harmonix. You might think that this would suggest to a "designer" that this might be a more sensible approach, but some folks are determined to plough their own furrow....

Feedforward limiters are widely used in the broadcast industry - indeed I've designed a few for that purpose. They all have one thing in common - the audio path is delayed for a period that is equal to (or sometimes slightly greater than) the attack time of the sidechain. The consequence is that the limiter "sees the peaks coming" and pulls the gain down as the peak arrives, without any "pumping" or "breathing" effects. Indeed this topology can be so good that it isn't necessary to include the usual overmodulation protection clippers that are frequently included in broadcast audio chains, thereby eliminating the possibility of broadcasting nasty fuzz effects!

My first feedforward designs pre-date the availability of BBD ICs, so use op-amp based phase-shift delay circuits to give just enough delay to allow for the attack time of the (very fast) sidechain. The phase delays are staggered across the audio bandwidth to give a similar delay time at all frequencies (the circuits are effectively "all-pass" filters similar to those used in phasers), and the big trick was to minimise the number of types of component required in the circuit to keep costs sane. As I recall, I used 1% accuracy 10n capacitors, which we had copious quantities of, and hand-selected then on an impedance bridge for <0.2% accuracy! The op-amps in those days were quite noisy by modern standards, so pre-emphasis and de-emphasis were used to mitigate this, but even a 741 is reasonably quiet if you don't ask for much gain!

A useful side-effect of the circuit I developed for my "Through Zero Flanger" was a simple use of an MN3007 to give a short delay suitable for a feedforward limiter. I'll put it up in another thread when I have time to draw a neatened version. I also use both sides of the 13700 for cascaded gain cells, to give a greater range of control, and introduced some measure of low-level expansion to prevent amplifying handling noise at high gain when the instrument isn't being played - a kind of noise gate if you like, but with a very gentle switching characteristic, so that its operation is virtually inaudible. This compressor is designed to be used as the first device in an effects chain, and there is a DC output representation of the guitar envelope taken off the input to allow control of auto-wah, auto-tempo-detect, and other amplitude-controlled effects. The delay is so short that it's imperceptible, but completely eliminates overshoot and "breathing" problems. It really is "a better compressor" !!
"Why is it humming?" "Because it doesn't know the words!"

User avatar
merlinb
Solder Soldier
Information
Posts: 176
Joined: 18 Nov 2010, 17:39
Been thanked: 160 times

Post by merlinb »

mictester wrote: You really should consult the original material. If you need a loan of the textbook that covers these principles, I'll happily send you the relevant extracts.
Please do- I would like to see the original material. I am not sure what material you are referring to- is there really a single soure of information dedicated to compressors?
You evidently have little grasp of the principles involved in sidechains in compressors. There are many limitations with feedforward compressors that don't delay the audio - the worst of them being overshoot.
I'm afriad it is you who have the poor grasp. If you do not have feedback then you cannot possibly have any overshoot (assuming no resonant circuits, which are not an issue here)- that is the whole point of a feedforward system. It is only with feedback that the poles of the system become complex and damping can be less than 1. Overshoot and breathing are phenomena associated with FEEDBACK compressors. You seem to have this back to front.
They all have two things in common - the OTA-controlled gain is just like yours (strangely enough)
I never said I invented the whole concept; such a claim would obviously be preposterous. It is simply a new circuit.
You've got the values rather wrong around the 13700,
What do you mean 'wrong'? Is there only one set of allowable components to use with an OTA? Please tell me what the right values should be (my circuit is not identical to the ones you posted, remember).
Reinventing the wheel springs to mind....
My wheel is simpler and cheaper than the ones you posted. It is also feedforward, so it is not strictly the same wheel...
the range of attenuation available from the gain cell (as drawn) is going to be quite poor compared to a more conventional circuit...and the attenuation curve will be anything but linear.
If you took the time to look at the compression curves you will see that the range is extremely wide, and linear! All the way from unity gain to limiting...
Image
A much more stable approach is taken in the Morley / Telray circuit, which takes the level-sensing rectifier feed from the output of the voltage-controlled gain cell. This approach is also used in the MXR circuits, and you'll find it in most variants of the Black Finger from Electro Harmonix. You might think that this would suggest to a "designer" that this might be a more sensible approach, but some folks are determined to plough their own furrow....
If you took the time to read the webpage you would see that I addressed this. Most compressors are indeed feedback based, as it is easier to acheive a linear response this way. BUT it suffers overshoot, which is why feedforward is preferred, and why I used it. You can acheive linear response with feedforward too of course (as my circuit does), it's just more tricky.
They all have one thing in common - the audio path is delayed for a period that is equal to (or sometimes slightly greater than) the attack time of the sidechain.
Broadcast equipment cannot be allowed to clip even for a single transient, so delaying the audio makes sense. Broadcast compressors are used to protect equipment from overload, they are not used for the same reasons as a musician would uses them. With electric guitar and other source material the attack can be any length you like, depending only on the effect you want to acheive. For maximum sustain you want the attack time to be less than 10ms so that the attack transisent is not audible (human ears can't resolve events that fast), which is how I set the circuit up. But it can be easily extended by changing one resistor.

I described it as a 'better compressor' only compared with most other popular DIY projects, not compared with every compressor ever made (I think that was pretty obvious??). My compressor offers as much compression as any other DIY guitar circuit and more, but, which is more, every single aspect (threshold, ratio, attack, decay) are easily tweakable with only changes to resistor values. Most other DIY projects tend to be very inflexible in this regard- one trick ponies as it were. My circuit also uses jellybean parts instead of the expensive CA3080, and sqeezes a lot of performance from very few parts.

User avatar
mictester
Old Solderhand
Information
Posts: 2923
Joined: 11 Sep 2008, 20:29
my favorite amplifier: Mesa Boogie, Roost Sessionmaster, AC30
Completed builds: Hundreds! Mostly originals, a few clones and lots of modifications.
Location: Somewhat closer to Amsterdam than before!
Has thanked: 32 times
Been thanked: 844 times
Contact:

Post by mictester »

Unfortunately, I don't (usually) have the time to go through all the web references in every posting on this forum, so I didn't read your web page. Sorry.

I'll lash together your gain cell circuit on the breadboard later, and see if it really is as linear as you claim. If it is, I'll stand corrected! however, looking at the circuit, you're surely going to get some kind of reciprocal curve.... Hmmm....

You misunderstand the issues with feedforward sidechains! The fundamental problem is the attack time. If you try to make your attack time very short, there will be big current flows in the sidechain, and the DC envelope representation will always lag behind that actual audio (this is true of either feedback or feedforward). The only way you can get a compressor to have a realistic envelope detector is to use a delay line of some sort.

You're right about broadcasters being really anal about overmodulation, but the same issues apply in music, though with less catastrophic results when the levels go "over". I've designed "front end" stages for digital effects. These have to work properly, or you get some really interesting (but not at all musical) digital distortion artefacts. There is no way to get any kind of "real time" sidechain to react fast enough to handle transients. Every plucked note on a guitar starts with a (relatively) big transient!

I'll be interested to try out your circuit - just for amusement, I'll try one. I'll also try to tweak the sidechain into something that works musically, and I'll post the results here. If this can be made into a musically useful effect - I've said it before - I'll learn from ANYONE!
"Why is it humming?" "Because it doesn't know the words!"

User avatar
merlinb
Solder Soldier
Information
Posts: 176
Joined: 18 Nov 2010, 17:39
Been thanked: 160 times

Post by merlinb »

mictester wrote:The only way you can get a compressor to have a realistic envelope detector is to use a delay line of some sort.
There is no way to get any kind of "real time" sidechain to react fast enough to handle transients. Every plucked note on a guitar starts with a (relatively) big transient!
But then essentially all guitar compressors have this same 'problem'. None use delay paths. In fact, many guitarists go to the trouble of adding an attack knob so they can hear more of the transients! So it seems to me that this is not a 'problem' at all, it is expected behaviour for any guitar compressor (certainly that's what I expect a compressor to do). Quite different from broadcasting applications.

As I said earlier, as long as the attack time can be made less than 10ms the transients that do get through will be too short to hear anyway- they'll just get clipped in the amplifier like anything else. From the guitarist's perspective there is no useful difference between zero attack time (that you seem to think is so impirtant) and <10ms attack time (that quite simple circuit's can provide).

Any equpiment that does have important headroom requirements will have its own protection circuitry already built in. e.g., we're not expected to buy a separate limiter before we can safely use a digital pedal!

User avatar
uncleboko
Cap Cooler
Information
Posts: 509
Joined: 25 Mar 2008, 20:19
Has thanked: 58 times
Been thanked: 41 times

Post by uncleboko »

mictester wrote: You misunderstand the issues with feedforward sidechains! The fundamental problem is the attack time. If you try to make your attack time very short, there will be big current flows in the sidechain, and the DC envelope representation will always lag behind that actual audio (this is true of either feedback or feedforward). The only way you can get a compressor to have a realistic envelope detector is to use a delay line of some sort.
Indeed, there was some interesting text covering this very point if I remember in an Alan Bradford design published in Home & Studio Recording back around 1988 - back when I permanently had electronics spread out on my table! I'll see if I can dig it out.

I can only find the Compressor article at the moment, (and my printer/scanner is not talking to my PC for some reason this afternoon), which states - "C11 is a reservoir capacitor which provides a generous supply of current into the side chain. In this way fast attack times of the order of 50us can be achieved.

User avatar
mictester
Old Solderhand
Information
Posts: 2923
Joined: 11 Sep 2008, 20:29
my favorite amplifier: Mesa Boogie, Roost Sessionmaster, AC30
Completed builds: Hundreds! Mostly originals, a few clones and lots of modifications.
Location: Somewhat closer to Amsterdam than before!
Has thanked: 32 times
Been thanked: 844 times
Contact:

Post by mictester »

If "Merlin" can be civil, I'll happily listen to him. If he has something that can contribute to my fund of knowledge, I'll gratefully accept it. I would hope that he has a similarly open-minded attitude, we can find some common ground, and make some advances in this rather bizarre mixture of electronics and art, theory and myth!
"Why is it humming?" "Because it doesn't know the words!"

Post Reply