Simulation of a guitar string

top Description

guitarstring.py simulates a guitar string by treating it as a chain of alternating springs and mass points.

It takes the spring constant of the whole string, the mass of the whole string, the unstretched and stretched length of the string, the plucking position and several other arguments as input and plots the movement of the string over time and creates a wave file. The created tone sounds impressingly realistic.

The program, together with an spectrum analyzer(e.g. the tools of matplotlib and numpy), makes it possible to investigate how the plucking position affects the tone. It can be discovered that when you pluck at the middle of the string, the even overtones miss, and when you pluck at one third, every third overtone misses, and so on, because these overtones would have a node at that position and thus are not interested in what happens there.

guitarstring.py is free software and distributed under the terms of the GNU General Public License.

top Sample sound files

Each 5 seconds, 865kB

As one can hear, the nearer to the bridge you pluck, the more overtones you get.

top Screenshots

Settings dialog
Wave view (few overtones)
Wave view (many overtones)

top Requirements

top Download

top FAQ