## Wednesday, August 7, 2013

### Amplitude Modulation

I've got a new Statescape to post this weekend.  It relies heavily on amplitude modulation, as I'll explain in the post when I post it.  However, before I do that, I figured this would be a good time to dig into what amplitude modulation is, how it works, and what can be done with it.

So what is amplitude modulation?  Quite simply, it is what you are doing when you feed an LFO or other signal into the control input of a VCA: the amplitude of one signal (the control signal) is modulating the amplitude of another signal (the audio input to the VCA).  We do this all the time without thinking about it as "AM" as such.  However, most of the time, when we do this we are using very slow control signals -- well below audio frequencies.  Because of this, we don't usually hear the spectral artifacts that AM creates.  If we hear them at all, we hear them as a beating or phasing effect rather than as a separate tone.

However, we can use an audio-frequency signal as the carrier.  When we do, we find that we no longer hear the modulation as a variation of the output level of the carrier; what we hear instead is the carrier with the addition of "sideband" tones generated by the AM process.  Consider the simple case where the carrier and modulation are both sine waves.  What will be heard as the output of the AM process are three tones: a tone at the carrier frequency, and two sideband tones having frequencies which are, if the carrier frequency is CF and the modulation frequency is MF:

CF + MF
CF - MF

So if the carrier frequency is, say, 500 Hz, and the modulation frequency is 220 Hz, the two added tones will come out at 280 Hz and 720 Hz.  Obviously, these frequencies are not harmonically related to the carrier signal or to each other.  Such will usually be the case with AM; the generated tones will be inharmonic more often than not.  The audible effect is to produce sounds that are often described as bell-like, percussive, noisy, or just plain weird.  If the carrier and/or modulation are more complex signals with many harmonic overtones, each harmonic of the carrier will play off of each harmonic of the modulation and generate a pair of sideband tones.  The result becomes cluttered pretty quickly, which is why, when playing with AM, it is often better to start with harmonically simpler signals

(What, you might ask, happens if the carrier frequency is 220 Hz and the modulation is 500 Hz?  Well, the "negative frequency" values become aliased -- they come out as real tones, but with opposite phase.  In this example, we'd get a "real" frequency of 720 Hz and a "negative" frequency of -280 Hz.  The 280 Hz sideband will in fact be there, but it will have the opposite phase that it would have in the first example.)

In a conventional AM setup (as would be used by a radio station broadcasting an AM signal), an initial gain is assigned to the carrier and the modulation varies this gain by being added to or subtracted from it.  The sum or difference of the modulation and the initial gain is what modulates the carrier.  The effect of this is to set the output level of the carrier when there is no modulation.  The instantaneous value of the modulation increases or decreases the initial gain, depending on how the modulation wiring is set up.  Ring modulation is actually just a special case of amplitude modulation, in which the initial gain of the carrier is zero.  Those who have played with a proper ring modulator (one that has both carrier and modulation inputs) know that if you don't put anything into the modulation input, you get nothing out.  This is why.

The basic amplitude modulation equation is:

A = (IG + M) * C

where: M is the modulation signal, C is the carrier signal, IG is the initial gain for the carrier (or, to put it another way, the magnitude of the output when no modulation is present), and A is the amplitude-modulated output.   The multiplying of the carrier and modulation signals is a characteristic of all amplitude modulation methods.  Don't confuse this with the effect in the frequency domain (where the frequencies are added, as discussed above); in the time domain, the signals multiply.  As you can see, if the initial gain is zero, the computation reduces to a straight multiplication of the two signals, which is what ring modulation is.  You can also see another characteristic of ring modulation: the carrier and the modulation are interchangeable; switching the two inputs of a proper ring modulator will produce the same result.

Amplitude modulation can be easily accomplished in both the analog and digital domains.  In the digital world, if you have access to something that allows you to run formulas on samples, like Csound or Max/MSP, it's pretty easy as shown by the above equation.  In the analog domain, you need a "four quadrant" VCA or a ring modulator.  With the latter, you can set the initial gain (if desired) by using a voltage source and adding it to the modulation with a DC-enabled mixer.  (Note: This may not work with a diode-ring-type ring modulation circuit.  I don't have one to try it with, so I don't know.  It should work with most any four-quadrant VCA.)  Because of the creation of the inharmonic sideband tones, you want to keep the signals you use harmonically simple, because complex waveforms tend to deteriorate into undifferentiated noise pretty quickly.  Also be prepared to do some low-pass filtering to get rid of any excessively high frequency tones that are generated.