Physics based sound synthesis How can I actually create sound (an audio file) from the solution of the relevant equations?
For example, if I model a plucked string and obtain its shape function over time, how do I deduce the sound harmonics and generate an audio file?
I understand, that the string vibrations need to be coupled to air pressure waves, which in turn need to be coupled to the eardrum vibrations.
But surely, there must be an easier way.
I know there's a lot of literature on the subject, but from a glance, it looks very complex.
Could you point me to some simple techniques to make a simulation that is at least approximately valid?
Concretely, I could start by simulating a single string, fixed-end, dampened, and coupled to air in a rectangular room. How would I go about it?
I know how to solve PDE numerically, what I really want to know is how to make an audio file from the solution. I believe it's a physics question first and foremost, but if you redirect me to another SE, it's fine too, as long as I get an answer.
From a software standpoint, I could use something like Audacity, so I only need to obtain the raw data for the generated audio, and that's a physics problem I believe.
 A: In DSP, the gold standard for part of the acoustic part of this process is Impulse Response, and Convolution. With the sampled IR of a room, and the playback of an acoustic model, you can to a good approximation forgoe physically modeling propagating wavelet.
Now for physically modeling the guitar itself, FM synthesis is often used to generate high-quality approximations of the standing waves and normal modes produced by most instruments, and samples can fill in the gap for higher-order noises made by players, such as tapping or plucking - although some artists can develop patches that do this entirely with a very high-order FM synthesizer.
As far as tooling goes, an unlimited free trial of FL Studio (you can export, but you cannot save project files) can be used to

*

*Fruity Convolver

*Fruity Plucked!

*Sytrus
Another interesting approach that came across my eyes recently, and is tangentially relevant would be indeed to construct a rigid body simulation, and give it trivially access to an impulse sample. This was used to successfully simulate engine internals, and resulting sounds.
YouTube - AngeTheGreat - Engine Simulator demonstration
A: Nice problem. Some hints:

*

*you're right that the problem i coupled, but you can assume that it's loosely coupled, since the structural problem of the vibrating string influences the pressure field, and you could neglect the influence of small sound pressure variation on the structural problem;


*To solve the problem I'd organize the activities as:

*

*structural solver, to solve the structural dynamics of the wire, given prescribed external solicitations; a finite element (or finite volume or difference) structural solver should be ok

*acoustic solver, that takes the small displacement of the wire as a function of time as an input and solve for the sound pressure in the domain; I'd approach the problem using a BEM (Boundary Element Method) solver for the wave equation, since it's cheap and very low diffusion if compared with grid-based approaches, like FEM or FVM. If you don't know anything about BEM, start looking for Green's function method.



*you can model a microphone as a point probe recording the pressure as a function in time, placed in the point in space where you mean to place your mic.


*you can approach this problem both in time domain (even though numerical scheme for time integration may introduce some dissipation and dispersion of the pressure signal) or in frequency domain (low diffusion, but you may need a complex solver with time delays, and need to transform the spectrum of the pressure signal at the mic in a time signal)
It looks quite an amount of work. Hope this helps, at least.
