[sdiy] what is the amplitude envelope of a signal

Richard Wentk richard at skydancer.com
Tue Sep 30 17:46:27 CEST 2003


At 13:08 30/09/2003 +0200, Czech Martin wrote:
> > If you're getting signal breakthrough it means either there's
> > some signal
> > breakthrough in the circuit due to a design or construction
> > fault, or the
> > filtering isn't working properly, or both. The output should
> > be a slow *DC*
> > variation. There should be no effective signal content above
> > 100Hz at the
> > very maximum, and 10Hz would be more typical for many applications.
>
>That is a good question. A lowpass with 100Hz or even 10Hz
>gives problems with signals that have a short attack.

But are those problems severe enough to make a musical difference? I can't 
think of many applications where a dual time-constant standard follower 
circuit wouldn't produce useful results. And people have been using single 
constant followers since Bob Moog's days without worrying too much about it.

> > The only way to create a perfect envelope follower is to do
> > it digitally in
> > non-real time, where you can go forward and backtrack with an
> > adaptive
> > time-constant and some clever logic.
>
>This is what I tryed, now I found that I can not write down
>a formal description of "envelope", because I do not know
>what it really is.
>
>Like I said, I thought I knew exactly what it is about, but
>when it comes to a formal description (algorithm) I know
>nothing about.

That's because it's an ad hoc thing that doesn't have a formal definition. 
However you do it you'll always have a trade-off between responsiveness and 
accuracy, especially on transients.

If you want a digital interpretation, pick your time constant, sample 
sections equivalent to its duration, calculate the RMS value in each (not 
too hard digitally) and then interpolate the values to create a curve. Use 
cubic instead of linear interpolation for a smoother result.

For adaptive tracking lower the time constant by a few factors whenever you 
see a transient (i.e. a very rapid change in RMS level), shift the start of 
each RMS window to the beginning of the transient, and then increase the 
time constant again during the release or decay period. This won't track 
reverse transients but it will handle most other things.

You can include a reverse transient check if you want to get really picky.

This solution won't work in real time because there's some lookahead and 
lookback is involved, but it will give you the best possible results 
otherwise.

Richard




More information about the Synth-diy mailing list