Frequency shifting with Hilbert-transform and ring modulation

Hi all,

I want to test how SSB modulation works manually in SC with Hilbert-transfor and ring modulation.

I tried the simplest thing: ring modulate two sine waves with each other, while phase shifting one of them with 90° aka pi/2 radians.
Hence my code:

(
x = {
	f = 220;
	a = SinOsc.ar(f);
	p = MouseY.kr(0,pi/2).clip(0,pi/2).poll(10,"phase");
	b = SinOsc.ar(110,p);
	LeakDC.ar([a*b]!2 * -51.dbamp);
}.play;
)

According to theory, when one of the sine’s phase is shifted with pi/2, the lower sideband - in the above case the 110Hz - should disappear and it doesn’t.

What am I seem to be something here?

Thanks,
cd

hey, here is a version of single sideband PM:

(
var raisedCos = { |phase, index|
	var cosine = cos(phase * 2pi);
	exp(index.abs * (cosine - 1));
};

{
	var rate = 110;
	var modRatio = 2.5;
	var index = SinOsc.ar(0.3).linlin(-1, 1, 0, 30);

	var modPhase = Phasor.ar(DC.ar(0), rate * modRatio * SampleDur.ir);
	var mod = sin(modPhase * 2pi);
	var raisedCosWindow = raisedCos.(modPhase, index);

	var carrPhase = Phasor.ar(DC.ar(0), rate * SampleDur.ir);
	var carr = sin(carrPhase * 2pi + (mod * index));

	var sig = carr * raisedCosWindow;

	sig = LeakDC.ar(sig);

	sig!2 * 0.1;

}.play;
)

@crystaldreg,

You might also like to review the various implementations found in Hilbert Transform Library Quark:

Thank you for your quick and informative answer!
It might need a bit of time for me to go through your example, let me get back to you when I have questions about it.

Thanks for the links, the Hilbert Transform Library seem to have useful further reading!

I thought (hoped maybe?) that this might be a simpler operation, but I’ve been trying to wrap my head around how it works, so it’s useful to know where to look for material.