difference between a level detector and an envelope follower??

Started by loss1234, May 06, 2008, 04:29:03 PM

Previous topic - Next topic

loss1234

i have been studying up on level detectors. i also need an envelope follower.
is there a difference? they both use rectifiers right?

thnx

Mark Hammer

Three kinds of detection:

- envelope follower tracks the instantaneous level
- peak detector tracks the "height" of peaks
- level detector would track overall average level

Paul Perry (Frostwave)

There is scope for confusion.
I personally consider an 'envelope follower' to be a circuit that takes an audio signal as input, and puts out a voltage that looks - as close as possible - to what you would see if you looked at the audio on an oscilloscope & used a pen to draw a line along the "peaks" of the waveform.
There is a difficulty in making a perfect envelope follower, because if you smooth the output enough to avoid ripple at audio frequencies, the envelope starts to get smeared out, like a sandcastle that had a wave wash over it.

Simplest wary to make an envelope follower is to make a rectifier circuit - either one that just takes the positive parts of the audio, or one that tips over the negative part of the audio cycles & adds them to the positive parts - and then smooths the result into the envelope.

Now if you want a "level detector" - the question is, do you just want something that detects when a signal exceeds a particular point, or do you want an output that rises and falls with the signal loudness? If the latter, then an envelope follower gives you what you want, and yes, it is usually based somehow on a rectifier circuit & smoothing.

Mark Hammer

To add to Paul's astute comments, one needs to think of using the amplitude information of the audio signal in different ways, and perhaps even at different levels.

So, a peak detector can let you know if something "big" has happened, but it doesn't really provide useful information about the in-between content.  An envelope can let you know about the amplitude qualities of the signal, without necessarily identifying the onset of a musical "event".  This is why old synths would take an envelope signal, apply it to a comparator, and derive a "trigger pulse" that would indicate/represent the start of a musical event.  When the peak is used to provide that information for the comparator, you get a brief pulse signifying onset.  If you wanted to know how long the event lasted, you would want a "gate" (presumably called such because it stays "open" for a while, then closes), which results from the overall envelope being applied to a comparator such that a sort of logical 1 is generated for as long as the envelope remains above the threshold set by the comparator.

Of course, when the musical events come fast and furious, the sort of information provided by envelope followers and peak detectors may be of less use.  One of the very reasons why many people prefer VU meters instead of LED meters is because they tend to average out the signal across multiple "events" to provide what I have called "level detection".  I suppose something out there probably digitally averages out the measured/encoded properties of envelopes, but in the analog world, we essentially rely on "smudging" successive envelopes by adding in lag so as to represent average levels.

I draw your attention to Craig Anderton's "pluck follower" idea in DEVICE (http://hammer.ampage.org  see page 10, I believe), which essentially goes one step beyond and averages out the trigger pulses over multiple notes to provide not a representation of amplitude, but rather a representation of how many notes/strums per unit of time.  This also "smudges" information in the analog domain,but works with the trigger pulses that are derived from the individual note/strum envelopes.

Again, all of these different sorts of information are musically useful, but you sort of have to plan out or think about how they can be put to use.

StephenGiles

There is also a window detector which looks at a voltage and if it falls between 2 predetermined voltages, the window detector does something  - it's output goes high for instance. There is another which detects whether a voltage is rising or falling - could be usefull!
"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

StephenGiles

http://www.freepatentsonline.com/5737432.pdf

Some bedtime reading for starters - do a search on Werbach, or what ever his name is and there is heaps (are heaps???) of stuff.

And here - for practical circuitry

http://www.aphex.com/pdf/2020MKII/Aphex_2020_chap15.PDF
"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

Paul Perry (Frostwave)

My trouble with envelope followers has always been, that it is really easy to "imagine" what one wants - but not so easy to get it.
Anyway, the first step is to think about exactly what you want to do with the envelope follower or detected signal.
And then to think about just how rough an actual guitar signal is. Nothing like a sine wave, that is for sure.

loss1234

wow-lots of great information here.

I have played with comparators before as level detectors, but that creates more of a gate signal and i am really trying to generate CV.

this seems important:

""Simplest wary to make an envelope follower is to make a rectifier circuit - either one that just takes the positive parts of the audio, or one that tips over the negative part of the audio cycles & adds them to the positive parts - and then smooths the result into the envelope."


I hate to sound like an idiot, but I have come across a lot of different rectifier circuits lately and some of them seem to do different things than others. Is there a good one to use as an example? am i looking for a precision rectifier? a fullwave or a halfwave? they use diodes right? I see in the PAiA 2720 envelope follower, a section with diodes. is that the rectifier most likely?

if so, I could take a rectification circuit, smooth it out with a lag circuit (is that correct?) and that would be a follower?

I think i have seen a schematic for a lag. Could i just use an integrator to smooth out the signal?

thanks so much!! this forum is amazing


StephenGiles

Take a look at the EH Spacedrum circuit, I think it's on this site. What you have there is an envelope generator - a very clever one, which is triggered by a drum hit, and a rising or falling voltage can be achieved by changing the start and stop frequency controls.

http://img.photobucket.com/albums/v317/StephenGiles/EHspacedrum.jpg
"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".


Mark Hammer

Quote from: loss1234 on May 08, 2008, 08:43:17 AM
I hate to sound like an idiot, but I have come across a lot of different rectifier circuits lately and some of them seem to do different things than others. Is there a good one to use as an example? am i looking for a precision rectifier? a fullwave or a halfwave? they use diodes right? I see in the PAiA 2720 envelope follower, a section with diodes. is that the rectifier most likely?

if so, I could take a rectification circuit, smooth it out with a lag circuit (is that correct?) and that would be a follower?

I think i have seen a schematic for a lag. Could i just use an integrator to smooth out the signal?
You have learned fast and well.  The answer is YES to all your questions.

Traditionally, the tradeoff in envelope followers has been that if you go for fast response you invite ripple.  If you aim for least ripple, you tend to lose fast response.  Guitar has the unenviable qualities of having a fast onset and a long decay.  In a sense, envelope-following a guitar demands two mutually exclusive goals being pursued simultaneously.

About 5-6 years ago, I tried out Harry Bissell's mostly analog DIY guitar synth.  I found it to be exquisitely responsive.  Harry had come up with his own envelope follower design that is quite a bit more complex than the usual but managed to reconcile these two seemingly irreconcilable objectives of speed and smoothness.  You can find it here: http://www.edn.com/contents/images/122602di.pdf

StephenGiles

I must try that one again, couldn't get it to work before.
"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

loss1234

yeah he actually mailed me the schematics for his guitar synth and MAN is it complex!! wow.
but the circuit you speak of, doesnt look too hard, just a bit big (since its repeated three times)

i suppose with quad opamps it wouldnt have to be gigantic though

right now i am working on a pretty massive device, its going to incorporate elements of both synthesis and guitar related FX, in a rackmountable enclosure.

mainly i am exploring ways of generating CV signals that will allow me to create streams of sound that are related to the input (At times) or seemingly or quasi-random at others. lots of counters, maybe a sample and hold, a slew, an ssm2044 filter, a 566 vco, some vclfos, a couple AR gens, and a vca or two, etc. i have been building the blocks up on perf and when its all ready i suppose i will etch a few boards...long project! but anyway, its made me take the leap from synth diy to diystomp! and this is after only about 9 months of electronics!

its amazing how much you can learn on forums.

thanks so much for the advice and links

frequencycentral

Necro bump!

Quote from: StephenGiles on May 07, 2008, 01:56:08 PM
There is also a window detector which looks at a voltage and if it falls between 2 predetermined voltages, the window detector does something  - it's output goes high for instance. There is another which detects whether a voltage is rising or falling - could be usefull!

Yes, I've been thinking a lot about window comparators recently. I guess it's one way around ripple - just detect the pluck above a chosen range and use this to trigger a synth type envelope generator, with perhaps a 555 based gate time extender to allow for the provision of slow attacks. It wouldn't exactly be very guitary - more synthy really. Might be interesting to try..........
http://www.frequencycentral.co.uk/

Questo è il fiore del partigiano morto per la libertà!