Old 08-11-2012, 05:20 PM   #1
Peestie
Human being with feelings
 
Join Date: May 2012
Location: Northern Ireland
Posts: 29
Default 90 Degree Phase Shifts

Hi,

I'm designing some plugins that require a 90 degree phase shift across all frequencies. I've done one implementation using two all pass filters that approximate the Hilbert transform based on this site:

http://yehar.com/blog/?p=368

It works quite well but I'd love to implement it using another method (in the spirit of scientific curiosity, y'know?) and compare the two.

Does anybody have any other interesting methods for coding this phase shift?

Cheers.
__________________
Follow me as I attempt to get some music together:
Circle Sounds
Peestie is offline   Reply With Quote
Old 09-04-2012, 11:48 AM   #2
Tomm
Human being with feelings
 
Join Date: Nov 2007
Posts: 1,331
Default

You may already know this; There is a built in phase adjustment plugin within REAPER:

JS: Utility/phase_adjust

Also, PhaseBug is a free VST and available here:

http://www.betabugsaudio.com/plugs.php
Tomm is offline   Reply With Quote
Old 09-28-2012, 05:21 AM   #3
Peestie
Human being with feelings
 
Join Date: May 2012
Location: Northern Ireland
Posts: 29
Default

Thanks for the reply. However, I was more looking for ways of implementing the code to include in my own plugins, rather than using other ones.

But thanks to your suggestion I've had a look at JS: Utility/phase_adjust and see that it uses FFT so I'll maybe have a deeper look into that method as an alternative to the IIR/Hilbert method I've already done.
__________________
Follow me as I attempt to get some music together:
Circle Sounds
Peestie is offline   Reply With Quote
Old 10-10-2012, 10:26 AM   #4
Stretto
Human being with feelings
 
Join Date: Oct 2012
Posts: 147
Default

The HT itself adds a phase shift of -pi/2 to all frequency components. Therefor your original equation is just computing the HT. There are many ways to do this.


Since the HT is defined as

1/pi * int(f(u)/(t - u))

you can easily see this as a FT:

int([1/pi*f(u)*e^(iwu)/(t - u)]e^(-iwu))

this, then, is the FT of [1/pi*f(u)*e^(iwu)/(t - u)]

But this could also seen to be a STFT with window e^iwu/(t - u)/pi

Hence, there are many representations of the HT. You could look at it in terms of wavelets, the gabor-wigner transformer, convolutions, taylor series approximations, etc... The standard form generally presented is just one facet but no different than any other. All the representations are just different sides of the same coin with some being more appropriate than others depending on the context.

It's unclear to me what you are exactly trying to achieve. If you have a working method then it seems your attempting to improve/compare the numerical aspects. In that case it is a very difficult area as there are many factors involved. IIRC, the FWT is O(n) and the FFT is O(nlogn) so, theoretically, the FWT is faster which might lead you to formulate some wavelet based approach. (The one thing about wavelets is there is an exact transform/inverse transform algorithm. That is, there is no loss due to numerical imprecision)

There is also the linear canonical transform which can be represented in terms of FT's too but might reveal some optimality for your problem.

Obviously the direct and probably most efficient method for your case is a direct fast Hilbert transform.
Stretto is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.