Title: Elements of numerical analysis with application to sound synthesis Antoine Chaigne ENSTA UME, France
1Elements of numerical analysis with application
to sound synthesisAntoine ChaigneENSTA UME,
Francechaigne_at_ensta.fr
2Summary
- Introduction
- Examples of continuous models
- Strategies for discrete formulations
- Finite difference methods
- Stability of a numerical scheme
- Numerical dispersion or frequency warping
- Discussion and comparison with other methods
3Introduction
- Physical modeling
- Boundary-value problems
- Time and space discretization
- Predicting the properties of a discrete model
-
41st example a 1D ideal string clamped at both
ends
- Wave equation
- Boundary conditions
- Initial conditions
52nd example a 1D vibrating bar free at both ends
- Bar equation (flexion)
- Boundary conditions
- Initial conditions
6Strategies for discrete formulations
- Direct discretization of the spatial and time
derivatives - Finite Difference Methods (FDM)
- Integral ( weak ) formulation of the problem
variational approach - Finite Element Methods (FEM)
- Boundary Element Methods (BEM)
- Modal truncation
7Finite Difference Methods (FDM)
- Approximations based on Taylor series
- Examples of 2nd order FDM schemes
8Higher-order approximations
9String equation with the 2nd order FDM scheme
Equivalent to
Notations
We obtain here an EXPLICIT SCHEME
10Stability of the explicit 2nd order FDM scheme
Fourier method
Wave equation
Stability condition
CFL condition
11Discussion on the stability condition
Stability condition for the 2nd order explicit
FDM scheme
Ideal vibrating string
Time sampling frequency
Equivalence with Shannons theorem
12A practical example simulation of a guitar string
H1 the time sampling frequency is given
We want to simulate the note A2
We must select a number of spatial steps
13Homework
- The stability condition for the ideal bar
equation (Euler-Bernoulli) discretized with a 2nd
order explicit FDM scheme yields the stability
condition - Try do demonstrate it using the Fourier method!
- What do you think of this result compared to the
stability condition for the ideal string ?
14Short summary of FDM properties
- The recurrence equation and its stability
properties depend on the order and type of
approximations used for the derivatives - The FDM method is also applicable to more complex
problems - Ex.1 heterogeneous string
- Ex.2 nonlinearity due to tension
- It is a particularly convenient method for simple
geometrical shapes (lines, rectangles, circles,
cubes) - There are other methods for deriving a stability
condition - Ex energetic methods
- However, with increasing complexitiy of the
model, it is not always possible to find a
stability condition analytically - Other strategies tests of convergence, use of
implicit schemes - The FDM is not optimal for curved boundaries
(ex. guitar body) and for irregular mesh
15Numerical dispersion of the 2nd order FDM scheme
Harmonic wave
Continuous wave equation
Recurrence equation
Numerical wave velocity
16Dispersion curve for the 2nd order FDM scheme
(wave equation)
17Discussion on dispersion properties
- For this FDM scheme, the numerical wave velocity,
and thus the eigenfrequencies of the string, are
underestimated, except for r1. - For more complex models, and for stability
reasons, it could be necessary to have rlt1. In
this case, time oversampling will limit the
dispersion.
18Conclusions
- Numerical analysis techniques are widely used in
various domains geophysics, mechanics,
electromagnetic waves and others. - Complex equations from the physics, including
models of musical instruments, are still
challenging problems for applied mathematicians. - For sound synthesis, it can be used as a good
starting point to test complex models and hear
how it sounds. - Once a model has been validated, there are many
exciting challenges for people who want to
develop hybrid techniques taking advantages of
the properties of other fields (ex waveguides).