First time here? Check out the FAQ!
x

Hand-rolled quadrature oscillator question

0 votes
677 views
Hi

Ok, so I wanted to mess around with the SR Frequency update on quadrature oscillators and SingleSideBand, and just wanted to check something.

Is this the correct recipe?
Multiply the amp of the Sin by the left channel of the input (which is 90 phase shifted)

Multiply the amp of the Cos by the right channel of the input

Sum both?

Or is it the signal graph in the ComplexProduct prototype? Which sounds excellent...
asked Jan 6, 2019 in Sound Design by cristian-vogel (Master) (8,460 points)
edited Jan 6, 2019 by cristian-vogel

1 Answer

0 votes
What you have looks correct: multiply the left output of the Hilbert transform by a sine, multiply the right output by cosine and sum the left and the right (that should cancel one of the side bands to give a single side-band frequency shifter).
answered Jan 7, 2019 by ssc (Savant) (128,200 points)
Hi Cristan. Using the Hilbert you can make a ring modulator which only has one side band. This means you can make a frequency shifter, but you may notice that when you shift the frequencies down, the low frequencies will go pass DC and turn into negative frequencies and come up again, which can sound like a duel sideband ring modulator again. But there is a trick which can be done here by using another Hilbert you can make the negative frequencies cancel so the frequencies go down and disappear into nothingness leaving the signal clean. I demonstrated this at my KISS 2012 talk.
https://www.youtube.com/watch?v=zh2SWIMcSRk
The sound is included in the sounds that go with the talk. Hope it helps.
thanks Pete and SSC. Where do you locate that Sound example Pete?
Hi Cristian. After KISS2012 I e-mailed the sounds and the powerpoint to people who requested it. I thought you had it already, but if not let me know what your email is and I'll send the link.

With regard to your first question, what you describe with the sin cos two products and a mixer is half of the complex multiply, as it only has one output not and not a real/imaginary pair. For the single side band ringmod you only need half as you only need one output signal. In the talk, I needed to go further than just a single side band ring mod as I wanted to cancel out the negative frequencies and needed the full complex multiply. The Kyma module called QuadOscillator has the sin and cos oscillator built in as well as the two products and the mixer so feeding this with a Hilbert give you a single side band modulator with nothing else needed. As I needed the full complex multiply I got a second QuadOscillator but first put the Hilbert through a channel crosser which swapped the channels and inverted one of them to give me the second output making a full complex multiply pair.

Once I had a full complex output of the frequency shifted signal, I knew that all the positive frequencies had a 90 deg lead in the in the second output and the negative frequencies had a 90 deg lag in the second output compared to the first output.

So if I could put the first output through another Hilbert, it would make all the frequencies positive and negative have a 90 deg lag. So then subtracted that from the second output (with the matching delay because of the extra Hilbert) then the positive frequencies would add and the negative frequencies would cancel as they were 0 deg and 180 deg with respect to each other. The third Hilbert module is there as a simple way of providing the needed matching delay by using only the right leg and not using the left leg.

The channel crossers at the end are just making sure the correct legs of the Hilberts are being picked off.
I remember it took me ages to grasp how this works haha
while it is really clever and makes a really sharp filter (can't be sharper actually) - do you think it's more efficient to use a HighPass before doing the frequency shifting that filters the input in a way no aliasing can occur?
Yes making a HP filter on the input that moves up when the frequency shifting moves down is a more efficient way of doing it. Sounds like the same principle as the Surbiton oscillator only upside down.
BTW the theory in the negative freq canceler sounds like the filter is infinitely sharp, but in reality it is subject to the imperfection of the Hilbert (not 90 deg at sub audio down to DC) but it is very sharp.
The main reason I did the neg freq canceler is for situations where I maintain the two legs of the full complex multiply (real and imaginary) and do more complex stuff than just a single frequency shifter. May be shift it down and up inserting comb filters along the way for example.

Did you see Mr Nortons delay with feed back but with a frequency shifter the feedback path. This was hard to do as we didn't want the hi latency of the Hilbert in the feedback path itself, as it would have limited the shortest delay time available. Instead it had one Hilbert on the input and used two matching delay lines with two quadratures in the feedback path passing the signal back and forth between the delay pair maintaining the real/imaginary signals as is went through. This meant you could get freq shifts that moved further away every time it went round the delay line. I never tried the neg freq canceler on the outputs but I suspect it would have some different sounds as the frequencies spiralled off the bottom and silently moved back round off the top then became audible again when it flipped back at half sample rate.
Here is the link on the old forum.
http://www.symbolicsound.com/cgi-bin/forumdisplay.cgi?action=displayprivate&number=3&topic=000225
Right, that makes sense, of course you need to be able to calculate the amount of (possible) aliasing to adjust the filter.
The feedback example would be a good usecase for a HilbertIIR. But you were already able to solve it (in a clever way).
It may be solved but it still has a latency of a thousand odd samples. I sure am interested in the HilbertIIR, as that will have a lot less latency `and will be a lot more efficient, even if you don't port it to Kyma I'm still interested.
...