Making a generic envelope follower

Started by soggybag, September 27, 2005, 11:56:52 AM

Previous topic - Next topic

Paul Perry (Frostwave)

It's pretty embarassing when one can't remember one's own posts, but looking at the dome filter approach, it occurs to me that one doesn't in practice really need a dome filter. Feeding a signal to each of a bunch of phase shift circuits (non identical) and taking the maximum of the outputs, would likely do just as well.

puretube


soggybag

Thanks again Mike those are really good ideas. I will have to find some time to try them out. This morning I'm liking the sound of replacing one or both of the diodes with an LED.

Perry, thanks for pointing out the ESP article on rectifiers. The last one on the page seems pretty simple I may have to give it try. Speaking of transistor rectifiers, when I woke this morning I was thinking of the Green Ringer, I had the idea that Q2 and following parts might make the start of transistor based envelope.

R.G.

hmmm... the phase shift only has to be used for frequencies below the ones which cause objectionable ripple. Frequencies above that are OK as is.


By the way, full wave rectifying 3-phase AC needs no filter caps for most power supply work. 3-phase with FWR is less than 5% ripple as is, no filter caps.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

soggybag

I gave the Boscorelli envelope a second try. It seems to be working, this time I tested with the scope, as suggested. Mike was right on, the output is only about 1v peak not enough light the LED. It might have been working the first couple tries but I just didn't see the out output.

I figure the easiest way to interface something like this with a broad range of effects is to use an LED/LDR so it needs to be able to drive an LED. It seems this one would need a higher output to make it useful. I would guess the gain of the first or the second op-amp could be increased to acheive this. I'll have to break out the Forest Mims Engineers Notebook on op-am try some experiments...

R.G.

It seems like you could put the LED in the feedback path of an opamp, and use a resistor on the (-) input.

That way, the current into the opamp is determined by the input voltage difference from the (-) input DC level, which we know is always equal to the (+) input DC level. The opamp will do whatever voltage on the output is needed to make an equal and opposite current cancel the current coming into the (-) input, so a current flows in the LED equal and opposite to the current in the input resistor.

The voltage at the input now doesn't matter; it's always scaled by the input resistor, and the LED conducts that much current.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

soggybag

If have pictured what you suggested correctly the arrangement would look like this:

Vsat

Soggy,
The modified circuit  you just posted could be made to work if you do the following - connect the LED directly between the op amp output and (-) input, anode goes to output and cathode goes to (-) input.... and connect a resistor from the (-) input to ground. Make the resistor about 4K7 if you want about 5 mA through the LED when the voltage at the (+) input is 5V (aim for several volts on the capacitor when the pickup is putting out a strong signal, to maximize useful range).

The circuit can be simplified and enhanced if you choose to use a dual supply: instead of one LED, connect a 2nd LED in reverse across the first LED - this then becomes a full-wave rectifier. Connect the pickup directly between the op amp (+) input and ground. Note: for op amp protection, good idea to put a series resistor (say 10K -100K) between the (+) input and pickup. Also reduce the resistor at the (-) input from 4K7 to about 100 ohms to increase the sensitivity. D1 and C1 (and the previously mentioned 100K) are no longer needed. You can shine both LEDs onto an LDR or pair of LDRs to provide a variable resistance  proportional to picking level. The sluggish response of the LDRs provide envelope filtering without need for a capacitor. Only half of an LM358 or 1458 or TL072 is used. This technique might already have been used in a pedal, I'm just mentioning these ideas.
Mike

soggybag

Thanks Mike and R.G. If I understand correctly this is what you are describing:

The second suggestion sounds good. But for now I think I will get single 9V version working. I already have a tremolo that I've built I want to add the envelope to make it a little more dynamic.

moosapotamus

moosapotamus.net
"I tend to like anything that I think sounds good."

Vsat

Soggy,
That's the idea - but connect the LED the other way around (anode should be on the  op amp output).

An aside - two main problems with env followers  a) ripple b) intermodulation when chords are played, creating lots of low-freq ripple.
Using a bank of envelope followers, each optimized to a different portion of the audio spectrum,  with the individual outputs summed to produce a single main output would minimize both of these problems. Lots of parts, yes... the good news is that some of you may already have one of these sitting around unused - an analog vocoder. Take the outputs from the analysis bank, sum them, and use that to control your VCF, flanger etc. Good use for an old VC-10 etc. Should provide excellent results.

Another possibility is a "square root  of sum of squares" circuit fed from a 90 degree phase difference network - this eliminates the need for rectifiers to determine the magnitude of a sine input... but uses a lot of parts, but a bank of these would be needed.

Envelope follower DSP chip another possibility - spectrum analyzer with a single voltage output. If they were cheap, people would use them.
Mike

R.G.

Then again, you could feed the peak detector envelope detector from a full wave rectified signal...
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

soggybag

Thanks for being so patient. I'm little dense sometimes. I've updated the image. I'll give this a try tomorrow when I the time. This looks pretty promissing. Of course this won't be perfect but I think it should be close enough for rock and roll as they say.

StephenGiles

.......and then again a combo EH Space Drum/Crash Pad circuit......watch this space......
Stephen
"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

A.S.P.

#94
information lost...
Analogue Signal Processing

soggybag

I tried out the last version inlcuding the suggestions by R.G. and Mike and it seems to work well. The LED is not lighting up bright enough but I think this can be improved by increasing the gain on the first op-amp stage. I will have to try this after work today or tomorrow morning.

According to Forest Mims the gain of the Non-Inverting amplifier is 1 + ( R2 / R1 ). The gain is now 2. I measure about 1v max across C2.

StephenGiles

Quote from: A.S.P. on October 13, 2005, 12:15:24 PM
Stephen: a little bit OT, but do you know this Fund.-Ex. yet?
Thanks, it is in my "to read" pile no. 6 which I'll get to at some point. At the moment there is so much to read in the Saturday/Sunday newspapers that they take a whole week of reading time!
Stephen

"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

soggybag

After swapping out parts and testing somethings I find R3 sets Decay time, R4 sets Atrtack, The output seems low (the LED is not so bright) with R1 and 2 at 10K. I changed R2 to 1M and I get a good brightness on the LED, but it never goes fully off. With the 1M in R2 I get a constant 2v at the output of the first op-amp.

I think it may be necessary to reduce R2 to something between 10K and 1M for a better range. It might also be useful to increase the gain of the second op-amp.

Thinking about using this with an LDR it might be best to put a pot in series with the LDR to set the range.

H^)harry

Hello PureTube...

Sorry for late reply, I don't get out enough... :^P

The "Dome Filter" approach has some merit, but if you want to include guitar fundamental
(80Hz) you will need a dome filter with probably 18ms of group delay (the time it takes
for a signal at the input to reach the output).  You are slow already...

The dome filter has outputs that are 90 degrees apart, but the overall phase shift varies
1000s of degrees...

I wanted to use the method to pitch shift guitar up to ultrasonic frequencies, do a P/V
conversion, and elimiate the delay.  Does not work for reason above...

Roland made a unit called the SPV-300 (or 3000 or something).  There is a 'quad rectifier'
in the circuit... that is done with phase shift techniques. The down side is that it only
works because the signal (by that time) is compressed and filtered... essentially a sine
wave. Put a normal guitar input there and it does not work (I tried :^)

H^) harry

puretube

hmmmh...

so: petemoore wins the first price with his re-verb idea in the other thread:
Quote
Quote from: petemoore on October 18, 2005, 02:09:04 AM
  How about...
  A series of delays [like reverb] into the EF, would smooth out 'two note ripple', you could still get good changes in amplitude [of course slowed by however many milliseconds the delay extends input to the EF]...I'think delays made short enough to allow the follower to still 'follow', and long enough to fill in the 'dips between the swells ...
  Because the echo need not be in the signal path, a relatively low grade [inexpensive] chip [I think there are premade ones around for fairly cheep?] could be used without any degredation of audio signal, and improvement of sweep steadiness...also sweep slowness of course...DPDT...
  Am I rambling yet?

just delay the signal (in the sidechain - with a BBD) by, let`s say (assuming the peaks of the lowest frequency= 80Hz = 12.5ms apart) 2.5ms, and repeat them (by feedback-loop) 5 times in between that interval: then you get a couple of peaks you could rectify with less ripple than before...

ohh: but then you need either a shorter delay for higher signal-frequencies (keeping the same number of repeats),
or increase the number of repeats towards lower signal frequencies,
and therefore decrease the general delay-time....

err???, hummhh...

should I engage the "modify/edit"-button immediately right now,
or leave this up there...???


Yes, my other idea was: heterodyning/multiplying the signal into R.F. territory,
demodulate that,
while only filtering out "some" of the H.F.,
to keep some "chopping", but over-all relatively steady averaging "filling texture"
underneath the envelope, which wouldn`t allow the derived control-voltage
to go "down to zero" within those mentioned 12.5milliseconds,
before the 2nd peak of the 80Hz comes back into life...