DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: Kipper4 on January 11, 2018, 07:32:37 AM

Title: Compressor questions
Post by: Kipper4 on January 11, 2018, 07:32:37 AM
Hey Guys

I know I could google it but you guys have a wealth of tacit knowledge that I might be able to understand more you explanations.

What's the difference between feedback and feed forward compressors?

Which ones are the best?
Just kidding...


Examples for comparaison might help.

Cheers
Rich
Title: Re: Compressor questions
Post by: EBK on January 11, 2018, 07:48:32 AM
(https://www.gearslutz.com/board/attachments/so-much-gear-so-little-time/120800d1241911741-compression-feedback-vs-feedforward-picture-1-1.jpg)
Title: Re: Compressor questions
Post by: anotherjim on January 11, 2018, 08:14:40 AM
Feedback closes the stable door after the horse has bolted.
Feedforward closes the door before the horse is stabled.
Title: Re: Compressor questions
Post by: Kipper4 on January 11, 2018, 08:47:55 AM
I need more horse power. :)
Title: Re: Compressor questions
Post by: Mark Hammer on January 11, 2018, 10:59:28 AM
Feedback is more typical of compressors and feedforward of limiters.

Think of feedback like two good friends, one of them better off and the other penniless.  The wealthier one gives the penniless one a chunk of money to help out, because the friend asked.  But now the wealthier one has less than the previously penniless one and asks for some help, which his buddy responds to.  Bit by bit, they both endup with exactly the same amount of money.

Feedback is used when the goal is to have a constant level.  The gain reduction is a function of the peaks in the signal, but since the gain reduction created by the feedback affects those peaks, there are fewer/lesser peaks to direct that gain reduction and a steady level is achieved.

Feedforward is analogous to the rich friend saying "Listen, when you run into difficulties, gimme a shout".  The rich friend occasionally bails out the poorer one when times get tough, but in between those times, keeps the remainder for himself, only stepping in when needed.

Feedforward affects identifiable peaks but has no bearing on the state of the overall incoming signal like feedback does.

Of course, as the literature for the SSM2166 conveys, if one sets the point whereby gain reduction is applied low enough (i.e., anything above this teensy tiny level), the audible consequences of feedforward and feedback are negligible.

Make sense now?
Title: Re: Compressor questions
Post by: bluebunny on January 11, 2018, 11:11:40 AM
Quote from: Mark Hammer on January 11, 2018, 10:59:28 AM
Make sense now?

Hang on...  Do we need to know whether Rich is rich?    ???                                      :icon_biggrin:
Title: Re: Compressor questions
Post by: Kipper4 on January 11, 2018, 11:30:41 AM
I'll reread after work.
Thanks.

Btw Rich by name. Poor by birth right.
Title: Re: Compressor questions
Post by: Kipper4 on January 11, 2018, 06:10:27 PM
Regarding the Dyna comp.
Schematic for reference.

(http://www.electrosmash.com/images/tech/mxr-dyna-comp/mxr-dyna-comp-schematic-parts.png)

This is how I call it.
Q2 is a concetina splitter feeding 2x out of phase envelope detectors.
But Q3 & Q4 resembles a current mirror with additional Timing cap C8.
RV1 being a CLR.
R13 the designers minimum CLR feeding Iabc.

Assuming I'm right.
What If one was to futz with R13.
maybe 10x bigger
  "       10x smaller.
I guess it would affect the release time of the cap right? how low or high could one go and feasably have a functioning effect.

Has anyone tried swapping the value of C8?

Thanks for helping educating me.

Rich




Title: Re: Compressor questions
Post by: Mark Hammer on January 11, 2018, 09:01:26 PM
R13 is what many manufacturers that include an "Attack" control replace with a 10k fixed resistor in series with a 150k pot.
Title: Re: Compressor questions
Post by: reddesert on January 11, 2018, 11:49:29 PM
Careful, there are two R13's in that schematic. The 27K is the minimum sensitivity, and I think Mark was referring to the 150K on the collector of Q3.

C8 is the integrator to get the envelope from the signal.
Title: Re: Compressor questions
Post by: Rob Strand on January 12, 2018, 12:19:21 AM
Feedback:
- The natural behaviour is 2:1.   You only get more than 2:1 if non-linearity is introduced into the rectifier.
  An example of strong non-linearity is the Dynacomp.
- The Attack time naturally different to the Release time.   Generally you can only (easily) make the Release to Attack
   ratio larger than the nature value.  Attack is made faster by feedback. 
   Understanding the dynamics is actually quite complicated but tends to be closer to what you want without doing much.
- The gain of the amplifier inside the feedback loop has a strong effect on threshold and the dynamics.

Feedforward:
- The natural behavior is infinite compression.  You get less than infinite by making the control voltage a weighting between the input magnitude + a constant.   When it's a constant you get 1:1.   There's other ways as well including non-linearity.
- The Attack and Release time are naturally the same.  To get asymmetrical time constants it must be done
  by force with different attack and release resistors (and some sort of diode.)
- It is easy to define the threshold.

In both cases the threshold must be done with some sort of dead-zone in the control voltage.

More variations are log detectors and all that.

See here,
http://www.experimentalistsanonymous.com/diy/Datasheets/SA571%20AN.pdf
http://www.rane.com/pdf/ranenotes/Dynamics_Processors.pdf
Title: Re: Compressor questions
Post by: rankot on January 12, 2018, 03:25:09 AM
Regarding Dynacomp - would it be better to connect output (C9) to Q2 base, not emitter?
Title: Re: Compressor questions
Post by: anotherjim on January 12, 2018, 05:01:11 AM
Quotewould it be better to connect output (C9) to Q2 base, not emitter?
OTA output is fairly weak current, not the low source impedance drive of an op-amp. It needs buffering to produce voltage drive. Note the included buffer parts in other OTA like LM13600.

Envelope is rather clever. Q3 & Q4 are doubling as charge pump (C6 & 7) feed diodes and mixers for an aggregate envelope  via R13/C8. Q5 is a follower buffering the envelope cap C8. RV1 & R13 (R17?!) turn the voltage into control current into Iabc.
Title: Re: Compressor questions
Post by: Mark Hammer on January 12, 2018, 08:10:55 AM
Quote from: reddesert on January 11, 2018, 11:49:29 PM
Careful, there are two R13's in that schematic. The 27K is the minimum sensitivity, and I think Mark was referring to the 150K on the collector of Q3.

C8 is the integrator to get the envelope from the signal.
You're right.  My attention was drawn to that part of the circuit diagram where I knew it would be located.  Never occurred to me to check the rest of the drawing, just in case there were other resistors using the same part number.  :icon_lol: :icon_rolleyes:
Title: Re: Compressor questions
Post by: duck_arse on January 12, 2018, 08:30:37 AM
Quote from: Kipper4 on January 11, 2018, 08:47:55 AM
I need more horse power. :)

you'd then need a stable genius to handle the extra.
Title: Re: Compressor questions
Post by: ElectricDruid on January 12, 2018, 08:43:45 AM
Just to repeat the warning about R13/27K. Don't mess with that one - it's the current limiting resistor for the Iabc input of the OTA, and if you reduce it and then turn the sensitivity up, you'll cook the poor old CA3080. And there aren't enough of those left in the world that we should be treating them so roughly!

Mess with the R13/150K by Q3 as much as you like.

Tom
Title: Re: Compressor questions
Post by: Mark Hammer on January 12, 2018, 10:46:26 AM
Quote from: ElectricDruid on January 12, 2018, 08:43:45 AM
Just to repeat the warning about R13/27K. Don't mess with that one - it's the current limiting resistor for the Iabc input of the OTA, and if you reduce it and then turn the sensitivity up, you'll cook the poor old CA3080. And there aren't enough of those left in the world that we should be treating them so roughly!

Mess with the R13/150K by Q3 as much as you like.

Tom
Damn straight!
Title: Re: Compressor questions
Post by: rankot on January 12, 2018, 11:28:55 AM
Quote from: anotherjim on January 12, 2018, 05:01:11 AM
OTA output is fairly weak current, not the low source impedance drive of an op-amp. It needs buffering to produce voltage drive. Note the included buffer parts in other OTA like LM13600.
Envelope is rather clever. Q3 & Q4 are doubling as charge pump (C6 & 7) feed diodes and mixers for an aggregate envelope  via R13/C8. Q5 is a follower buffering the envelope cap C8. RV1 & R13 (R17?!) turn the voltage into control current into Iabc.
I asked that because I've read about people experiencing distortion coming from bottom of the envelope detector. Wouldn't be better to add one more transistor parallel with Q2 to feed the output and make it unaffected with envelope detector?
Title: Re: Compressor questions
Post by: anotherjim on January 12, 2018, 11:44:29 AM
QuoteWouldn't be better to add one more transistor parallel with Q2 to feed the output and make it unaffected with envelope detector?
Probably. And it is is in principle a bad thing to load the phase splitter unequally - anything could be loading the final output. Somebody is going to use it plugged into a 10k line input sooner or later, not necessarily for guitar. Q2 emitter ought to be clean under most conditions...

...but, TBH, I find it hard to see what the clipping limits would be of a raw OTA "current" output and where that leaves the bias, and clip limit, of the following transistor. So it may be difficult to set up another transistor that's any better off than Q2.


Title: Re: Compressor questions
Post by: Kipper4 on January 12, 2018, 01:48:06 PM
Wow.
Thanks guys.

Some great stuff.
Thanks for the warning too. I know better than to mess with the 27k to Iabc.
Sorry about the poor choice of schematic. 2x R13.
Meantime if found the page it came from and it turns out Q3 Q4 are being used as switches to allow current to flow. End of bullet point 5.

Link
https://www.electrosmash.com/mxr-dyna-comp-analysis


I'm going to go reread some answers.

I'm sure I have a couple of ne570. Might have to hunt those down.

Choices choices.
Title: Re: Compressor questions
Post by: PRR on January 12, 2018, 02:10:29 PM
With perfect implementation and obvious computation, FF and FB are equivalent. Blesser said:

"If each of these functions exists and contains no singularities, then a compression system could be built using either the input, output, or both for controlling the gain. In practice, however, it is much easier to implement a feed-forward system for compression ratios less than one, and a feedback system for ratios greater than one."
Barry A. Blesser, IEEE Transactions On Audio And Electroacoustics Vol. AU-17, NO. 1 March 1969

Barry says your strum flattener is "easier" as FB. FWIW, nearly all our small limiters are FB.

When Barry says "easier", listen. I have been poking-at and building compressors for many decades, and I still don't have 5% the insight he had as a youngster. It is far "easier" to build an awful compressor than anything nice. So don't run down the path that a guru has marked "less easy".
(https://s18.postimg.org/s2w0bef1x/Blesser-_Mar1969-p2.gif) (https://postimg.org/image/s2w0bef1x/)
Title: Re: Compressor questions
Post by: rankot on January 12, 2018, 02:26:07 PM
Quote from: anotherjim on January 12, 2018, 11:44:29 AM
...but, TBH, I find it hard to see what the clipping limits would be of a raw OTA "current" output and where that leaves the bias, and clip limit, of the following transistor. So it may be difficult to set up another transistor that's any better off than Q2.
Datasheet says that maximum current output from CA3080 is 0.5mA. Would this work:
(http://i65.tinypic.com/rwukx3.jpg)
:icon_question:
Title: Re: Compressor questions
Post by: PRR on January 12, 2018, 04:00:11 PM
Rectifier loading on Q2....

Remember that we normally use short-attack long-decay. This means the rectifier "hits" only a small percent of the time, and only on sudden attacks. I do not believe this plan needs separate buffers for output and rectifier.
Title: Re: Compressor questions
Post by: Rob Strand on January 12, 2018, 04:48:04 PM
QuoteWith perfect implementation and obvious computation, FF and FB are equivalent.
If you stick with circuits you might find that hard to believe.   However, I've done my own studies and it is in fact true.  The result of wasting many hours of my life!  It's just tricky to find the "correct" non-linearity functions.  There's also some non-obvious things which have to be matched as well, like the effect of ripple from the rectifier - you have to put the non-linearity in the right places otherwise the ripple gets shaped incorrectly.     Some other trickier problems, which IIRC make it them different in practice, is the effect of linearizing networks around a JFET.  If you use a  transductance amps you don't have the issue.

[BTW: thanks for the link.]
Title: Re: Compressor questions
Post by: EBK on January 12, 2018, 06:03:22 PM
Random thought:  could one make a tremolo out of two aggressively fighting sluggish compressors (not a serious design proposal -- just an academic lark)?
Title: Re: Compressor questions
Post by: PRR on January 13, 2018, 01:56:23 AM
> hard to believe.

The corner cases can be tough. Consider a Noise Gate (Blesser's framework is general) which is feed-back. It watches its own output and turns-on if signal happens. Well, if it goes to infinite attenuation, it can never turn-on again. In the math you have a similar problem with feed-forward limiter trying to reach infinite attenuation (in practice you can't or never-need-to go there).

The other, and once killer, advantage of feedback is you can use any crappy thing for the control element. As long as the audio passes cleanly, the control law can be dog-legged real bad, and the NFB will mask it. With FF you need to know your control law quite well, and be able to pre-correct its kinks. The arrival of current-splitter or proportional-to-current VCAs made this much less messy. (There is a notorious FF tube limiter; it starts well, over-corrects, then runs out of correction by 13dB over.)
Title: Re: Compressor questions
Post by: samhay on January 13, 2018, 10:31:58 AM
>Rectifier loading on Q2....

I also vote for don't bother.

The phase splitter has unequal output impedance (emitter << collector), so you don't have a perfectly symmetrical full wave rectifier anyway. If anything, the loading might help even things out.
Title: Re: Compressor questions
Post by: electrosonic on January 13, 2018, 10:45:35 AM
So with feedback you can use a poorly characterized control element, which is probably why I don't know of any examples of a feed forward compressor that uses a vactrol. Unlike,  the Engineer's Thumb which uses a LM13700 (a proportional-to-current VCA), which allows a feed forward design.


Andrew.
Title: Re: Compressor questions
Post by: Mark Hammer on January 13, 2018, 11:31:14 AM
Nothing to do with the direction of feedback, but I recently noted a big improvement in audible envelope ripple when I replaced the silicon diode used for rectifying the envelope in the Univox compressor clone I made for myself, with a schottky diode.  The diode in that circuit is also doing its rectifying by shunting a half-cycle to ground just as we see in the Dynacomp circuit above.  If the forward voltage is too high, however, more of the unwanted half-cycle gets to pass through unscathed, resulting in the audible ripple.  I think it is worth trying an experiment in which the silicon diodes used in that form of full-wave rectifying are replaced with schottky types, or even germaniums.  In theory, it ought to work.
Title: Re: Compressor questions
Post by: ElectricDruid on January 13, 2018, 03:08:14 PM
+1 agree with Mark. I've improved an envelope detector by replacing silicon diodes with germaniums. Don't expect miracles, but you'll see an improvement.

I'd read about precision rectifiers, and even for those, germaniums are supposed to give the best results. Based on that information, I thought it was worth a try in what we can charitably call a "non-precision" rectifier circuit. It does help.

T.
Title: Re: Compressor questions
Post by: PRR on January 13, 2018, 04:08:09 PM
> feed forward compressor that uses a vactrol.

LA2a is primarily FB. But at high levels the sidechain tap ahead of the 2.7K resistor adds a bit of FF action as the FB action weakens.

Another problem is the slow action of an LDR. FB tends to quicken this. FF would want a matched LDR to linearize the action (essentially inside a FB loop) and more trickery (possibly FB) to speed the response.

But all this is mostly simple engineering and possible to "work the same" as FB or FF. The more interesting details start with timing, and go on and on and on from there.
Title: Re: Compressor questions
Post by: Rob Strand on January 14, 2018, 09:10:22 PM
QuoteLA2a is primarily FB.
I saw an interview with David Hungate saying the LA2a  is the only piece of equipment he would regret losing.

QuoteAnother problem is the slow action of an LDR. FB tends to quicken this. FF would want a matched LDR to linearize the action (essentially inside a FB loop) and more trickery (possibly FB) to speed the response.

I recommend reading this article.   (Keep in mind it doesn't addressing adding non-linearities to make FB = FF).

The article does a fairly good job of showing the differences between FB and FF.  It shows how the time constants are affected differently.  They are also linked to the compression ratio, so for a fixed set of time constants you will get a different perceived behaviour.  I've had the AES paper version for 25 to 30 years (which is formatted more nicely).

http://ajoliveira.com/ajoliveira/gen/pdf/preprints/paris88.pdf

One thing I find interesting is for guitar the dynacomp type FB is very popular. As you crank up the gain the threshold  decreases and it all feels kind of natural.  All the time constants seems to work.  Where as for bass and studio stuff both FF or FB seem to work well.

Title: Re: Compressor questions
Post by: Transmogrifox on January 14, 2018, 09:54:36 PM
Here's the result of some work I did in DSP land, which shows up the theory about a "feedback compressor can be made mathematically equivalent to a feed-forward compressor."

https://forum.bela.io/d/307-dynamic-range-compressor (https://forum.bela.io/d/307-dynamic-range-compressor)

In an analog circuit, getting things like an ideal e^x function and infinite gain make all of this stuff tricky to get better than the ears.  Every analog circuit has its own set of unique nonlinearities, and it's different with every OTA or every JFET.  As can be seen in the digital world, a linear feedback compressor has a continuously increasing ratio.  Something with an e^x gain function (like an OTA) approximates that of a soft-knee feed-forward compressor.

If you put the attack time into the feedback loop, it gets swamped by the gain, and doesn't really change in a material way.  This is typical of an analog circuit, so attack time isn't really something you can adjust in a feedback compressor unless you do something like my software equivalent, where you apply a feedback detector to a feed-forward gain stage -- really difficult to do accurately in an analog circuit.

Just some more food for thought...
Title: Re: Compressor questions
Post by: Rob Strand on January 14, 2018, 11:13:26 PM
QuoteIn an analog circuit, getting things like an ideal e^x function and infinite gain make all of this stuff tricky to get better than the ears.  Every analog circuit has its own set of unique nonlinearities, and it's different with every OTA or every JFET.  As can be seen in the digital world, a linear feedback compressor has a continuously increasing ratio.  Something with an e^x gain function (like an OTA) approximates that of a soft-knee feed-forward compressor.
Interestingly, I also used the exp(x) function to make FB = FF.   IMHO, the dynacomp detector is more or less an exp() function built by virtue of the exponential behaviour of the transistors.

One thing about FF is a look ahead detector is pretty darn easy.   For FB the idea of a look ahead is a bit twisted.
Title: Re: Compressor questions
Post by: Mark Hammer on January 15, 2018, 01:57:04 PM
Requires a flux capacitor.  I think Steve Daniels is trying to source them, but no luck so far.
Title: Re: Compressor questions
Post by: Rob Strand on January 15, 2018, 08:09:34 PM
QuoteRequires a flux capacitor.  I think Steve Daniels is trying to source them, but no luck so far.

The Materials:
(https://www.signalintegrityjournal.com/ext/resources/Blogs/Eric/Swiss-Cheese/Cheese.jpg)

The Theory:
(http://www.schoolphysics.co.uk/age16-19/Electricity%20and%20magnetism/Electrostatics/text/Dielectric_/images/1.png)

Prototypes:
(http://www.undercovercaterer.com/wp-content/uploads/2012/04/IMG_8705-400x278.jpg)

Commercial Products:
(https://media.rs-online.com/t_large/R5381310-01.jpg)

(https://i.ebayimg.com/images/g/pdcAAOSwxixaSxcK/s-l300.jpg)

(https://media.rs-online.com/t_large/F4070277-01.jpg)
Title: Re: Compressor questions
Post by: Eb7+9 on January 15, 2018, 09:15:47 PM
Quote from: Rob Strand on January 15, 2018, 08:09:34 PM

(https://www.signalintegrityjournal.com/ext/resources/Blogs/Eric/Swiss-Cheese/Cheese.jpg)


oddly enough, of everything written in this thread so far I would say this picture approximates closest to the truth of what a "correct" AGC topology should be doing to dynamically varying signals ... in the end, yielding a system with NO attack/release artifacts ... and, it can be implemented in either FF or FB "mode" // forest for the trees stuff ... TI already has a bunch of IC's with that stuff in it
Title: Re: Compressor questions
Post by: Rob Strand on January 15, 2018, 10:47:11 PM
Quoteforest for the trees stuff

forest for the trees cheese stuff
Title: Re: Compressor questions
Post by: EBK on January 16, 2018, 04:20:53 AM
Cheese can promote feedback compression, depending on the flora in your sidechain.
Title: Re: Compressor questions
Post by: Kipper4 on January 16, 2018, 01:12:05 PM
Nice. Some good insight there..


However there are always more questions.

Re the rolls ducker.

http://www.rolls.com/pdf/M_DU30b.pdf

How does it attenuate? Which parts. The J113s?

Would removing the mic pre have a significant effect? Or is it kinda tied to the other inputs?


Or is it a similar method to what PAIA did with theirs?

http://www.freeinfosociety.com/electronics/schemview.php?id=1092

I'm a long way from done wasting my time with some mods and stuff but I have much to learn.

Cheers
Rich
Title: Re: Compressor questions
Post by: Mark Hammer on January 16, 2018, 04:06:11 PM
Quote from: Kipper4 on January 16, 2018, 01:12:05 PM
Nice. Some good insight there..


However there are always more questions.

Re the rolls ducker.

http://www.rolls.com/pdf/M_DU30b.pdf

How does it attenuate? Which parts. The J113s?

Would removing the mic pre have a significant effect? Or is it kinda tied to the other inputs?


Or is it a similar method to what PAIA did with theirs?

http://www.freeinfosociety.com/electronics/schemview.php?id=1092

I'm a long way from done wasting my time with some mods and stuff but I have much to learn.

Cheers
Rich
The answer is Yes.  The J113s are used as voltage-controlled resistors to attenuate the line signal coming in from J2C and J2D.  One can either eliminate everything leading up to, and including R9, so that only J2A/J2B line in signal does the ducking, or use the mic pre-amp and eliminate the line in to have voice do the ducking of the other line-in signal.

Note that duckers work in sort of reverse from gates.  The signal coming in J2C/J2D passes through undisturbed, with Q1/Q2 maintaining maximum off resistance so that there is no attenuation.  When the announcer speaks into the mic, or some other line-level signal is fed in through J2A/J2B, Q1/Q2 are turned on and their drain-source resistance drops, attenuating that signal.  This is what normally allows an announcer to talk over music on the radio, and have the music come back up after they shut up.

The mic preamp is fed to the envelope-follower section comprised of U3A/3B, but also fed to P1, whose mono output is fed to both U2A/2B via R16/R17.  That is both line-ins are maintained in stereo, while the mic in is used in mon but output via both channels.
Title: Re: Compressor questions
Post by: Kipper4 on January 16, 2018, 05:44:23 PM
I had a feeling that it was something like that.
Thanks Mark.

Title: Re: Compressor questions
Post by: Kipper4 on January 20, 2018, 10:11:11 AM
Heres a theoretic redraw of the Paia Stereo Ducker (ducker only)

(https://i.imgur.com/3Zuge5U.png)
Title: Re: Compressor questions
Post by: Juan Wayne on January 20, 2018, 10:15:55 AM
Quote from: anotherjim on January 11, 2018, 08:14:40 AM
Feedback closes the stable door after the horse has bolted.
Feedforward closes the door before the horse is stabled.

If you're not already a teacher, you should be one. I could have used one like you back when I was studying. I got a shitty washing machine example. We all felt somewhat redeemed when the guy lost a tooth in class. That's how much we hated him.