Digital Sound & Music: Concepts, Applications, & Science, Chapter 6, last updated 6/25/2013
53
AM = c.*(1.0 + m);
plot(m(1:10000));
axis([0 10000 -2 2]);
figure;
plot(c(1:10000));
axis([0 10000 -2 2]);
figure;
plot(AM(1:10000));
axis([0 10000 -2 2]);
wavplay(c, 44100);
wavplay(m, 44100);
wavplay(AM, 44100);
This yields the following graphs:
440 Hz carrier wave
10 Hz modulator wave
result of amplitude modulation
Figure 6.49 Amplitude modulation using two sinusoidals
If you listen to the result, you'll see that amplitude modulation creates a kind of tremolo effect.
The same process can be accomplished with more complex waveforms. HornsE04.wav
is a 132,300-sample audio clip of horns playing, at a sampling rate of 44,100 Hz. Below, we
shape it with a 440 Hz cosine wave (Figure 6.50).
N = 132300;
r = 44100;
c = wavread('HornsE04.wav');
n = [1:N];
m = sin(2*pi*10*n/r);
m = transpose(m);
AM2 = c .* (1.0 + m);
figure;
plot(c);
Previous Page Next Page