____: Re: [PD] On arrays.

Charles Henry czhenry at gmail.com
Thu Sep 28 07:23:36 CEST 2006


> Remind me again what Hilbert does for us Chuck, shifts all the "negative"
> frequencies relative to its application by -pi and all the "positive"
> frequecies by +pi so sin(t) -> -cos(t) and cos(t) -> -sin(t) ??
> How does that give us a measure of phase change?

The hilbert transform takes the second half of the fft (which is the
conjugate of the first half...the negative frequencies, if you will)
and sets them to zero.  The ifft of this (multiplied by two) is a
complex signal, z(t) where the real part is exactly the original
signal and the imaginary part is 90 degrees out of phase.

this signal can be decomposed into amplitude and phase as a continuous signal:
A(t)=sqrt(Real(z(t))^2+Imag(z(t))^2)
phase(t)=arctan(Imag(z(t))/Real(z(t))

I tried to implement this so I could show ya.... it doesn't work but
I'll post it anyway.  It uses ==~ from zexy.  Use the hilbert_test
patch and Open up the grapher subpatch to see what happens....
Maybe it's just a lousy algorithm....but I've actually used this once
before to decompose phase and amplitude for other types of signals,
and it seemed to work fine then...
Chuck
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hilbert_by_fft.pd
Type: application/octet-stream
Size: 25863 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060928/28d88979/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hilbert_test.pd
Type: application/octet-stream
Size: 1343 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060928/28d88979/attachment-0001.obj>


More information about the Pd-list mailing list