Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Aerophones in FlatlandInteractive Wave Simulation of Wind Instruments
Andrew Allen
Nikunj Raghuvanshi
Spectrogram
Simulation Domain
Mouthpiece
Wind Instruments
BellMouthpiece Bore, Toneholes
reedmouth bore
Non-linear Linear
Feedback
Resonant Cavity
Excitation models: Single Reed (Clarinet)
Dalmont, J.P., Gilbert J., and Ollivier, S. 2003.
Excitation models: Lips (Trumpet)
Adachi and Sato. 1996.
Excitation models: Air Jet (Flute)
de La Cuadra. 2006.
Bell
Realtime synthesis: Digital Waveguides
Bell radiation
Mouthpiece Bore
breath pressure
+shift
shift
+
Γ Bell reflection
SMITH, JULIUS O. 2010. Physical Audio Signal Processing.
http://ccrma.stanford.edu/Λjos/pasp/
(online book, accessed Jan 2014).
Bell
Realtime synthesis: Digital Waveguides
Bell radiation
Mouthpiece Bore
breath
+shift
shift
+
Γ
Non-linear
excitation model
Bell reflection
= frequency-dependent filter
Bell
Realtime synthesis: Digital Waveguides
Bell radiation
Mouthpiece Bore
breath
+
Tonehole
radiation
Tonehole
reflection
Tonehole
shift
shift
+
Γ
Non-linear
excitation model
Bell reflection
Tonehole
radiation
Tonehole
reflection
Tonehole
= frequency-dependent filter
Bell
Our approach
Bell radiation
breath pressure
Tonehole
radiation
Tonehole
reflection
shift
shift
Bell reflection
Tonehole
radiation
Tonehole
reflection
2D wave simulation on GPU
Mouthpiece Bore
Color = pressure
Borrow and adapt
Non-linear
excitation model
+
+
Γ
Non-linear
excitation model
Advantages
β’ Signal processing networks require expertise to design and ensure physical plausibility.
β’ Geometric manipulation is intuitive.
β’ Guaranteed physical plausibility.
β’ Lower expertise bar for musical experimentation.
Challenges
β’ System is driven non-linearly and has perceptually salient transients (note beginnings/ends).
β’ Direct time-domain finite-difference solution.
β’ Standard finite difference generates artifacts on changing geometry.
β’ Need millimeter-scale resolution.
β’ Numerical stability requires small time-steps for wave equation.
β’ ~3.8mm resolution at 128,000Hz on the GPU.
Linear Wave Equation
ππ
ππ‘+ πβ²π = βππ2π» β π―
π½ππ―
ππ‘+ πβ²π― = π½2
βπ»π
π+ πβ²π―π
(πβ² = 1 + π½ β π)
Perfectly matched layer (PML)
ππ
ππ‘+ πβ²π = βππ2π» β π―
π½ππ―
ππ‘+ πβ²π― = π½2
βπ»π
π+ πβ²π―π
(πβ² = 1 + π½ β π) π β 0
π = 0
Dynamic Geometry
Tone Holes, Valves, Slides, Mutes
Abrupt geometric changes: clicks
Our formulation (time-varying PML)
β’ π½(π, π‘) β [0,1] introduces smoothly-varying dynamic geometry.
β’ π―π enforces boundary conditions and input flow from mouthpiece.
β’ Handles all phenomena we model.
ππ
ππ‘+ (1 β π½ + π)π = βππ2π» β π―
π½ππ―
ππ‘+ 1 β π½ + π π― = π½2
βπ»π
π+ (1 β π½ + π)π―π
Our formulation (time-varying PML)
π½ππ―
ππ‘+ 1 β π½ + π π― = π½2
βπ»π
π+ 1 β π½ + π π―π
π½ππ―
ππ‘+ 1 β π½ + π π― = π½2
βπ»π
π+ 1 β π½ + π π―π
π½ = 1: Air
π½ππ―
ππ‘+ 1 β π½ + π π― = π½2
βπ»π
π+ 1 β π½ + π π―π
π½ = 0: Boundary
Smoothly interpolates
between Boundary and
Air state in every cell(π = 0 inside domain)
Our formulation: natural transients
β’ The transition rate of Ξ² controls the smoothness of the transition.
β’ Results in a simple conditional-free update equation for the entire domain.
Off On
Wall losses
β’ 2D simulations support transverse resonances
β’ Wall loss modeling is required (unlike 1D models)
Off On
High-amplitude non-linearity
β’ Brass instruments have high amplitudes inside the bore.
β’ Makes brass sound brighter.
Off On
ππ¦
ππ₯
ππ¦
ππ₯
GPU Implementation
β’ Solving Finite Difference uses a 5-point 2D stencil.
β’ Neighbor pressures and velocities are used to update center pressure.
ππΏ
ππ·
ππ
ππ
π
GPU Implementation
R G B A
π π―π₯ π―π¦ state
Per Fragment
ππ¦
ππ₯π
ππ¦
π ππ₯
State structure stores:
β’ π½ value (boundary-ness)
β’ π value (PML)
β’ Is Excitation?
β’ Is Listener?
β’ Values for each cell are stored in color channels.
β’ Simulation grid is represented as a 2D texture.
β’ Four copies of the simulation are stored in one large texture.
β’ Ping-pong with R/Ws on one texture.
β’ Output pressure written out in block in reserved space on FBO
Framebuffer Texture
GPU Implementation
β’ Values for each cell are stored in color channels.
β’ Simulation grid is represented as a 2D texture.
β’ Four copies of the simulation are stored in one large texture.
β’ Ping-pong with R/Ws on one texture.
β’ Output pressure written out in block in reserved space on FBO
R G B A
π π―π₯ π―π¦ state
Per Fragment
1 2
3 4
GPU Implementation
β’ Values for each cell are stored in color channels.
β’ Simulation grid is represented as a 2D texture.
β’ Four copies of the simulation are stored in one large texture.
β’ Ping-pong with R/Ws on one texture.
β’ Output pressure written out in block in reserved space on FBO
R G B A
π π―π₯ π―π¦ state
Framebuffer Texture
Per Fragment
1 2
3 4
GPU Implementation
β’ Values for each cell are stored in color channels.
β’ Simulation grid is represented as a 2D texture.
β’ Four copies of the simulation are stored in one large texture.
β’ Ping-pong with R/Ws on one texture.
β’ Output pressure written out in block in reserved space on FBO
Framebuffer Texture
π‘ β 2
π‘π‘ + 1
R G B A
π π―π₯ π―π¦ state
π‘ β 1
1 2
3 4
GPU Implementation
β’ Values for each cell are stored in color channels.
β’ Simulation grid is represented as a 2D texture.
β’ Four copies of the simulation are stored in one large texture.
β’ Ping-pong with R/Ws on one texture.
β’ Output pressure written out in block in reserved space on FBO
Framebuffer Texture
π‘ + 1
π‘ β 1π‘
R G B A
π π―π₯ π―π¦ state
π‘ β 2
1 2
3 4
GPU Implementation
β’ Values for each cell are stored in color channels.
β’ Simulation grid is represented as a 2D texture.
β’ Four copies of the simulation are stored in one large texture.
β’ Ping-pong with R/Ws on one texture.
β’ Output pressure written out in block in reserved space on FBO
Framebuffer Texture
π‘
π‘ β 2π‘ β 1
R G B A
π π―π₯ π―π¦ state
π‘ + 1
1 2
3 4
GPU Implementation
β’ Values for each cell are stored in color channels.
β’ Simulation grid is represented as a 2D texture.
β’ Four copies of the simulation are stored in one large texture.
β’ Ping-pong with R/Ws on one texture.
β’ Output pressure written out in block in reserved space on FBO
Framebuffer Texture
π‘ β 1
π‘ + 1π‘ β 2
R G B A
π π―π₯ π―π¦ state
π‘
1 2
3 4
GPU Implementation
β’ Values for each cell are stored in color channels.
β’ Simulation grid is represented as a 2D texture.
β’ Four copies of the simulation are stored in one large texture.
β’ Ping-pong with R/Ws on one texture.
β’ Output pressure written out in block in reserved space on FBO
Framebuffer Texture
π‘ β 2
π‘π‘ + 1
R G B A
π π―π₯ π―π¦ state
π‘ β 1
1 2
3 4
GPU Implementation
Framebuffer Texture
π‘ β 2
π‘π‘ + 1
R G B A
π π―π₯ π―π¦ state
π‘ β 1
β’ Values for each cell are stored in color channels.
β’ Simulation grid is represented as a 2D texture.
β’ Four copies of the simulation are stored in one large texture.
β’ Ping-pong with R/Ws on one texture.
β’ Write output pressure (sound) to reserved space on the FBO.
Clarinet
Chalumeau melody Altissimo melody (register key)
Saxophone
Simple melody Fast Squeaks
Flute
βRobotβ Performer Wind Controller Interface
Bugle & Trumpet (brasses)
Lips Overblowing Valve System
Trumpet w/o Bell and w/ Mutes
Bell On/Off Straight, Cup and Harmon Mute
βSlide Whistleβ and βMenorahβ
Dynamic Bore Geometry Interlocking Valve System
βTuba?β and βHybridβ
Implausible-to-construct Instrument Reed, Lips, Valve, Tonehole, Bell
Comparisons to STK (Digital Waveguides)
Low note High note
Conclusions and Future Work
β’ First system for real-time 2D simulation of Aerophones
β’ Improving the control of excitation mechanisms
β’ Automatic tuning of geometry
β’ Generalized excitation model
β’ Modeling of larynx/syrinx (speech synthesis/bird song)
Thank You! Questions?
Special thanks for providing performances β
β’ Kyle Rowan, clarinetist
β’ Paul Hembree, trumpeter