Simulation of a vibrating string

When the simulation is opened, a string fixed at both ends is seen. It has a symmetric initial deflection in the form of a Gaussian, whose width is such that its amplitude at the ends is near zero.

Play starts the calculation, stop freezes it, step calculates one step. The time between steps can be defined by a slider speed.

The model assumes that neigbored points at the string are connected elastically, as with tiny springs. The string length is divided into 1000 calculation points.

Contrary to naive expectation the string does not simply deflect perpendicular to its axis (as it would appear for a harmonic). Rather two identical pulses of half the initial amplitude propagate to both ends, are reflected and recombine in the middle to the initial pulse with opposite sign. After two reflections the original pulse is reconstructed.

The formula of the Gaussian contains a parameter a for the reciprocal 1/e width. When you choose a = 0.1 with the slider, you will observe two clearly separated short pulses traveling and reconstructing.

At very short pulse length ( a < 0.03 ) limited resolution will lead to calculation artifacts. Yet one can observe how distortions created in that way develops further.

In the Combobox the following functions are predefined:

You can edit the formulas or write your own ones.

For w as an integer sine waves oscillate as standing waves. They are base modes or eigenfunctions of the string. Yet this pattern is not created by simple deflection perpendicular to the string, but by interference of two traveling waves. This is not easy to perceive, so think about it in depth and compare the process to the Gaussian.

In music instruments the appeal of a specific sound is determined by its mixture of harmonics. A straight harmonic like that of the organ flute pipe sounds dull and uninteresting, less charming than the transverse pipe with higher harmonics and its additional breathing noise. In the harpsicord a crisp, chirping sound is generated by strongly localized, non symmetric picking of the string. This localized initial irritation then travels and interferes along the string.

A guitar player knows that soft plucking with the fingers near the middle of the string creates a dull tone, while localized plucking with a plectrum near the end leads to pungent, wild sounds. The different simulation examples will help you understand these effects and reveal how complex their explanation can be.