[sdiy] Fast envelope follower circuit needed..
rsdio at sounds.wa.com
rsdio at sounds.wa.com
Fri Mar 29 23:02:50 CET 2013
On Mar 29, 2013, at 14:14, Tom Wiltshire wrote:
> Also it's worth pointing out that we don't have to follow the
> rectifier (if we use one) with some kind of filter.
> Harry Bissel's analog envelope follower that Tim posted gives some
> clues to the sort of techniques I'd think about using:
> This takes the highest output from three peak detectors and uses
> that as the output.
> I'd adopt some similar idea - check for highest peaks, and store
> them, and then draw a straight line between those peak points. Do
> the same for the negative peaks. Invert the negative envelope so
> that it's positive, and then average the two to get your final output.
> There you go! No rectification, no filters*, no problem!
> *Some of these stages could be represented by filters of various
> types, but that wouldn't be the best way to implement them or think
> about them, so I choose not to refer to them as filters.
Sorry, Tom, but that circuit has at least three rectifiers and four
filters. A filter removes unwanted elements of a signal, and at least
four capacitors in that circuit are serving to remove any non-smooth
aspects of the signal. That makes them filters. The diodes in each of
the peak detectors are rectifiers, although they're really only half-
I don't see how you've shown that any problems that might be due to
rectification or filtering are in any way removed by that circuit,
since it has all of the problematic characteristics of both.
p.s. cheater is correct that there will be aliasing, but I am
convinced that the aliasing will not have any negative effect that
wouldn't also be present in the perfectly non-aliased ideal.
First of all, the digital rectification does produce aliases of the
original frequency. Second, aliased envelopes can affect the audio
signal path. In the case of a VCA EG, even in the digital world
amplitude modulation creates the sums and differences of all input
frequencies because the two signals - envelope and audio - are
multiplied. If the sum of any frequency in the envelope signal and
any frequency in the audio signal would exceed the Nyquist frequency,
then the resulting audio output would be aliased.
The big problem with aliasing is that you usually cannot filter out
the aliased frequencies because they lie in between the non-aliased
frequencies. Sure, you can use a low-pass, but any aliases that are
below the cutoff will still be in the output.
I do not see how that is a problem with an envelope detector. The
goal is to produce a control signal with basically "no" frequency
components, or at least they should be as close to DC as possible. In
practice, there will always be undesired low-frequency components in
the envelope. My point here is that aliased components are no more
problematic than non-aliased frequency components. The smoothing
filter in the envelope generator will successfully remove all
frequencies above a certain point, whether those frequencies are
aliases or not. The remaining frequency components are all equally
undesired, and it doesn't really matter whether they're aliases or
not, so long as they are low enough in frequency.
The hard limit is as follows: Assuming your audio signal is limited
to 20 kHz maximum, and your sample rate is 44.1 kHz, then your
envelope signal need only have no aliases above 2.05 kHz. Bingo, no
audio aliasing. I assume that envelope smoothing filters will have a
3 dB cutoff frequency sufficiently below 2 kHz that there will
basically be nothing left above 2 kHz in the envelope.
Again, even if you could reach the ideal of no aliased frequencies in
the envelope, there will still be non-aliased frequencies that will
ring-modulate the audio signal. That form of distortion is always
possible in a gain block with non-constant (non-DC) gain. Because
gain is multiplication, the only way to maintain the precise audio
frequencies of the input is for the gain factor to be DC (constant) -
an envelope is not constant.
More information about the Synth-diy