Physical modeling of acoustic instruments

Artifastring ("artificial fast string") is a highly optimized physical simulation of a violin for sound synthesis.

Source code:

To make a real-world analogy, Vivi is the violinist, while Artifastring is the violin. Artifastring can be used without Vivi, and Vivi could play violins other than Artifastring (if I had other simulations available).


Consider the wave equation for a stiff string:

the wave equation

The truly important part is y(x,t) – this is the position of the string at position x at time t. We are interested in a modal solution:

modal breakdown of wave equation

... skipping over a lot of physics and mathematics...

  • The external forces F(x,t) come from the violinist – the bow force and finger force.
  • If we know the physical constants and external forces, we can calculate the "wiggle" of a violin string.
  • The amount of "wiggle" is transferred to the violin body via the bridge.
  • We can imitate the violin body’s influence by convoluting the bridge signal with the impulse response of the body.
  • The output is our sound!

If you are interested in the physics and math, see:

  • Matthias Demoucron’s 2008 PhD thesis
  • M. Demoucron and N. Rasamimanana, "Score based real-time performance with a virtual violin", Proceedings of the 12th International Conference on Digital Audio Effects (DAFx-09), Como, Italy, September 1-4, 2009. pdf available


The physical simulation used by Artifastring is not the most accurate version known to researchers. Actually, it might be fair to say that every single aspect of this simulation is known to be inaccurate!

However, my goal was not to advance the state of musical acoustics. My background is philosophy, music, and computer science – I’m not a physicist. I have enormous respect for people who do experimental science, but the last time I did any measurements of the real world was back in 1997, in high school.

This physical simulation was chosen because:

  • The PhD thesis and conference paper gave a complete algorithm – there were no missing steps or assumptions that the reader already knew how to do portions of the simulation.
  • There were sound (and video!) examples of the output, so I knew that final sound would be worth it.

Despite using a simple simulation, it still took us approximately 200 hours to get it working. It was great fun, and I learned a lot about digital signal processing programming and physics – but I don’t regret picking an "inaccurate" simulation. This one was enough work.

Vivi’s violin isn’t the best that science can offer, but it’s good enough to start practicing with. :)

Future work

There is a lot of material that Vivi can learn with her current violin – double stops, chords, vibrato, different bow-strokes, etc. At the moment, I don’t think that the instrument is holding her back. However, it would certainly be nice to have better-quality instruments:

  • One simple improvement would be to have a different violin body impulse response – the current version comes from a £100 violin.
  • Measuring the modal dampening factors of all strings would be good. We currently approximate the dampening factors measured from a violin D string, and then estimate the dampening factors of the other strings. This is doubly-vague, and I think that the E string in particular suffers.
  • The best way to improve the quality of the instrument would be to switch to a cello. Sorry violinists, but cellos rock! :)

    In all seriousness, Vivi should be able to learn viola or cello just as easily as violin. My background (and first love) is the cello – I played it for 20 years before starting to learn viola.

    My absolute dream is to have a virtual string octet perform the Mendelssohn octet. Not because I’m an incredible fan of that work in particular, but because I want to have multiple violin, viola, and cello instruments, and I want Vivi (or her younger siblings) to be able to play all those instruments.