DSPRelated.com
Forums

Automatic (no user-parameters) envelope/peak follower

Started by mavavilj July 27, 2015
I'm looking for known algorithms that do envelope/peak following with no
user-specified attack or release times.

Specifically I'm interested in what kind of algorithms something like:
http://i.stack.imgur.com/gT4dw.png could be using (based on how it looks
like).
---------------------------------------
Posted through http://www.DSPRelated.com
mavavilj <106909@DSPRelated> wrote:

>I'm looking for known algorithms that do envelope/peak following with no >user-specified attack or release times. > >Specifically I'm interested in what kind of algorithms something like: >http://i.stack.imgur.com/gT4dw.png could be using (based on how it looks >like).
From this image, it looks to me like a device with user-specified time constants ("hold" and "revocery" in milliseconds). Is your question that you'd like an algorithm that is more automatic and does not need these user inputs? (Offhand, I'm going to call that a prtty difficult problem.) Steve
>From this image, it looks to me like a device with user-specified >time constants ("hold" and "revocery" in milliseconds). > >Is your question that you'd like an algorithm that is more automatic >and does not need these user inputs? (Offhand, I'm going to call >that a prtty difficult problem.) > >Steve
There was two questions. I'm interested in both the potential algorithm used in the image (that is, how it tracks so well) and then the theoretical feasibility of reducing user parameters (and known algorithms for that). --------------------------------------- Posted through http://www.DSPRelated.com
On Mon, 27 Jul 2015 13:51:42 -0500, "mavavilj"
<106909@DSPRelated> wrote:

>I'm looking for known algorithms that do envelope/peak following with no >user-specified attack or release times. > >Specifically I'm interested in what kind of algorithms something like: >http://i.stack.imgur.com/gT4dw.png could be using (based on how it looks >like).
Without knowing the input signal, it's hard to speculate. The image shows steep attacks and shallower decays, but it's also labeled "Drum Leveler" so maybe it is just showing the "actual" attack and decay of the drums (or whatever). In other words, it might simply be a plot of the amplitudes of successive frames of the signal (with unknown frame size and overlap). Or am I missing something? Best regards, Bob Masta DAQARTA v8.00 Data AcQuisition And Real-Time Analysis www.daqarta.com Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, Pitch Track, Pitch-to-MIDI FREE 8-channel Signal Generator, DaqMusiq generator Science with your sound card!
> > In other words, it might simply be a plot of the amplitudes > of successive frames of the signal (with unknown frame size > and overlap). > > Or am I missing something? > > Best regards, > > > Bob Masta >
I don't know what was used for that particular picture but... one of the most interesting applications for DSP I have seen is described in Richard Lyons book on page 366, and that is a DSP based envelope detector that is able to evaluate the instantaneous envelope (no attack or decay filter needed) by using the Hilbert transform to create the analytic signal. THe envelope is then found as the magnitude from the square root of the sum of the squares. This can be used to make an "ideal diode detector" for an AM radio which i used to play with as a kid. THe diode detector needed a filter to remove the 455 kHz IF signal but also not attenuate the high frequency audio signals. A compromise was needed. The DSP method requires no compromise regardless to how close the desired and undesried frequencies are to each other. Mark
> > I don't know what was used for that particular picture but... > > one of the most interesting applications for DSP I have seen is described in Richard Lyons book on page 366, and that is a DSP based envelope detector that is able to evaluate the instantaneous envelope (no attack or decay filter needed) by using the Hilbert transform to create the analytic signal. THe envelope is then found as the magnitude from the square root of the sum of the squares. > > This can be used to make an "ideal diode detector" for an AM radio which i used to play with as a kid. THe diode detector needed a filter to remove the 455 kHz IF signal but also not attenuate the high frequency audio signals. A compromise was needed. The DSP method requires no compromise regardless to how close the desired and undesried frequencies are to each other. > > Mark
That is indeed very interesting! In my 3rd edition Lyons book it's on pages 458-461. -Joerg
On 7/27/15 2:51 PM, mavavilj wrote:
> I'm looking for known algorithms that do envelope/peak following with no > user-specified attack or release times. > > Specifically I'm interested in what kind of algorithms something like: > http://i.stack.imgur.com/gT4dw.png could be using (based on how it looks > like).
why do you think there are no hidden parameters for attack or release times? the only envelope follower without parameters that i know if is to compute the magnitude of the complex analytic signal. | x(t) + j*Hilbert{x(t)} | = sqrt( x(t)^2 + Hilbert{x(t)}^2 ) doubt that it will work so good for drums (might work for toms). -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 2015-07-27 20:51, mavavilj wrote:
> I'm looking for known algorithms that do envelope/peak following with no > user-specified attack or release times. > > Specifically I'm interested in what kind of algorithms something like: > http://i.stack.imgur.com/gT4dw.png could be using (based on how it looks > like). > --------------------------------------- > Posted through http://www.DSPRelated.com >
In the good old days, one algorithm was the low pass filter (1st order, i.e. RC) of the absolute value of the signal (which was, of course, zero mean). The only parameter is the "a" or RC constant of the LP filter. I'm not sure, but maybe this can be estimated from the signal itself. bye, -- piergiorgio
On Tue, 28 Jul 2015 05:35:08 -0700 (PDT), makolber@yahoo.com
wrote:

> >>=20 >> In other words, it might simply be a plot of the amplitudes >> of successive frames of the signal (with unknown frame size >> and overlap). >>=20 >> Or am I missing something? >>=20 >> Best regards, >>=20 >>=20 >> Bob Masta >> > >I don't know what was used for that particular picture but... > >one of the most interesting applications for DSP I have seen is described i= >n Richard Lyons book on page 366, and that is a DSP based envelope detecto= >r that is able to evaluate the instantaneous envelope (no attack or decay f= >ilter needed) by using the Hilbert transform to create the analytic signal.= > THe envelope is then found as the magnitude from the square root of the = >sum of the squares. > >This can be used to make an "ideal diode detector" for an AM radio which i= > used to play with as a kid. THe diode detector needed a filter to remove = >the 455 kHz IF signal but also not attenuate the high frequency audio signa= >ls. A compromise was needed. The DSP method requires no compromise regar= >dless to how close the desired and undesried frequencies are to each other. > >Mark
Thanks for the Lyons reference... finally nudged me into ordering the book! I first heard of the Hilbert transform back in the pre-PC days (mid 70s) from Bernie Hutchins of Cornell in his Electronotes newsletter for "musical engineering". He suggested it as a "some day, when fast DSP becomes practical" alternative to analog Phase Difference Networks to get quadrature outputs from arbitrary input signals. Dunno if anyone uses PDNs any more; they were parallel chains of all-pass stages, with staggered TCs such that the *difference* between the outputs of the two chains approximated 90 degrees over the frequency range of interest. Lots of fun sorting and measuring Rs and Cs to get the target tuning... ahh, the "good old days"! Best regards, Bob Masta DAQARTA v8.00 Data AcQuisition And Real-Time Analysis www.daqarta.com Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, Pitch Track, Pitch-to-MIDI FREE 8-channel Signal Generator, DaqMusiq generator Science with your sound card!
Bob Masta <NoSpam@daqarta.com> wrote:

>Dunno if anyone uses PDNs any more; they were parallel >chains of all-pass stages, with staggered TCs such that the >*difference* between the outputs of the two chains >approximated 90 degrees over the frequency range of >interest. Lots of fun sorting and measuring Rs and Cs to >get the target tuning... ahh, the "good old days"!
I believe there's a National datasheet on designing them ... if you use 1% resistors and 2% capacitors you're probably okay. Steve