More on ring modulators and pitch shifters
Posted: Wed Sep 09, 2009 12:30 am
Background
A bit of the theory of ring modulation. The ring modulator takes two signals as input and outputs the sum and difference of those signals. For example, if you input signal x and signal y, then the ring mod outputs signal x+y and signal x-y.
Some basic examples of what a ring mod does:
Ex. x=220 Hz, y=30 Hz.
x+y = 250 Hz
x-y = 190 Hz
Ex. x=220 Hz, y=220 Hz
x+y = 440 Hz
x-y = 0 Hz
Ex. x=220 Hz, y=440 Hz
x+y = 660 Hz
x-y = -220 Hz, which we hear as 220 Hz
Sometimes, the output sounds in tune, sometimes not. It all depends on how the audio and carrier frequencies relate. Because of this, ring modulators can produce all sorts of interesting sounds.
Still with me?
Pitch-shifting the audio and using it as the carrier
I started thinking about what happens when the carrier signal is a pitch-shifted version of the original signal. What happens with the sums and differences then? Lots of interesting things, but it took a bit of head-scratching to think things through.
Part of my initial confusion is that ring modulation works by adding and subtracting frequencies, but pitch shifting works by multiplying frequencies. I had to refresh my memory about how to work with ratios.
Ex. x = x, y = x (the carrier is the same as the audio signal)
sum = x+x = 2x
difference = x-x = 0
This produces an output an octave above the audio signal.
Ex. x = x, y = (3/2)x (the carrier is pitch-shifted a fifth above the audio signal)
sum = x + (3/2)x = (5/2)x
difference = x - (3/2)x = -(1/2)x => (1/2)x
The sum works out to be a major third an octave above the audio signal. 5/2 is equivalent to 5/4 when octave reduced. 5/4 is the just intonated major third.
The difference frequency is half the audio signal frequency, which is simply an octave below the original audio signal.
Ex. x = x, y = 2x (the carrier is an octave above the audio signal)
sum = x+2x = 3x
difference = x-2x = -x, which we hear as x
The sum works out to be three times the frequency. This octave reduces to 3/2, which is a just intonated fifth. So, the sum frequency is an octave and a fifth above the audio signal.
The difference frequency is the same as the original audio signal.
Ex. x = x, y = (4/3)x (the carrier is a fourth above the audio signal)
sum = (7/3)x
difference = -(1/3)x, which we hear as (1/3)x
The sum signal octave reduces to (7/6)x, which is a just intonated minor third, an octave above the audio signal.
The difference is equivalent to a perfect fourth above, but is in the octave below the audio signal.
Conclusion
So, what is this all about? What this means is that if you have a ring mod and a pitch shifter, then you should be able to get some interesting results by pitch shifting the audio signal and using that as the carrier. It is a way to have a 'tracking ring mod,' with repeatable (and predictable) results. Using a bit of knowledge about how to add two frequencies and make sense of the result, you can figure out how the sums/differences of any pitch-shifted interval relate back to the original audio signal.
Bryan
A bit of the theory of ring modulation. The ring modulator takes two signals as input and outputs the sum and difference of those signals. For example, if you input signal x and signal y, then the ring mod outputs signal x+y and signal x-y.
Some basic examples of what a ring mod does:
Ex. x=220 Hz, y=30 Hz.
x+y = 250 Hz
x-y = 190 Hz
Ex. x=220 Hz, y=220 Hz
x+y = 440 Hz
x-y = 0 Hz
Ex. x=220 Hz, y=440 Hz
x+y = 660 Hz
x-y = -220 Hz, which we hear as 220 Hz
Sometimes, the output sounds in tune, sometimes not. It all depends on how the audio and carrier frequencies relate. Because of this, ring modulators can produce all sorts of interesting sounds.
Still with me?
Pitch-shifting the audio and using it as the carrier
I started thinking about what happens when the carrier signal is a pitch-shifted version of the original signal. What happens with the sums and differences then? Lots of interesting things, but it took a bit of head-scratching to think things through.
Part of my initial confusion is that ring modulation works by adding and subtracting frequencies, but pitch shifting works by multiplying frequencies. I had to refresh my memory about how to work with ratios.
Ex. x = x, y = x (the carrier is the same as the audio signal)
sum = x+x = 2x
difference = x-x = 0
This produces an output an octave above the audio signal.
Ex. x = x, y = (3/2)x (the carrier is pitch-shifted a fifth above the audio signal)
sum = x + (3/2)x = (5/2)x
difference = x - (3/2)x = -(1/2)x => (1/2)x
The sum works out to be a major third an octave above the audio signal. 5/2 is equivalent to 5/4 when octave reduced. 5/4 is the just intonated major third.
The difference frequency is half the audio signal frequency, which is simply an octave below the original audio signal.
Ex. x = x, y = 2x (the carrier is an octave above the audio signal)
sum = x+2x = 3x
difference = x-2x = -x, which we hear as x
The sum works out to be three times the frequency. This octave reduces to 3/2, which is a just intonated fifth. So, the sum frequency is an octave and a fifth above the audio signal.
The difference frequency is the same as the original audio signal.
Ex. x = x, y = (4/3)x (the carrier is a fourth above the audio signal)
sum = (7/3)x
difference = -(1/3)x, which we hear as (1/3)x
The sum signal octave reduces to (7/6)x, which is a just intonated minor third, an octave above the audio signal.
The difference is equivalent to a perfect fourth above, but is in the octave below the audio signal.
Conclusion
So, what is this all about? What this means is that if you have a ring mod and a pitch shifter, then you should be able to get some interesting results by pitch shifting the audio signal and using that as the carrier. It is a way to have a 'tracking ring mod,' with repeatable (and predictable) results. Using a bit of knowledge about how to add two frequencies and make sense of the result, you can figure out how the sums/differences of any pitch-shifted interval relate back to the original audio signal.
Bryan