Music 206: Digital Waveguides

Similar documents
CMPT 889: Lecture 8 Digital Waveguides

Lecture 3: Acoustics

Lecture 2: Acoustics. Acoustics & sound

Chapter 15. Mechanical Waves

General Physics I. Lecture 14: Sinusoidal Waves. Prof. WAN, Xin ( 万歆 )

PHYSICS 149: Lecture 24

Chapter 11 Vibrations and Waves

PHY 103: Standing Waves and Harmonics. Segev BenZvi Department of Physics and Astronomy University of Rochester

Sound Waves. Sound waves are longitudinal waves traveling through a medium Sound waves are produced from vibrating objects.

Content of the course 3NAB0 (see study guide)

AP PHYSICS 1 BIG IDEAS AND LEARNING OBJECTIVES

16 SUPERPOSITION & STANDING WAVES

Chap 11. Vibration and Waves. The impressed force on an object is proportional to its displacement from it equilibrium position.

CMPT 889: Lecture 9 Wind Instrument Modelling

Phys101 Lectures 28, 29. Wave Motion

(Total 1 mark) IB Questionbank Physics 1

CHAPTER 11 TEST REVIEW

Oscillation the vibration of an object. Wave a transfer of energy without a transfer of matter

Let s Review What is Sound?

Course Name: AP Physics. Team Names: Jon Collins. Velocity Acceleration Displacement

Producing a Sound Wave. Chapter 14. Using a Tuning Fork to Produce a Sound Wave. Using a Tuning Fork, cont.

Sound, acoustics Slides based on: Rossing, The science of sound, 1990, and Pulkki, Karjalainen, Communication acoutics, 2015

Vibrations of string. Henna Tahvanainen. November 8, ELEC-E5610 Acoustics and the Physics of Sound, Lecture 4

Superposition and Standing Waves

CLASS 2 CLASS 2. Section 13.5

Physics 142 Mechanical Waves Page 1. Mechanical Waves

Scattering. N-port Parallel Scattering Junctions. Physical Variables at the Junction. CMPT 889: Lecture 9 Wind Instrument Modelling

Chapter 16: Oscillations

Exam tomorrow on Chapter 15, 16, and 17 (Oscilla;ons and Waves 1 &2)

Cylinder with Conical Cap

G r a d e 1 1 P h y s i c s ( 3 0 s ) Final Practice exam

MUS420 Lecture Mass Striking a String (Simplified Piano Model)

4. What is the speed (in cm s - 1 ) of the tip of the minute hand?

Chapter 11. Vibrations and Waves

Class Average = 71. Counts Scores

Music 206: Modeling Acoustic Tubes and Wind Instrument Bores/Bells

Ideal String Struck by a Mass

Chapter 16 Traveling Waves

Chapter 16 Mechanical Waves

1. Types of Waves. There are three main types of waves:

Work. Work and Energy Examples. Energy. To move an object we must do work Work is calculated as the force applied to the object through a distance or:

Smith, Kuroda, Perng, Van Heusen, Abel CCRMA, Stanford University ASA November 16, Smith, Kuroda, Perng, Van Heusen, Abel ASA / 31

Wave Equation in One Dimension: Vibrating Strings and Pressure Waves

Wave Motions and Sound

AP Physics 1 Multiple Choice Questions - Chapter 9

Chapter 15 Mechanical Waves


2016 AP Physics Unit 6 Oscillations and Waves.notebook December 09, 2016

Chapter 16: Oscillatory Motion and Waves. Simple Harmonic Motion (SHM)

Lecture 4 Notes: 06 / 30. Energy carried by a wave

Physics 111. Lecture 31 (Walker: ) Wave Superposition Wave Interference Standing Waves Physics of Musical Instruments Temperature

Oscillations and Waves

Exam 3 Review. Chapter 10: Elasticity and Oscillations A stress will deform a body and that body can be set into periodic oscillations.

Oscillations - AP Physics B 1984

1) The K.E and P.E of a particle executing SHM with amplitude A will be equal to when its displacement is:

THE SYRINX: NATURE S HYBRID WIND INSTRUMENT

LECTURE 5 WAVES ON STRINGS & HARMONIC WAVES. Instructor: Kazumi Tolich

CHAPTER 11 VIBRATIONS AND WAVES

Standing Waves If the same type of waves move through a common region and their frequencies, f, are the same then so are their wavelengths, λ.

Chapter 9. Electromagnetic Waves

kg meter ii) Note the dimensions of ρ τ are kg 2 velocity 2 meter = 1 sec 2 We will interpret this velocity in upcoming slides.

Waves Part 3A: Standing Waves

Old Exams - Questions Ch-16

Written homework due in class on Monday Online homework due on Tuesday by 8 am

1 f. result from periodic disturbance same period (frequency) as source Longitudinal or Transverse Waves Characterized by

Chapter 13. Hooke s Law: F = - kx Periodic & Simple Harmonic Motion Springs & Pendula Waves Superposition. Next Week!

A body is displaced from equilibrium. State the two conditions necessary for the body to execute simple harmonic motion

Waves Encountering Barriers

General Physics (PHY 2130)

Chapter 17. Superposition & Standing Waves

13.3 Interference and Superposition. Interference and Superposition Constructive Interference Destructive Interference Standing Waves

The velocity (v) of the transverse wave in the string is given by the relation: Time taken by the disturbance to reach the other end, t =

General Physics (PHY 2130)

Physics 121H Fall Homework #15 23-November-2015 Due Date : 2-December-2015

Downloaded from

Music 170: Quantifying Sound

Unit 4 Parent Guide: Waves. What is a wave?

Physics 1. and graphical representations. Express the motion of an object using narrative, mathematical,

Oscillatory Motion and Wave Motion

Physics 101 Lecture 18 Vibrations, SHM, Waves (II)

NYS STANDARD/KEY IDEA/PERFORMANCE INDICATOR 5.1 a-e. 5.1a Measured quantities can be classified as either vector or scalar.

-Electromagnetic. Waves - disturbance that propagates through space & time - usually with transfer of energy -Mechanical.

Physics General Physics. Lecture 25 Waves. Fall 2016 Semester Prof. Matthew Jones

Chapter 16 Waves in One Dimension

42 TRAVELING WAVES (A) (B) (C) (D) (E) (F) (G)

f 1/ T T 1/ f Formulas Fs kx m T s 2 k l T p 2 g v f

Chapter 14: Wave Motion Tuesday April 7 th

Physical Modeling Synthesis

Marketed and Distributed By FaaDoOEngineers.com

Physics 6b Winter 2015 Final Campagnari Section Test Form D

Physics 6b Winter 2015 Final Campagnari Section Test Form A

THE WAVE EQUATION. F = T (x, t) j + T (x + x, t) j = T (sin(θ(x, t)) + sin(θ(x + x, t)))

THE SYRINX: NATURE S HYBRID WIND INSTRUMENT

Section 1 Simple Harmonic Motion. Chapter 11. Preview. Objectives Hooke s Law Sample Problem Simple Harmonic Motion The Simple Pendulum

-Electromagnetic. Waves - disturbance that propagates through space & time - usually with transfer of energy -Mechanical.

single uniform density, but has a step change in density at x = 0, with the string essentially y(x, t) =A sin(!t k 1 x), (5.1)

UNIVERSITY OF SASKATCHEWAN Department of Physics and Engineering Physics

SIMPLE HARMONIC MOTION AND WAVES

Energy stored in a mechanical wave

Section 1 Simple Harmonic Motion. The student is expected to:

Transcription:

Music 206: Digital Waveguides Tamara Smyth, trsmyth@ucsd.edu Department of Music, University of California, San Diego (UCSD) January 22, 2016 1

Motion for a Wave The 1-dimensional digital waveguide model is a discrete-time solution to the 1-dimensional wave equation. To derive the equation for the transverse displacement wave on a string, consider a small section of a string with mass m = µ x, where µ is the mass per unit length. θ 2 T y θ 1 x T The net vertical force on this section is the difference between the y components of the tension T 1 : F n = T sinθ 2 T sinθ 1. 1 Tension is the magnitude of the force due to stretching the string Music 206: Digital Waveguides 2

Newton s Law The slope of the string at each end of the section is given by m 1 = y 1 x = tanθ 1 m 2 = y 2 x = tanθ 2 If the displacement of the string from equilibrium is small, then angles θ 1 and θ 2 are small, and sinθ 1 tanθ 1 and sinθ 2 tanθ 2 The net vertical force can therefore be written as F n = T sinθ 2 T sinθ 1 = T (m 2 m 1 ) = T m. By Newton s second law, F = ma, ( 2 ) y T m = (µ x) t 2 T m x = µ 2 y t 2, where acceleration is given by a = 2 y/ t 2. Music 206: Digital Waveguides 3

The 1-D wave equation Taking the limit as x 0 m lim x 0 x = m x = 2 y x 2, we obtain the one-dimensional wave equation given by 2 y t = y 2 c2 2 x 2, where c = T/µ is the speed of wave propagation. Music 206: Digital Waveguides 4

Travelling Wave Solution The general class of solutions to the lossless, one-dimensional, second-order wave equation can be expressed as where y(t,x) = y r ( t x c ( )+y l t+ x ). c y r (t x/c) right-going traveling waves y l (t+x/c) left-going traveling waves and where y r and y l are assumed twice-differentiable. This traveling-wave solution of the wave equation was first published by d Alembert in 1747. Notice the traveling-wave solution of the 1-D wave equation has replaced a function of two variables y(t,x), by two functions of a single variable in time units 2, greatly reducing computational complexity. 2 If x is in meters and sound velocity c is in meters per second, x/c is in seconds and the spatial variable x cancels out. Music 206: Digital Waveguides 5

Sampled Travelling Waves Sampling is carried out by the change of variables x x m = mx t t n = nt, where T is the temporal sampling interval, and X ct, is the spatial sampling interval Substituting into the traveling-wave solution yields y(t n,x m ) = y r (t n x m /c)+y l (t n +x m /c) = y r (nt mx/c)+y l (nt +mx/c) = y r [(n m)t]+y l [(n+m)t] Since T multiplies all arguments it is typically suppressed. This notation is also used to model pressure in acoustic tubes. Music 206: Digital Waveguides 6

Traveling Waves A traveling wave is any kind of wave that propagates in a single direction with negligible change in shape. A delayline (pure delay) can model wave propagation with a fixed waveshape in 1-D. Transverse and longitudinal waves 3 in a vibrating string are nearly perfect traveling waves. Plane waves are a class of traveling wave that dominate in cylindrical bores (bore of clarinet, cylindrical tube segments in trumpet). Spherical waves take the place of plane waves in conical tubes. Because they travel like plane waves, they are still modeled with a delay line. 3 Recall, transverse and longitudinal waves are waves in which the partical displacement is perpendicular and parallel, respectively, to the direction of the traveling wave. Music 206: Digital Waveguides 7

Damped Travelling Waves When travelling waves are damped, their losses are distributed along the length of the system. Rather than applying losses at each time-step, they may be accumulated, or lumped, at discrete points along the delay line. If the losses are the same for each frequency, they may be simulated using a simple scaling of the delay line input or output. x(n) z M g M y(n) If losses are frequency dependent they are implemented using a digital filter G(z) with the corresponding frequency response. x(n) z M G M (z) y(n) The input-output simulation is exact, while the signal samples inside the delay line have a slight gain error. If the internal signals are needed later, they can be tapped out using correcting gains relative to the tapping location. Music 206: Digital Waveguides 8

Losses due to spherical spreading In a spherical pressure wave of radius r, the energy of the wavefront is spread out over surface area 4πr 2. The intensity of an expending sphererical wave decreases as 1/r 2. This spherical spreading loss, exemplifies an inverse square law. Sound pressure amplitude of a traveling wave is proportional to the square-root of its energy/intensity, leading to an amplitude proportional to 1/r for spherical traveling waves. x(n) z M 1/r y(n) Though delay lines may be used for spherical waves of radius r, there is a gain of 1/r applied to the output/input. Waves propagating a distance r 0 from the cone apex to a disance r 1 from the cone apex, will experience a pressure scaling of r 0 /r 1. Music 206: Digital Waveguides 9

Converting Propagation Distance to Delay Length We may regard the delay-line memory itself as the fixed air that propagates sound samples at a fixed speed c. The number of delay samples is the propagation distance divided by the distance sound propagates in one sample. If the listening point is d meters away from the source, then the delay line length M needs to be M = d X = d ct samples. Music 206: Digital Waveguides 10

Reflection of Spherical or Plane Waves When a wave reaches a wall or other obstacle, it is either reflected or scattered: reflection occurs when the surface is flat for plane waves, or curve with the appropriate radius (for spherical waves); scattering occurs when the surface has variations on the scale of the spatial wavelength; Absorption In air, there is always significant additional (frequency-dependent) loss caused by air absorption. Wave propagation in vibrating strings undergoes an analogous absorption loss, as does the propagation of nearly every other kind of wave in the physical world. Music 206: Digital Waveguides 11

Reflection at a Fixed End of String Consider the displacement of a string at the boundary x = 0: y = y r (t 0/c)+y l (t+0/c) = y r (t)+y l (t). If fixed, it s displacement y is zero: y r (t)+y l (t) = 0 y r (t) = y l (t). the reflected wave is equal but opposite to the right traveling wave. See animation: Reflection from a fixed boundary Music 206: Digital Waveguides 12

Reflection at a Free End of the String At x = 0, if a string is free there is no transverse force. Net transverse force is proportional to the slope y/ x: y x = x y r(t x/c)+ x y l(t+x/c) = 1 c [y l(t+0/c) y r (t 0/c)] = 0 y r (t) = y l (t). The reflected wave is equal to the incident wave with no change of sign. See animation: Reflection from a free boundary Music 206: Digital Waveguides 13

Standing Waves Reflection causes destructive and constructive interference, leading to standing waves. Standing Waves: created by the sum or right and left traveling waves: standing wave animation it is a pattern of alternating nodes and antinodes nodes and antinodes animation the fundamental mode of oscillation, is determined by the shortest node-antinode pattern. Standing waves created from a fixed boundary: animation of standing waves, fixed Standing waves created from a free boundary: animation standing waves, free Music 206: Digital Waveguides 14

Guitar String The guitar string is fixed at both ends therefore it has a node at both ends. Figure 1: Standing waves on a guitar string. For each harmonic number n, The wavelength is λ n = 2 n L. The fundamental frequency is f n = c = n c λ n 2L = nf 1. Music 206: Digital Waveguides 15

Wave Impedance The wave impedance represents the medium s resitance to distortion in the presence of an external force; a characteristic of the medium in which a wave propagates and given by: Z = F v = p U, For solids, v particle velocity; p = F/A acoustic pressure; U = v/a volume velocity (airflow); A medium cross-sectional area. Z 0 = ρc, where ρ is the density of the material. For gases in cylindrical tubes with a cross sectional area of A, Z 0 = ρc A. Music 206: Digital Waveguides 16

Reflection due to Change of Impedance It is possible to have a boundary which is neither completely fixed nor completely free. When a wave traveling in a medium with impedance Z 1 confronts a new medium with impedance Z 2, incident wave will be partially reflected; amplitude and polarity of reflected wave dependent on the impedance of the two mediums. medium 1 (Z 1 ) incident wave medium 2 (Z 2 ) transmitted wave x = 0 reflected wave x = J What is not reflected at the boundary is transmitted through to the new medium. Music 206: Digital Waveguides 17

Boundary Conditions medium 1 (Z 1 ) incident wave medium 2 (Z 2 ) transmitted wave x = 0 reflected wave x = J The pressure and velocity at the junction must be equal (continuity they are shared by both mediums). The pressure at the junction is given by p(j) = p i (J)+p r (J), p i (J) the indicident wave at the junction p r (J) the reflected wave at the junction. The incident and reflected pressure waves correspond to incident and reflected airflow U by p i (J) = Z 1 U i (J) and p r (J) = Z 1 U r (J), the negative sign accounts for the fact that airflow is a directional quantity and moves in the direction in which it generates pressure. Music 206: Digital Waveguides 18

Volume Velocity at Junction Volume velocity at the junction is the sum of the incident and reflected velocity waves: U(J) = U i (J)+U r (J). Incorporating the result for the incident pressure wave: p i (J) = Z 1 U i (J), and reflected pressure wave: p r (J) = Z 1 U r (J), volume velocity at the junction is U(J) = 1 Z 1 (p i (J) p r (J)). Music 206: Digital Waveguides 19

Calculating reflection coefficient (pressure) The new medium at the junction has impedance Z 2 = p(j) U(J) p i (J)+p r (J) = (p i (J) p ( r (J))/Z 1 ) pi (J)+p r (J) = Z 1. p i (J) p r (J) This result can be used to calculate the reflection coefficient p r /p i : p i +p r Z 1 = Z 2 p i p r Z 1 (p i +p r ) = Z 2 (p i p r ) p r (Z 2 +Z 1 ) = p i (Z 2 Z 1 ) p r = Z 2 Z 1. p i Z 2 +Z 1 Music 206: Digital Waveguides 20

Calculating reflection coefficient (velocity) Likewise, the new impedance Z 2 may be given in terms of velocity components Z 2 = p(j) U(J) = Z U i (J) U r (J) 1 U i (J)+U r (J) The reflection coefficient is calculated as: U i U r Z 1 = Z 2 U i +U r Z 1 (U i U r ) = Z 2 (U i +U r ) U i (Z 1 Z 2 ) = U r (Z 1 +Z 2 ) U r = Z 1 Z 2. U i Z 1 +Z 2 Music 206: Digital Waveguides 21

Applying to Reflections on String Consider a string free at one end (Z 2 = 0). Using displacement velocity as the wave variable: v r v i = Z 1 Z 2 Z 1 +Z 2 = Z 1 Z 1 = 1, reflected velocity wave = incident velocity wave. The total velocity at the junction (boundary) is v = v i +v r = v i +v i = 2v i. If the string is fixed at one end, new impedance approaches infinity (Z 2 Z 1 ): v r v i = Z 1 Z 2 Z 1 +Z 2 Z 2 Z 2 = 1, where Z 1 is considered to be negligible. The velocity at the boundary is therefore v = v i +v r = v i v i = 0. Music 206: Digital Waveguides 22

Applying to Reflection in a Tube Recall that impedance for air in a confined space is inversely proportional to it s area (the smaller the area, the larger the impedance). For a tube open at one end assume the wave impedance of open air is negligible to that of the tube cylindrical section: the reflection coefficient for pressure at an open end is p r = Z 2 Z 1 = Z 1 = 1. p i Z 2 +Z 1 Z 1 For a tube closed at one end assume an infinitely small radius and a corresponding wave impedance Z 2 that is very large relative to Z 1 : p r p i = Z 2 Z 1 Z 2 +Z 1 = Z 2 Z 2 = 1. Music 206: Digital Waveguides 23

Wave Variables Displacement, velocity and acceleration waves all reflect with the same polarity: r x,v,a = Z 1 Z 2 Z 1 +Z 2. Force and pressure waves however, reflect with an opposite polarity: r f,p = Z 2 Z 1 Z 2 +Z 1. Music 206: Digital Waveguides 24

The Plucked String When a string is plucked, the finger chooses a point on the string and then displaces it a certain distance. Plucking a string therefore, introduces an initial energy displacement (potential energy). The shape of the string before its release defines which harmonics will be present in the resulting motion. A string plucked at 1/n th the distance from one end will not have energy at multiples of the n th harmonic. The strength of excitation of the m th vibrational mode is inversely proportional to the square of the mode number. A simple example is demonstrated by plucking the string exactly midway between its endpoints. In so doing, we have created a sort of triangle wave, with its corresponding harmonics. Music 206: Digital Waveguides 25

Figure 2: The motion of a string plucked one-half of the distance from one end. Music 206: Digital Waveguides 26

String Spectrum Figure 3: Spectrum of a string plucked one-half of the distance from one end. Music 206: Digital Waveguides 27

Pluck position Take for example the motion of a string plucked one-fifth of the distance from the end. Figure 4: The motion of a string plucked one-fifth of the distance from one end. The motion can be thought of as two pulses moving in opposite directions (see the dashed line). The resulting motion consists of two bends, one moving clockwise and the other counterclockwise around a parallelogram. Music 206: Digital Waveguides 28

Resulting Plucked String Spectrum The resulting spectrum of the string plucked one-fifth of the distance from one end is given below. Figure 5: Spectrum of a string plucked one-fifth of the distance from one end. Music 206: Digital Waveguides 29

Digital Waveguides A digital waveguide is a sampled traveling-wave simulation for waves in ideal strings or acoustic tubes. A (lossless) digital waveguide is defined as a bidirectional delay line at some wave impedance R. z N R z N As before, each delay line contains a sampled acoustic traveling wave. However, since we now have a bidirectional delay line, we have two traveling waves, one to the left and one to the right. While a single delay line can model an acoustic plane wave, a digital waveguide can model any one-dimensional linear acoustic system such as a violin string or a clarinet bore. In real acoustic strings and bores, the 1D waveguides exhibit some loss and dispersion so some filtering will be needed in the waveguide to obtain an accurate physical model of such systems. Music 206: Digital Waveguides 30

Physical Outputs Physical variables (force, pressure, velocity,...) are obtained by summing traveling-wave components. z N Physical Signal z N To determine the value at any physical point, extract a physical signal from a digital waveguide using delay-line taps. The physical wave vibration is obtained by summing the left- and right-going traveling waves. The two traveling waves in a digital waveguide are now components of a more general acoustic vibration. A traveling wave by itself in one of the delay lines is no longer regarded as physical unless the signal in the opposite-going delay line is zero. Music 206: Digital Waveguides 31

Plucked String Model In this string simulator, there is a loop of delay containing N = 2L/X = f s /f 1 samples where f 1 is the desired pitch of the string and L is the physical length of the string. y(n) + y(n N/2) + z N/2 Bridge -1 (rigid termination) Physical Signal -1 Nut (rigid termination) G(e jω ) Low-pass y(n) z N/2 y(n N/2) What is the impulse response of this structure? Define an input x(n) and an output y(n). Music 206: Digital Waveguides 32