Amplitude Modulation

The "1 +" in the formula brings the carrier back in.  Without it, you have the equation for ring modulation.

The formula for amplitude modulation is:

	e = A * ( 1 + Mi * cos( OmegaM * t ) ) * cos(OmegaC * t)

where           
	e = amplitude at time t
	Mi = Modulation index
	A = amplitude of the unmodulated carrier
	OmegaC = the radian frequency of the carrier
	OmegaA = the radian frequency of the modulating signal
	t = time

The "depth"  (or "intensity") of the modulation is controlled by the Modulation index:
		
	If Mi = 1, the amplitude of the carrier varies between 2 A and 0 
		(100% 	modulation).  
	If Mi = 1/2, the amplitude of the carrier varies between 1.5 A and 0.5 A 
		(50% modulation).  
	If Mi > 1, the envelope of the modulated signal is no longer sinusoidal in form, 		and the carrier is said to be overmodulated  
	
Carrier will always have an amplitude of A
The sidebands will each have an amplitude of A * Mi / 2.

Whether or not you have "overmodulation" depends on the PlayRange and the ration
of Carrier to Modulator.

The Mathematica formula for the above is:

AM[Amp_, Mi_, Carrier_, Modulator_, Duration_] :=
	Play[Evaluate[
		Amp * (1 + Mi * Cos[2 Pi Modulator t]) *
			Cos[2 Pi Carrier t]],
				{t,0,Duration},PlayRange->All]

Simple Amplitude Modulation (tremolo)

When the modulator is in the subaudio range (below 20 Hz), amplitude modulation produces what musicians call "tremolo".  The effect is most pronounced when the modulator is in the range from 6 to 9 Hz, and the modulation index is large (e.g., Mi = 1).

Here is an example of simple amplitude modulation:

	Amp = 1
	Mi = 1
	Carrier = 440 Hz
	Modulator = 6 Hz
	Duration = 2 seconds

AM[1, 1, 440, 6, 2]

Complex Amplitude Modulation

In complex amplitude modulation, the modulator is above 20 Hz, and there are three components present in the output:

	the carrier frequency
	the sum of the carrier and modulator frequencies
	the difference between the carrier and modulator frequencies
	
These sum and difference frequencies are called sidebands.

Here is an example of amplitude modulation:

	Amp = 1
	Mi = 1
	Carrier = 440  Hz
	Modulator = 500 Hz
	Duration = 2 seconds
	
The upper sideband has a frequency of 940 Hz (440 + 500) and the lower sideband has a frequency of 60 Hz (440-500):

AM[1, 1, 440, 500, 2]

Here is a different example in which the modulating frequency is continually changing, so that the sum and the difference frequencies are also continually changing:

	Amp = 1
	Mi = 1
	Carrier = 440  Hz
	Modulator = 500  * sin(t) Hz
	Duration = 2 seconds

AM[1, 1, 440, 500 * Sin[t], 2 Pi]

``Ring'' Modulation 
(Suppressed Carrier Modulation)

Ring modulation is a type of amplitude modulation in which only the sum and difference of the carrier and modulator are present, hence the name "suppressed carrier modulation".

RM[Amp_, Mi_, Carrier_, Modulator_, Duration_] :=
	Play[Evaluate[
		Mi * Amp / 2 * Cos[(2 Pi Carrier + 
			2 Pi Modulator) t] +
		Mi * Amp / 2 * Cos[(2 Pi Carrier - 
			2 Pi Modulator) t]],
			{t,0,Duration},PlayRange->All]

The name ``ring'' modulation comes from the electronic circuit originally used to generated the waveform, in which four diodes formed a ring, all ``pointing'' in the same direction.

Because neither the modulating frequency nor the carrier frequency appears directly in the spectrum, the spectrum of the sound is different from both.  For example, if 

	 Amp = 1
	Mi = 1
	 Carrier = 440 Hz 	
	Modulator = 261 Hz 
	Duration = 2

the resulting spectrum contains frequencies only at 179 Hz and 701 Hz, frequencies that are neither harmonically related to the originals, nor to each other.  

Both sidebands have amplitudes of one-half the modulating signal.

RM[1, 1, 440, 261, 2 ]

In this example, the modulating frequency is multiplied by sin[t], causing it to be continually changing, which, in turn, causes the sum and difference frequencies to be continually changing.

	Amp = 1
	Mi = 1
	Carrier = 440
	Modulator = 261 * sin(t)
	Duration = 6

RM[1, 1, 440, 261 * Sin[t], 6]

Complex Ring Modulation

Here, the ring modulation function is made into a two-channel function, in which Channel 1 is the same as above, but in Channel 2, the Cosine is multiplied by Duration - t, rather than t.  

Effectually, Channel 1 uses a value of t that increases, and Channel 2 uses a value of t that decreases.

Channel 1:
	Amp = 1
	Mi = 1
	Carrier = 440
	Modulator = 261 * sin(t)
	Duration = 6
	
Channel 2:
	Amp = 1
	Mi = 1
	Carrier = 440
	Modulator = 261 * sin(Duration - t)
	Duration = 6

RM2[Amp_, Mi_, Carrier_, Modulator_, Duration_] :=
	Play[{Evaluate[
		Mi * Amp / 2 * Cos[(2 Pi Carrier + 
			2 Pi Modulator) t] +
		Mi * Amp / 2 * Cos[(2 Pi Carrier - 
			2 Pi Modulator) t]],
		Evaluate[
		Mi * Amp / 2 * Cos[(2 Pi Carrier + 
			2 Pi Modulator) (Duration - t)] +
		Mi * Amp / 2 * Cos[(2 Pi Carrier - 
			2 Pi Modulator) (Duration - t)]]},
		{t,0,Duration},PlayRange->All]

RM2[1, 1, 440, 261 * Sin[t], 6]