Ring Mod - Frequency Shifters.

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

So, it's somewhat of a black box to me.

But in essence, sin(x) * input will emit the positive and negative tones at the rate of sin(x), presuming the frequency is audible.

And if you provide a series of sin(x) * input, then there's a series of undertones and overtones, and if we shift the rate of the carrier wave, sin(x), then we start to get something that resembles a frequency shifter [albeit very crude - and dishonest sounding].

Although, typically, frequency shifters are created with Hilbert transforms.

which led me to an odd thought.

We can use the Hilbert transform frequency shifter and shift in the negative direction.

but there's no such things as a negative frequency, so the same concept - doing the crude form with ring mod is impossible.

what's up with that? fill in my knowledge where there's a gap.

Post

Dave_p wrote: Wed May 13, 2026 2:01 am but there's no such things as a negative frequency
☝️ There's the gap.

Complex-valued signals have a real and imaginary part. The simplest tone (mathematically) isn't a sine wave - it's a complex sinusoid which has constant amplitude and just changes phase over time.

A sine wave is actually expressed as the sum of one of these spinning in one direction, and another spinning in the other direction, so that the imaginary parts cancel out. I gave a really quick and rough overview of that in a talk on Hilbert filters (1:44 onwards): but yeah - this is the piece of understanding which will help frequency shifters make sense.

Post

signalsmith wrote: Wed May 13, 2026 5:17 am
Complex-valued signals have a real and imaginary part. The simplest tone (mathematically) isn't a sine wave - it's a complex sinusoid which has constant amplitude and just changes phase over time.
Ah, does that imply that negative phase rotations on the complex plane emit the "imaginary part" and are "negative frequencies"?

[fairly certain this question was answered at 3:24]

...still working through the video.

Post

That's an interesting note around the zero point with the passband, and increasing sample rate, which increases the size of the passband, which then introduces more artifacts, which is unintuitive -- as the presumption is that higher sample rates reduce unwanted artifacts.

[12:21]

Post

Dave_p wrote: Wed May 13, 2026 10:50 am
signalsmith wrote: Wed May 13, 2026 5:17 am
Complex-valued signals have a real and imaginary part. The simplest tone (mathematically) isn't a sine wave - it's a complex sinusoid which has constant amplitude and just changes phase over time.
Ah, does that imply that negative phase rotations on the complex plane emit the "imaginary part" and are "negative frequencies"?
Let's start with the assumption that our signals are actually complex and the "real signal" is just a special case.

Now, the complex sinusoid is exp(i*w*t) = cos(w*t)+i*sin(w*t).

Let's take the positive and negative frequencies:
exp(i*w*t) + exp(-i*w*t)
= cos(w*t) + i*sin(w*t) + cos(w*t) - i*sin(w*t) = 2*cos(w*t)!

So there's your real signal: it's the sum of positive and negative frequencies such that the imaginary parts cancel out. It works with any phase, but the cosine case just leads to the cleanest, easiest to understand formula.

So how do we make a frequency shifter? Well, if we make the filter complex as well, we can take the real signal and filter out the positive (or negative) frequencies, giving us back the imaginary part, so we have exp(i*w*t) again...

Then the shifting is trivial, because exp(i*a*t)*exp(i*b*t)=exp(i*(a+b)*t)... so you just compute a complex sinusoid and multiply the two signals together (and perhaps do another round of complex bandpass if you don't want aliasing.. but that's mostly for larger shift amounts). Finally, when you're done you'll just throw away the imaginary part (which mirrors the positive and negative frequencies again) and you're done.

There are some variations of how you can do this that are mathematically equivalent, but ... this is the basic idea.

Post Reply

Return to “DSP and Plugin Development”