Download - E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Transcript
Page 1: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

E85.2607: Lecture 10 – Modulation

E85.2607: Lecture 10 – Modulation 2010-04-15 1 / 19

Page 2: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Modulation

Modulation Use an audio signal to vary theparameters of a sinusoid

ymod[n] = m[n] cos (2πfcn + φ[n])

m[n], φ[n] modulating signals

cos(fcn) carrier signal with carrier freq. fc

Used for:

Transmitting radio signals

Tremolo, vibrato, other effects

Synthesizing complex harmonic series

Tremolo? •  When the modulating frequency is less than 20Hz this

produces a well known music effect called tremolo •  In musical terms: A regular and repetitive variation in

amplitude for the duration of a single note.

•  However when the modulation frequency is in the audible range, new sound textures can be created

FM synthesis •  Like in the case of AM, when the frequency variation is in the audible range

a timbre change is produced.

•  This modulation may be controlled to produce varied dynamic spectra with relative little computational overheads.

•  FM was well developed for radio applications in the 1930’s, and is nowadays the most widely used broadcast signal format for radio

•  Introduced as a tool for sound synthesis by John Chowning (Stanford U.) in the early 1970’s

•  1980s: Used by Yamaha to develop its DX series (The DX7 was to become one of the most popular synthesisers of all times) and the OPL chip series (soundblaster sound cards, mobile phones)

E85.2607: Lecture 10 – Modulation 2010-04-15 2 / 19

Page 3: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Ring modulation

yRM[n] = m[n] cos(2πfcn)

Shifts spectrum of modulating signal to be centered around fc

e.g. let m[n] = cos(2πfmn):

yRM[n] = cos(2πfmn) cos(2πfcn)

=1

2cos (2π(fc − fm)) + cos (2π(fc + fm))

Using trigonometric identity: cos(a± b) = cos(a) cos(b)∓ sin(a) sin(b)

x(n) y(n)

m(n)

USBLSB

0

|X(f)|

cf

(a)

f

c

(b)

USBLSB

fcf

|Y(f)|c

E85.2607: Lecture 10 – Modulation 2010-04-15 3 / 19

Page 4: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Ring modulationRing Modulation

freq

amp

fc

fc - fm fc + fm

E85.2607: Lecture 10 – Modulation 2010-04-15 4 / 19

Page 5: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Amplitude modulation

Like ring modulation, but with DC offset added to modulating signal

yAM[n] = (1 + αm[n]) cos(2πfcn)

Receiver (demodulator) is easier to build

e.g. let m[n] = cos(2πfmn):

yAM[n] = (1 + α cos(2πfmn)) cos(2πfcn)

= cos(2πfcn) +α

2cos (2π(fc − fm)) + cos (2π(fc + fm))

•  Thus its Fourier Transform is defined as:

Amplitude Modulation

E85.2607: Lecture 10 – Modulation 2010-04-15 5 / 19

Page 6: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Amplitude modulation

Amplitude Modulation

freq

amp

!c

!c - !m !c + !m

E85.2607: Lecture 10 – Modulation 2010-04-15 6 / 19

Page 7: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Amplitude modulation in the time domain

Demodulate using an envelope detector

= rectifier + LPF

or product detector

= coherent ring modulation + LPF

yAM [t] cos(2πfc)

= (1 + αm[n]) cos(2πfcn) cos(2πfcn)

= (1 + αm[n])

(1

2+

1

2cos(2π2fcn)

)

Also works for ring modulation

Amplitude modulation •  Amplitude modulation (AM) is a form of modulation in which the

amplitude of a carrier wave is varied in direct proportion to that of a modulating signal.

E85.2607: Lecture 10 – Modulation 2010-04-15 7 / 19

Page 8: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Effect of modulation index (α)

Modulation index

E85.2607: Lecture 10 – Modulation 2010-04-15 8 / 19

Page 9: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Single Sideband (SSB) modulation

AM and RM waste bandwidth (and power) in redundant sidelobes

Single-sideband modulation

m(t)

sin!ct

cos!ct

s(t)

|H(j!)|

!

1

"H(j!)

!

#/2

-#/2

90° phase-shift s1(t)

s2(t)

Single-sideband modulation M(!)

!

1

S1(!)

!

--1/2

!c -!c

S2(!)

!

--1/2

!c -!c

S (!)

!

--1

!c -!c

With changes of !c the spectrum of m(t) will be shifted accordingly, so SSB modulation is also known as frequency shifting

E85.2607: Lecture 10 – Modulation 2010-04-15 9 / 19

Page 10: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Angle modulation

yPM/FM[n] = cos(2πfcn + β φPM/FM[n])

φPM[n] = m[n]

φFM[n] = 2π

∫ n

−∞m[τ ] dτ

Looks like phase is being modulated, but they’re really the same

instantaneous frequency = ∂∂n (2πfcn + βφ[n])

(“FM” often used to refer to phase modulation)

0 200 400 600 800 1000−2

−1

0

1

2

x FM(n

) and

m(n

)

(a) FM

n !0 200 400 600 800 1000

−2

−1

0

1

2

x PM(n

) and

m(n

)

(b) PM

n !

0 200 400 600 800 1000−2

−1

0

1

2

x FM(n

) and

m(n

)

(c) FM

n !0 200 400 600 800 1000

−2

−1

0

1

2

x PM(n

) and

m(n

)

(d) PM

n !

0 100 200 300 400 500 600 700 800 900 1000−2

−1

0

1

2

x FM(n

) and

m(n

)

(e) FM

n !

0 100 200 300 400 500 600 700 800 900 1000−2

−1

0

1

2

x PM(n

) and

m(n

)

(f) PM

n !

E85.2607: Lecture 10 – Modulation 2010-04-15 10 / 19

Page 11: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

FM vs PM0 200 400 600 800 1000−2

−1

0

1

2

x FM(n

) and

m(n

)

(a) FM

n !0 200 400 600 800 1000

−2

−1

0

1

2

x PM(n

) and

m(n

)

(b) PM

n !

0 200 400 600 800 1000−2

−1

0

1

2

x FM(n

) and

m(n

)

(c) FM

n !0 200 400 600 800 1000

−2

−1

0

1

2

x PM(n

) and

m(n

)

(d) PM

n !

0 100 200 300 400 500 600 700 800 900 1000−2

−1

0

1

2

x FM(n

) and

m(n

)

(e) FM

n !

0 100 200 300 400 500 600 700 800 900 1000−2

−1

0

1

2

x PM(n

) and

m(n

)

(f) PM

n !

0 200 400 600 800 1000−2

−1

0

1

2

x FM(n

) and

m(n

)

(a) FM

n !0 200 400 600 800 1000

−2

−1

0

1

2

x PM(n

) and

m(n

)

(b) PM

n !

0 200 400 600 800 1000−2

−1

0

1

2

x FM(n

) and

m(n

)

(c) FM

n !0 200 400 600 800 1000

−2

−1

0

1

2

x PM(n

) and

m(n

)

(d) PM

n !

0 100 200 300 400 500 600 700 800 900 1000−2

−1

0

1

2

x FM(n

) and

m(n

)

(e) FM

n !

0 100 200 300 400 500 600 700 800 900 1000−2

−1

0

1

2

x PM(n

) and

m(n

)

(f) PM

n !

E85.2607: Lecture 10 – Modulation 2010-04-15 11 / 19

Page 12: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Implementing angle modulation

Mx(n)

z- (M + frac)

symbol

m(n)

y(n)x(n)

m(n)=M + fracInterpolation

y(n)

frac

x(n-M) x(n-(M+1) x(n-(M+2)

Just index into carrier using time-varying delay

Interpolate as necessary

E85.2607: Lecture 10 – Modulation 2010-04-15 12 / 19

Page 13: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Effects: Tremolo

Modulate amplitude of audio signal with low frequency sinusoid

0 1000 2000 3000 4000 5000 6000 7000 8000 9000−0.5

0

0.5x(

n)Low−frequency Amplitude Modulation (fc=20 Hz)

0 1000 2000 3000 4000 5000 6000 7000 8000 9000−1

0

1

2

y(n)

and

m(n

)

0 1000 2000 3000 4000 5000 6000 7000 8000 9000−0.5

0

0.5

1

1.5

y(n)

and

m(n

)

n !

90°

90°

x(n)

m(n)

LSB(n)

USB(n)

fc

USB

f f

fc

LSB

f f

x̂(n)

m̂(n)

|USB(f)|

|LSB(f)|

CF

CF-

E85.2607: Lecture 10 – Modulation 2010-04-15 13 / 19

Page 14: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

More effects

Vibrato modulate phase of audio signal with low frequency sinusoid

x(n) y(n)

m(n)=M+DEPTH.sin( nT)!

z-(M+frac)

90°

x(n)

cos( n)!m

y (n)R

y (n)LAll-pass 1

All-pass 2

-

Detuning SSB modulation to shift spectrum up or down in frequency

E85.2607: Lecture 10 – Modulation 2010-04-15 14 / 19

Page 15: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Applications: synthesizing notes

AM synthesis change carrier frequency to change pitch

e.g. simple synthesizer with 3 harmonics by modulatingsinusoidal carrier with sinusoidal signal:

(1 + cos(2πfmn)) cos(2πfcn)

easy to implementbut, limited timbral possibilities . . .

FM synthesis produce spectrally rich sounds with minimal effort

cos(2πfcn + β sin(2πfmn))

need integer fcfm

to make harmonic sounds

sidebands at fc ± kfm

introduced by John Chowning at Stanford in early 1970scommercialized by Yamaha in the 1980s (DX7)

E85.2607: Lecture 10 – Modulation 2010-04-15 15 / 19

Page 16: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

FM modulation index

y [n] = cos(2π 220 n + β sin(2π 440 n))

Modulation index

Time-domain Frequency-domain FM signals theoretically have infinite bandwidth∼ 2(β + 1) audible sidebands

E85.2607: Lecture 10 – Modulation 2010-04-15 16 / 19

Page 17: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Note dynamics

Real notes are time-limited

struck/plucked vs. bowed/blown

E4896 Music Signal Processing (Dan Ellis) 2010-02-08 - /16

3. Envelopes• Notes need to be limited in time

simple gating not enoughamplitude envelope

• Different (real) instruments have clear variations in envelopestruck/plucked vs. bowed/blown

10

simulate using ADSR envelope

E4896 Music Signal Processing (Dan Ellis) 2010-02-08 - /16

ADSR• 4-parameter classic envelope model

Attack - initial rise time

Decay - fall time immediately following initial attack

Sustain - amplitude of asymptote of decaywhile key is held down

Release - decay from sustain to zero after key released

11

Tobi

as R

. - M

etoc

E85.2607: Lecture 10 – Modulation 2010-04-15 17 / 19

Page 18: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Toward more realistic synthesis

Amplitude modulation alone is not enough

real instruments have time-varying spectrae.g. plucked string

E4896 Music Signal Processing (Dan Ellis) 2010-02-08 - /16

4. Filtering• Amplitude modulation alone is not enough

real instruments have time-varying spectrae.g. plucked string

• Generally just LPF (+ resonance)high frequencies die away after initial transientresonance can give some BPF effect

13

Model using LPF

high frequencies die away after initial transient

Or just model the physics...

E85.2607: Lecture 10 – Modulation 2010-04-15 18 / 19

Page 19: E85.2607: Lecture 10 -- Modulation - Columbia Universityronw/adst-spring2010/lectures/lecture10.pdfRing modulation Ring Modulation freq amp f c f c -f m f c + f m E85.2607: Lecture

Reading

DAFX Chapter 4 - Modulators and Demodulators

E85.2607: Lecture 10 – Modulation 2010-04-15 19 / 19