My recommendation is to look up Hilbert networks, and phase differencing networks.

An efficient Hilbert network can be created by using 2 parallel chains of allpass filters, where the phase difference between the 2 parallel chains is 90 degrees, plus or minus a small amount of phase error, over a given frequency range. I put some code into Csound in 1999 to do this (look up the hilbert ugen), but there were some errors in it. I think I got sine and cosine mixed up. :oops: Anyway, the code is fixed now, and you are welcome to use it if you like.

A more efficient version of the code would be to use the biquad filters of your choice (built into Juce, IPP, whatever), and translate the 1st order allpass coefficients into 2nd order allpasses. Somewhere in the Supercollider mailing list archives I described how to do this, around 2002 or 2003.

Another alternative is to use the half-band elliptic filter code that is floating around out there, as this is generated with 2 parallel allpass chains that have a 90 degree phase relationship. MATLAB can generate the coefficients for these filters, which usually are based around z^-2 (2-sample unit delays) as opposed to the single sample unit delays found in most digital filters.

All of these allpass based Hilbert networks will create phase lag. In order to equalize the lag between channels, you will want to use the “cosine” allpass cascade for all channels that are supposed to be at 0 degrees. So, for all the channels in the Pro Logic matrices that have the “j” in their gains, you would use the “imaginary” or sine allpass cascade, while all other channels used the “real” or cosine allpass cascade.

The allpass based Hilbert networks can be VERY efficient - far more so than FFT or FIR based Hilbert networks. A standard phase differencing network that covers the audio range of 20 Hz to 20 KHz can be made with two parallel 6th order allpass cascades, or with 6 biquads total. For the Pro Logic implementations, each channel would use 6 1st order allpasses, or 3 biquads (or 2nd order allpasses if you want to save a few multiplies).

Wow, a question that I can actually answer on this forum! It’s kinda refreshing. Anyway, back to figuring out why my GUI just disappeared on my Windows VST.

Sean Costello