[sdiy] what is the amplitude envelope of a signal

harrybissell harrybissell at prodigy.net
Thu Oct 2 03:23:47 CEST 2003


Scott Gravenhorst wrote:

> Hey Martin and Harry,
>
> Pardon my lame observation, but it looks to me like the problem
> is that process needs to know the true length of a cycle.  That
> is, in order to avoid recognizing a cycle's secondary peaks as
> primary peaks.

Yes... precisely :^P

In my circuit... I 'know' that it is processing a guitar and that the
lowest fundamental frequency is 80Hz.  When I try the same circuit
on "music" (wideband) input... I can no longer assume that.  And it
works progressively less well.  Too bad, so sad :^P  By the time I
get good follower performance, the hangover becomes more than I'd
like. I have made the reset clock variable, for this reason.

> Almost as if a PLL is needed in the algorithm to
> mark out a cycle.  While this might not work in a practical
> circuit, it might be useful in a non real time algorithm.
>
> Then again, it is early here and I'm just sipping my first cup of
> coffee.  So I hope I've at least amused, if not helped and
> hopefully not annoyed...

Annoyed, not now not ever...
<sound cue : Gilbert and Sullivan - HMS Pinnafore>
well... hardly ever...  :^P

H^) harry

> Anyway, interesting stuff.  I'm all eyes.
>
> "Czech Martin" <Martin.Czech at micronas.com> wrote:
> >Harry,
> >
> >your reply shows that you listened carefully to your
> >results. These are exactly the problems I came across.
> >
> >For such applications the usual circuits/ideas do not perform
> >too well, or they are even useless.
> >
> >Your "eye" approach is into the same direction of what
> >I tryed, unfortunately this is a very intelligent
> >approach. For the human beeing it is not too hard
> >to draw the envelope, but automatons have problems...
> >
> >m.c.
> >
> >> -----Original Message-----
> >> From: owner-synth-diy at dropmix.xs4all.nl
> >> [mailto:owner-synth-diy at dropmix.xs4all.nl]On Behalf Of Harry
> >> Bissell Jr
> >> Sent: Mittwoch, 1. Oktober 2003 01:29
> >> To: Richard Wentk; Synth-DIY list
> >> Subject: RE: [sdiy] what is the amplitude envelope of a signal
> >>
> >>
> >> 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
> >> >
> >> >
> >>
> >>
> >
>
> =========================================================
> - Where merit is not rewarded, excellence fades.
> - Hydrogen is pointless without solar.
> - What good are laws that only lawyers understand?
> - The media's credibility should always be questioned.
> - Governments do nothing well, save collect taxes.
>
> -- Scott Gravenhorst | LegoManiac / Lego Trains / RIS 1.5
> -- Linux Rex         | RedWebMail by RedStarWare
> -- FatMan: home1.gte.net/res0658s/FatMan/
> -- NonFatMan: home1.gte.net/res0658s/electronics/



More information about the Synth-diy mailing list