ELEN E4896 MUSIC SIGNAL PROCESSING Lecture 2: …E4896 Music Signal Processing ... acoustic...
Transcript of ELEN E4896 MUSIC SIGNAL PROCESSING Lecture 2: …E4896 Music Signal Processing ... acoustic...
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
Lecture 2:Acoustics
Dan EllisDept. Electrical Engineering, Columbia University
[email protected] http://www.ee.columbia.edu/~dpwe/e4896/1
1. Acoustics, Sound & the Wave Equation2. Musical Oscillations3. The Digital Waveguide
ELEN E4896 MUSIC SIGNAL PROCESSING
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
1. Acoustics & Sound• Acoustics is the study of physical waves
• Waves transfer energy without permanent displacement of matter
• Common math for different mediagas, liquid, solid, EM
• Intuition: Pulse going down a rope
2
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
The Wave Equation• For 1-D medium with displacement :
simple to derive from freshman physics...
3
c2 �2y
�x2=
�2y
�t2
y(x, t)
curvature acceleration
x
y
y(0,t) = m(t)
y+(x,t) y(L,t) = 0
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
The Wave Equation
• Solution:
sum of leftward-moving and rightward-movingtraveling wavesshape does not change (set by initial conditions)
4
y(x, t) = y+(x� ct) + y�(x + ct)y+ y�
y
x
y+
y-
y(x,t)= y++y-
c
c
c2 �2y
�x2=
�2y
�t2
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
Terminations & Reflections• Boundary conditions include fixed points
e.g. held ends of string
• Superposition of traveling waves must match constraintshence reflections
• Any impedance changeresults in some reflection
5
x = L
y(x,t)= y+ + y–
y+
y–
http://www.youtube.com/watch?v=YOi8suJTwx8#t=1m35s
energy loss...
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
1-D Waveguides• Plucked/struck string
guitar, piano ...
• Acoustic tubee.g. clarinet or trumpetvocal tract
• Solid barxylophone, ...
6
L
tension S mass/length ε
ω2 = π2 S
L2 ε
x
pressure
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
2. Musical Oscillations• (Pseudo) periodic oscillation
is central to musical pitch
• Musical instruments create pitch in different ways...
7
Time
Frequency
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50
1000
2000
3000
4000
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
Simple Harmonic Motion• Basic 2nd order mechanical oscillation
resonance
• Spring + mass + dampere.g. tuning fork
• Not great as a musical instrumentonly fundamental ⇒ low amplitude
8
x = ��2x x = A cos(�t + �)
m
x
F = kx
ζ ω2 = k m
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
Relaxation Oscillator• Alternating states
‘closed state’ collects energy from steady source‘open state’ releases energy, then reverts to closed
• e.g. Vocal folds
• Oscillation period depends on tensioneasy to adjusthard to keep stable
9
p u
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
Strings• Canonical wave equation example
guitar (plucked)piano (struck)violin (bowed ...)
• Control of periodvary length L (frets)vary tension S and/or length L (piano)
• Initial conditions = excitation
10
L
tension S mass/length ε
ω2 = π2 S
L2 ε
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
Air Column• Wave equation in air
pressure waves traveling in tuberesonance of tube depends on lengthcoupled energy input
• Clarinet, oboe, organ, flutefinger holes disrupt waveguide (scattering)first reflection determines oscillation period
11
U0 ejωt
kx = π x = λ / 2
pressure = 0 (node) vol.veloc. = max
(antinode)
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
3. Digital Waveguides• 1-D waveguide is easily discretized
spatial sampling ⇔ time sampling
waveguide ➝ delay linescattering ➝ low-pass feedbackfinal load ➝ instrument body resonancesnonlinear function for energy inputhttps://ccrma.stanford.edu/~jos/wg.html
12
energy
nonlinear element
scattering junction (tonehole)
(quarter wavelength)
acoustic waveguide
ω = π c 2 L
Julius Smith, 1992...
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
Digital Waveguides• Direct physical model + simplifications
13
Delay z-L
L = SR/f0Initialize with random values
Initialize with pluck shape
Delay Lines
y+(x,t)
y-(x,t)
-1
-1
y+(0,t) = –y-(0,t)
y-(L,t) = hreflec(t) * y+(L,t)
s(t)
s(t)
hLP
hreflec
String WaveguideNut Bridge dispersion+ radiation load
Karplus-Strong
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
Waveguide Simulation• Karplus-Strong Plucked String algorithm
• Direct implementation of traveling waves
14
Delay z-L
L = SR/f0Lowpass
Initialize with random values
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
Karplus-Strong in Pd• Pd’s delwrite~ / delread~ implement the
delay line
15
http://blog.loomer.co.uk/2010/02/karplus-strong-guitar-string-synthesis.html
E4896 Music Signal Processing (Dan Ellis) 2013-01-28 - /16
Summary• Wave equation:
Simple physics leads to oscillations
• Musical acoustics:Different ways to control steady tones
• Digital waveguides:Natural, efficient simulation of tones
16