Envelope detector causing distortion in audio signal. Any help?

Started by changes, June 09, 2016, 01:54:14 AM

Previous topic - Next topic

changes

Hi guys
I've tried building a compressor using the envelope circuit from Doctor Quack
http://www.generalguitargadgets.com/effects-projects/filters-envelope/dr-quack-ehx-doctor-q/
controlling a photofet instead of a BJT. While the circuit does what is supposed to do i get an ugly distortion when using a guitar with high output pickups. The distortion goes away when i turn the sensitivity down. I tried replacing the 2.2M resistor with 1M but with almost no change at all.

Any thoughts are welcome
CHANGES

Keppy

If you want good advice, please post your schematic. Without that, we're just guessing.
"Electrons go where I tell them to go." - wavley

changes

I haven't made any schematic yet but i used exactly the envelope on this one
CHANGES

TejfolvonDanone

Without the schematics this is my guess:
You might just overdrive the photofet. Is the distortion present at the input of the envelope detector?
I have a Phase 90 which has got JFETs as voltage controlled resistors to create the phasing effect. With my active pickups and a strong strum i could easily get some distortion out of it. Which was caused by the JFETs.
...and have a marvelous day.

Mark Hammer

People regularly report various kinds of "distortion" in sidechain-based effects.  Sometimes it IS actual distortion of the signal path, but many other times it is really envelope ripple.  We may think that an envelope extractor magically transforms our average signal level into some type of pure battery-like DC.  But it doesn't.

Ordinarily, there is a tradeoff between responsiveness of an envelope extractor and its susceptibility to ripple.  If it can react quickly, then any "jiggling" in the envelope as the string dies out will be more apparent.  One can smooth out the envelope by a variety of means, but that generally results in a sluggish response to what you play.

Ripple rejection can also be  managed by what is used as the control element.  One of the nice things about photocells is that they generally don't respond super-fast.  They essentially "ignore" quick fluctuations in the envelope voltage; much moreso than transistors or OTAs would.

Why does ripple sound like distortion?  Because the envelope may be causing fluctuations in whatever parameter is being controlled.  So, the envelope ripple in the Dr. Quack (especially as the note decays...which is NOT smooth) can produce "micro-filter-sweeps" at rates in the audio range.  Imagine that the sweep of the filter were being controlled by a noise generator operating between 200 and 2000hz.  Just constant buzzing little filter sweeps.  To our ears it would sound very much like distortion.  Same thing with limiters, compressors, and gates that can be adjusting the level by small amounts, very quickly.

I find that, for some devices, the best cure is to simply get in and get out quickly.  So, a quick decay/release lets you avoid the ripple that seems to be much greater later on in the decay of strings.  Another "cure" is to use full-wave, rather than half-wave rectification (the DQ uses half-wave).  This not only doubles the speed/rate of the ripple such that it is not as audible, but also allows for smoothing out the envelope without necessitating annoyingly long decay/release times.  Finally, if you can use a photocell, that's helpful too.

changes

Quote from: TejfolvonDanone on June 09, 2016, 04:29:53 AM
Without the schematics this is my guess:
You might just overdrive the photofet. Is the distortion present at the input of the envelope detector?
I have a Phase 90 which has got JFETs as voltage controlled resistors to create the phasing effect. With my active pickups and a strong strum i could easily get some distortion out of it. Which was caused by the JFETs.

I thought about that and lowered sensitivity and range as in the dr quack schem.
It did lower distortion but it did not go away 100%
CHANGES

Transmogrifox

My guess is TejfolvonDanone has identified what you're hearing because it seems to be related to high output pickups.

A way to test this theory is to attenuate the signal on the front-end, then give a boost amplification on the output to make up the input attenuation.  This is a relatively common practice for OTA circuits because high drive signals will cause distortion.

What Mark is talking about may be exacerbating the problem so you may need to handle both causes for distortion.  A full-wave rectifier will be cleaner sounding, but there are decent guitar FX compressors out there using 1/2 wave rectification (Bearhug compressor is one) so it seems this would be ok.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

Transmogrifox

Quote from: changes on June 09, 2016, 12:43:29 PM
I thought about that and lowered sensitivity and range as in the dr quack schem.
It did lower distortion but it did not go away 100%

Start more extreme like a factor of 10.  10:1 resistor divider on the input, and then a 10x booster on the output.

The thing is you still need to drive the envelope detector at about the same input level so messing with sensitivity and range aren't really touching what you need to touch.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

changes

Quote from: Mark Hammer on June 09, 2016, 09:08:02 AM
People regularly report various kinds of "distortion" in sidechain-based effects.  Sometimes it IS actual distortion of the signal path, but many other times it is really envelope ripple.  We may think that an envelope extractor magically transforms our average signal level into some type of pure battery-like DC.  But it doesn't.

Ordinarily, there is a tradeoff between responsiveness of an envelope extractor and its susceptibility to ripple.  If it can react quickly, then any "jiggling" in the envelope as the string dies out will be more apparent.  One can smooth out the envelope by a variety of means, but that generally results in a sluggish response to what you play.

Ripple rejection can also be  managed by what is used as the control element.  One of the nice things about photocells is that they generally don't respond super-fast.  They essentially "ignore" quick fluctuations in the envelope voltage; much moreso than transistors or OTAs would.

Why does ripple sound like distortion?  Because the envelope may be causing fluctuations in whatever parameter is being controlled.  So, the envelope ripple in the Dr. Quack (especially as the note decays...which is NOT smooth) can produce "micro-filter-sweeps" at rates in the audio range.  Imagine that the sweep of the filter were being controlled by a noise generator operating between 200 and 2000hz.  Just constant buzzing little filter sweeps.  To our ears it would sound very much like distortion.  Same thing with limiters, compressors, and gates that can be adjusting the level by small amounts, very quickly.

I find that, for some devices, the best cure is to simply get in and get out quickly.  So, a quick decay/release lets you avoid the ripple that seems to be much greater later on in the decay of strings.  Another "cure" is to use full-wave, rather than half-wave rectification (the DQ uses half-wave).  This not only doubles the speed/rate of the ripple such that it is not as audible, but also allows for smoothing out the envelope without necessitating annoyingly long decay/release times.  Finally, if you can use a photocell, that's helpful too.

Thank you Mark.
I thought that halfwave rectification could be an issue...
also tried a photocell but i seem to prefer the faster attack and release of the photofet
Is there any "easy" fullwave rectified envelope detector that could be built with a standard dual opamp?
CHANGES

changes

Quote from: Transmogrifox on June 09, 2016, 12:44:43 PM
Quote from: changes on June 09, 2016, 12:43:29 PM
I thought about that and lowered sensitivity and range as in the dr quack schem.
It did lower distortion but it did not go away 100%

Start more extreme like a factor of 10.  10:1 resistor divider on the input, and then a 10x booster on the output.

The thing is you still need to drive the envelope detector at about the same input level so messing with sensitivity and range aren't really touching what you need to touch.

Thank you for the suggestion

if I set the sensitivity on the lowest settings and crank the range knob would that do the job?
CHANGES

midwayfair

You didn't make it clear if you had the circuit working properly before making a modification.

Use a BJT instead of the photoFET.

Is the distortion still there? Then maybe it really is the detector.

I'm willing to bet the distortion goes away, though. This isn't exactly an uncommon circuit.
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!

Mark Hammer

Quote from: changes on June 09, 2016, 01:09:43 PM
Quote from: Mark Hammer on June 09, 2016, 09:08:02 AM
People regularly report various kinds of "distortion" in sidechain-based effects.  Sometimes it IS actual distortion of the signal path, but many other times it is really envelope ripple.  We may think that an envelope extractor magically transforms our average signal level into some type of pure battery-like DC.  But it doesn't.

Ordinarily, there is a tradeoff between responsiveness of an envelope extractor and its susceptibility to ripple.  If it can react quickly, then any "jiggling" in the envelope as the string dies out will be more apparent.  One can smooth out the envelope by a variety of means, but that generally results in a sluggish response to what you play.

Ripple rejection can also be  managed by what is used as the control element.  One of the nice things about photocells is that they generally don't respond super-fast.  They essentially "ignore" quick fluctuations in the envelope voltage; much moreso than transistors or OTAs would.

Why does ripple sound like distortion?  Because the envelope may be causing fluctuations in whatever parameter is being controlled.  So, the envelope ripple in the Dr. Quack (especially as the note decays...which is NOT smooth) can produce "micro-filter-sweeps" at rates in the audio range.  Imagine that the sweep of the filter were being controlled by a noise generator operating between 200 and 2000hz.  Just constant buzzing little filter sweeps.  To our ears it would sound very much like distortion.  Same thing with limiters, compressors, and gates that can be adjusting the level by small amounts, very quickly.

I find that, for some devices, the best cure is to simply get in and get out quickly.  So, a quick decay/release lets you avoid the ripple that seems to be much greater later on in the decay of strings.  Another "cure" is to use full-wave, rather than half-wave rectification (the DQ uses half-wave).  This not only doubles the speed/rate of the ripple such that it is not as audible, but also allows for smoothing out the envelope without necessitating annoyingly long decay/release times.  Finally, if you can use a photocell, that's helpful too.

Thank you Mark.
I thought that halfwave rectification could be an issue...
also tried a photocell but i seem to prefer the faster attack and release of the photofet
Is there any "easy" fullwave rectified envelope detector that could be built with a standard dual opamp?

I don't want to misconvey that this IS the issue.  I just want you to consider that it might be an issue, and one that folks can easily overlook because it can sound for all the world just like clipping.

I first learned about this in an old issue of Modern Recording in the letters to the magazine that followed Jon Gaines' Noise Gate project article.  Jon was quick to note that the chatter some people were reporting as "distortion" was really envelope ripple.

One of the things we often don't notice as our strings age is that they produce "beats".  Perceptually, we tend not to hear them, because we mentally impose pitch constancy.  But they can produce lots of envelope ripple that results in annoying micro-sweeps.

Transmogrifox

Quote from: changes on June 09, 2016, 01:58:25 PM
Quote from: Transmogrifox on June 09, 2016, 12:44:43 PM
Quote from: changes on June 09, 2016, 12:43:29 PM
I thought about that and lowered sensitivity and range as in the dr quack schem.
It did lower distortion but it did not go away 100%

Start more extreme like a factor of 10.  10:1 resistor divider on the input, and then a 10x booster on the output.

The thing is you still need to drive the envelope detector at about the same input level so messing with sensitivity and range aren't really touching what you need to touch.

Thank you for the suggestion

if I set the sensitivity on the lowest settings and crank the range knob would that do the job?
No, that's not the same thing as making the signal going into the amplification stage smaller.  We're talking about the signal from the audio path driving the FET nonlinear.  It only works as a resistor at low signal levels, after that it's more like something you would use to make an overdrive.  Changing how the optical "gate" isn't going to tell you much about it.  A really simply test would be to roll back the volume knob on your guitar and crank up your amp.  Then you have to crank up sensitivity to compensate (to get to the same amount of compression).

Without a schematic of how you're using this like a compressor it's hard to really make any kind of reference like "disconnect this here", "put resistor divider here", "put 10x amplifier there", but range and sensitivity only have an effect on the envelope going into the FET. 
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.