[sdiy] what is the amplitude envelope of a signal

Harry Bissell Jr harrybissell at prodigy.net
Wed Oct 1 01:28:40 CEST 2003


OK then... lets make a formal definition  ;^P

The "envelope" of a signal is what your 'eye'
would process looking at the rectified or absolute
value of a signal.

The envelope would be a 'best fit' curve to that.

Single constant generators do not work (for me)
I'm processing a guitar, which has the following
nasty habits

1) The positive and negative half cycles do not
have equal amplitude... and this change is variable
over time. Usually there is one large peak of one
polarity, followed by two smaller peaks of the
opposite
polarity.

2) The guitar has a normal exponential decay, but the
decay time can be changed easily (on the fly) by
adding
damping to the strings in small or even large amounts.
The biggest problem is that if you mute the strings...
it will take forever for a single constant to get to
the
correct value.  The next note will start at the wrong
value... maybe a too high value if the next note is
more quiet.

The ripple vs speed tradeoff is a killer.  Any ripple
(which the 'best fit' or 'eyeball' curve conveniently
filters out) will cause noticible intermodulation
distortion especially if you are using the CV to drive
a filter.  Any lag will destroy the accuracy of the
original waveform.  Now maybe your guitar, or drum
has a real noticible attack time.

This is a real nightmare problem.  If I could stand
it, 
I'd think about running some delay in the signal to
allow the circuit to 'look into the future' and
adapt... but I fear even a millisecond is too much

H^) harry


--- Richard Wentk <richard at skydancer.com> wrote:
> 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