First time here? Check out the FAQ!

Do I need to set a sample delay through a PhaseShiftBy90 ?

0 votes
Normally, a phase shift using an FIR would use a number of taps, and I would need to align other signals to it by delaying by this ammount of samples. But in the Kyma PhaseShiftBy90 prototype, I don't see any tap count. How do I know how much to delay compensate?
asked Jan 6 in Sound Design by cristian-vogel (Master) (6,400 points)

2 Answers

0 votes
I think this class is doing the phase shift using allpass filters. Both signal are 90 degs shifted from each other, but none of them is like the original. Ther should be another class for phase shifting which tells you the amount of delay you need in the description. This one is FIR for sure! Hope that helps!
answered Jan 6 by kymaguy (Master) (9,880 points)
0 votes

PhaseShiftBy90 uses a pair of IIR filters to create a pair of signals that are 90 degrees apart in phase at the given Frequency. So there is virtually no delay (at most 2 samples) through the filter.

You can also use the HilbertTransform to make a 90 degree phase shift. The left channel output is the Input phase-shifted by 90 degrees. The right channel is the Input.  Delay through this module is ((numberTaps - 1)/ 2 + 1) samples.  The larger the number of taps, the higher the quality of the phase shift (but the more processing time required and the longer the delay time through the module).

answered Jan 6 by ssc (Savant) (85,170 points)
hilbert transform! that's what I meant ;)
Hi Cristian/Gustav. The Hilbert transform refers to the formula used to generate a 90 deg phase shift but needs a matching delay and level adjustment to see the true unity gain 90 deg phase shift across nearly all the audio spectrum. The module provides this delayed version on the right output, so splitting the left and right gives you the two signals you need. The PhaseShiftBy90 is complete rubbish and should be renamed "DefiantlyNotPhaseShiftBy90". It is an all pass filter with phase shift ranging from 0 deg at lo freqs to 180 deg at hi freqs and just happens to pass through 90 degs at only one freq in the middle. Similarly the kyma SingleSideBandRingModulator (without the Hilbert) is not a single side band ring modulator at all, and gives you junk. Don't waste your time with these modules and instead use the Single side band ring modulator using Hilbert which works brilliantly. If you've ever tried 90 deg experiments using the PhaseShiftBy90 and found it didn't work, then try them again using the Hilbert and you will probably get more expected results.
If your input is narrow band (such as a sine wave oscillator) and it is at the target frequency, then the Allpass version works well and is much less computationally expensive. So in that instance, you would be better off using the PhaseShiftBy90
interesting! But you can actually design an allpass section that provides you with two signals phase shifted by 90 degs across pretty much the whole frequency range, I just designed this. Maybe I'll port that to kyma and share it here.
Hi Gustav. funny you should say that, I've been working with IIRs lately and noticed Hilbert-ish transfers using IIRs not FIRs and thought that would be great to have a low latency Hilbert in Kyma. It seems like you've beaten me to it. I'm curious as to how many filter orders you needed to get a pretty wide (full audio spectrum?) band of 90deg difference between the pair and at unity gain? I'm sure his would be very useful in Kyma.
Hi Pete, with a filter order of 5 you already pretty useful results. Just today I finished developing a tool where you can define poles and zeroes and it will calculate the coefficients for you. As soon as I tested it to work correctly, I can port the coefficients to kyma and build the IIR. I'll keep you posted ;)
We had some pretty good luck with some improvements to the PhaseShiftBy90 this weekend. Seems to work as well as the Hilbert but without the long delay (and at less than 1/8th the computational cost). Hoping to upload it soon...