[music-dsp] Envelope Detection and Hilbert Transform

Bob M BobM.DSP at gmail.com
Fri Sep 24 20:33:43 EDT 2004

First off, thanks to everyone for a phenomenal discussion. There's a
lot for me to sort through!

To share with other some things I have learned here..

First off, I was confused because of the name "Hilbert Transform", or
more specifically that it contains the word "transform." I thought
transforms (such as Fourier, LaPlace, z...) are meant to go from one
domain to another. However, it seems the Hilbert Transform goes from
time domain to time domain. The end result seems to be that it
produces the imaginary component of the real signal.

I can understand the instantaneous magnitude concept from this. The
way I gather it, it's analogous to the magnitude of a frequency bin in
the frequency domain. That is:

(Re^2 + Im^2)^0.5

Conceptually, I think doing the above operation in the time domain
could be thought of as the sum of the magnitudes of all frequencies at
that instant: instantaneous amplitude.

But "instantaneous frequency" is new to me. I can understand it
mathematically. Now that we have the Re,Im components in the time
domain, we can find the phase just as we would in the frequency
domain. Then the derivative of the phase is the instantaneous
frequency. But conceptually, I'm lost. I'd be interested to know what
this figure looks like when there are sine waves of multiple
frequencies present.

I also asked if low-pass filtering the result of the Hilbert Transform
is necessary, and now I'm convinced that it is not. For example, how
could you resolve a triangular envelope accurately if you low-pass
filter that envelope? I think the triangular shape would not be

I'm still new to performing FIR filters in the frequency domain
(overlap and add), which was recommended. However, from what I could
see, an extremely flat all-pass frequency response (except near the
DC/Nyquist bins) can be had with a fairly small number of Hilbert
Transform coefficients and a window applied. For example, I checked
the gain plot of a HT using 29 coefficients and a Hanning window, and
it looked extremely flat to me. Is it really necessary to do FFT
filtering, or is that only if you're looking for a flat response all
the way out to DC and Nyquist?

Thanks again,

On Fri, 24 Sep 2004 19:22:17 -0400, Citizen Chunk
<citizenchunk at gmail.com> wrote:
> hi James. i just did a little reading on the good ole "interweb" and
> found this page on the Hilbert Transform:
> http://www.numerix-dsp.com/envelope.html
> from what I can gather, because of the 90 degree phase shift, the HT
> (not hyper threading ;) ) helps to "fill in the gaps" that would be
> present in a rectified oscillating signal. this seems a lot like the
> RMS value--but RMS is an average level, not the peak level. so the HT
> is kind of like an average that just follows the peak value. hope i'm
> making sense and properly understanding this thingy.
> if you have a sidechain signal that is tracing the rectified peak
> signal, it will attack/release as the signal rises/falls, which can
> cause envelope ripple. you could get a smoother envelope by using RMS,
> but that will slow down reaction time. from what i gather here, if you
> use the HT, you get a very smooth peak signal, which can then be
> averaged (for something like an RMS) or passed to an attack/release
> detector, for typical compressor behavior. so perhaps using the HT can
> actually reduce envelope ripple and IM distortion.
> or do i have it all wrong? ...
> == chunk

More information about the music-dsp mailing list