On 2/7/17 12:39 AM, Eric Brombaugh wrote:
On Feb 6, 2017, at 8:24 PM, robert bristow-johnson wrote:

On 02/05/2017 07:52 PM, robert bristow-johnson wrote:
I'm curious what aspects of a music make the complex magnitude of the
analytic signal inappropriate for estimating the envelope? In
communications signal processing we use this often, even for signals
that are fairly wide-band with respect to the sample rate and it seems
to work.
well, with a single sinusoid, there should be no intermodulation product
so the analytic envelope should be exactly correct. but consider:

     x(t) = g1(t) cos(w1 t) + g2(t) cos(w2 t)

which has for it's Hilbert

     y(t) = g1(t) sin(w1 t) + g2(t) sin(w2 t)

and analytic signal
     a(t) = x(t) + j y(t)

     a(t) = g1(t) cos(w1 t) + g2(t) cos(w2 t) + j( g1(t) sin(w1 t) + g2(t) 
sin(w2 t) )

     |a(t)|^2 = |g1(t)|^2 + |g2(t)|^2 + 2 g1(t) g2(t) cos( (w1-w2) t )
the last term on the right needs to be sorta filtered out with a LPF to
get the correct square of envelope, no?
Ah OK - you have a different definition of "envelope" than I do. That's fine.
i'm trying to be as inclusive in the definition of "envelope" as i can be.  
see, if you have a single sinusoid:

      x(t)  =  g(t) cos(w t)

and Hilbert transform

      y(t)  =  g(t) sin(w t)

and analytic signal

      a(t)  =  x(t)  +  j y(t)

            =  g(t) cos(w t)  +  j g(t) sin(w t)

            =  g(t) e^(j w t)

the analytic envelope is

      |a(t)|  =  sqrt( x(t)^2  +  y(t)^2 )

              =  g(t)


so that works great for a single sinusoid.  but once you toss in additional frequency 
components into x(t), then that creates high-frequency components into |a(t)|^2 that 
don't belong in any definition of envelope, no?  what other meaning of 
"envelope" are you working with, Eric?
I agree with all of your math. I don't agree that the

2 g1(t) g2(t) cos( (w1-w2) t )

term is not part of the square of the envelope.

If you have an analytic signal which is the sum of two complex exponentials as 
you described further above and the g1(t) and g2(t) terms are constant, then 
when you compute the magnitude of the sum you actually do see the result vary 
due to the beating of the two frequencies which is the frequency difference 
term you've proposed to discard. In the communications processing I've worked 
with that variation is a critical part of the envelope so using just the 
magnitude of the analytic signal is sufficient to define the envelope. Perhaps 
in audio processing this isn't the case and the filtering you describe is 
necessary.

good point. if w1 and w1 are very close to each other, that cross-product term represents the "beating" of the two sinusoids and they certainly can be alternatively represented as part of an envelope of a *single* sinusoid of frequency (w1+w2)/2.

with a harmonic musical note this beat frequency would be the difference between two harmonics, which could be any integer times the fundamental. that's much faster than beating. an r.m.s. envelope would be the square root of the sum of squares of the amplitudes, g_n(t), of all of the harmonics.

thanks for the info on the dsPIC.

--

r b-j                  r...@audioimagination.com

"Imagination is more important than knowledge."



_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Reply via email to