First time here? Check out the FAQ!

So does the complex product contain an oscilator aswell?

0 votes
I thought the complex product would do a complex multiply on two complex signals which would need an oscilator with sin and cos generator on seperate legs to feed  into it, or does the complex product module actualy contain the oscilator inside it in the same way as the quadrature oscilator does?
asked Jun 24, 2018 in Sound Design by pete-johnston (Practitioner) (670 points)

1 Answer

0 votes
There is no oscillator inside, but the prototype of ComplexProduct has a stereo oscillator as one of its default inputs.

The ComplexProduct takes two stereo inputs: Input0 and Input1.

The left channel output is: (Input0Left * Input1Left) - (Input0Right * Input1Right)

The right channel output is: (Input0Left * Input1Right) + (Input0Right * Input1Left)

You could keep the default bottom branch which is a stereo Oscillator with Cosine on the left and Sine on the right and multiply that by your mono signal to get:

Left output : (SignalLeft * Cos) - (SIgnalRight * Sin)

RIght output: (SignalLeft * Sin) + (SignalRight * Cos)
answered Jun 25, 2018 by ssc (Savant) (120,590 points)
That's what I thought. So there isn't a module that generates a sin on the right and at the same time generates a matching cos on the left. If the quadrature oscillator had an option so as to not mix it's output down to mono, but instead allowed the two internal signals to appear on the left and right outputs respectively, then this would cover all the options i.e. multiply left and right inputs with sin and cos respectively, or act as a sin/cos (leftout/rightout) oscillator if a constant one was fed to it's input. I don't think there is another Kyma module capable of this?

What you describe above is what you can do once you have a sin/cos pair to feed into the module and your capytalk example can not be used as a frequency shifter as it isn't at sample rate and will give a buzz at 1khz.

I think may be I'm not explaining myself. What I am looking for a the module that will generate a sample rate sin wave and cos wave (an oscillator) from nothing. Once you have that, all the funky processing you describe above becomes posable, but it all depends on you have the two wave forms as separate left and right signals to start with.
Pete, please look at the ComplexProduct prototype. There is a stereo Oscillator Sound on the lower branch that generates Cosine on the left and Sine on the right channel.
What I typed in the previous answer is a description of the signal flow (it is not a Capytalk expression). In other words, yes, there is a Sound that generates a Cosine wave as its left output and a Sine wave as it right output.
Hi SSC. That's what I was looking for although it's 3 modules (or 4 if I include the multiplier) instead of the one quadrature oscillator.
I guess I'll have to encapsulate it. Also noticed that I had to get rid of the suffixes or the two oscillators drifted, but it's good that after doing that it allowed negative frequencies and the phase flips correctly.

Is it likely to drift over long periods of time assuming I make sure the frequency field has the exact same control in both legs? Does it eat more processing than the quadrature oscillator module or is the quadrature similar on the inside?

Odd thing is that for what I'm doing I just need a stereo product and not the complex multiply as it only needs a mono signal input.

BTW I wasn't sure if you meant capytalk or an explanation of what the complex was doing.
Maybe you could use also try the prototype "OscillatorWithTimeIndex (or Phase Input)". Use ChannelJoin to put one on the left and another on the right, but use the same "OscillatorTimeIndex" Sound to generate the phase for both.
Depending on what you are doing with the phase, you may also need this module: "AddWrap Modulated Phase Generator)"
For this thing it's just needs a variable pitch (+/- freq) fixed phase so the two osc will do the job. I noticed the AddWrap and that is going to be invaluable for looping and sample rate indexing and live time stretch etc. Interpolated circular buffers without the horrible click here we come.