Saturday, September 17, 2011

Guitar String Theory

I learned how to play the guitar about thirteen years ago, towards the end of high school, because I hypothesized that it would attract the ladies.  Fortunately for me, it attracted one lady in particular, and I ended up marrying her.  Although this case study was limited to one specimen, I think further investigation would lead to a strong correlation between guitars and ladies.

Over time, the guitar has become much more for me than a tool for garnering attention around a campfire.  The six-stringed instrument has sat on my lap for countless hours, as I figure out songs that I enjoy, perform them live, or just sit alone strumming nothing in particular.  It’s amazing what a wonderful diversion those twelve notes can provide.

I have written previously about how a pulse can travel along a string that is in tension.  What distinguishes the behaviour of a stringed instrument is that both ends of the strings are fixed.  The phenomenon that occurs when a taught string is plucked is known as a standing wave.  The note that we hear, its frequency, is dependent on four parameters for the given string: its length (L), tension (T), mass per unit length (µ), and mode number (n).  The frequency in Hz is given by the following equation:

f = [n/(2L)](T/µ)0.5

In the above equation, length is measured in m, tension in N, and linear density in kg/m.  Based on the string frequency equation, high frequencies result from a high mode number, for short strings with high tension and low linear density.

The six guitar strings are arranged from bottom to top with increasing thickness.  The first string, high E, has an open frequency of 329.63 Hz, whereas the sixth string, low E, has an open frequency of 82.41 Hz.  High E is two octaves higher than low E.  Each octave represents a doubling in frequency, so it makes sense then that high E has a frequency four times that of low E (it doubles twice).  If, for example, low E had the same tension as high E, its cross-sectional area (and corresponding linear density) would need to be sixteen times greater, due to the inverse square root relationship in the above equation.

A guitar is tuned by adjusting the tension in each of the strings appropriately.  Doubling the tension in a string increases its frequency by a factor of root two (about 1.4).  The tension in a string may be increased by raising its percent elongation; this is accomplished by manually rotating the tuning pegs at the end of the guitar’s neck.  Although standard tuning for a guitar is E B G D A E, many other configurations are used by guitarists so that alternative chords (combinations of notes) are easier to create.

Once a guitar is stringed and tuned, it is time to play it.  Along the neck of the guitar are twenty frets in an acoustic guitar; electric guitars usually have a few more frets than this.   Frets are divisions along the length of the string, and are used to alter the length of the vibrating portion of the string.  When the A string is vibrated openly, its frequency is 110 Hz.  When the string is pressed firmly to its twelfth fret, the vibrating portion is cut in half, and its frequency doubles to 220 Hz.  

Every fret represents one note, or semi-tone: each step increases the frequency by about 5.95% (we are thus not surprised that (1.0595)12 = 2).  Given that the typical length for an acoustic guitar string is around 63 cm, we can calculate the appropriate tension to linear density ratio that is required to achieve the desired 110 Hz frequency in the first mode of the A string (19,210 Nm/kg).

The final parameter that appears in the guitar string equation is perhaps the most intriguing one.  The mode number of a standing wave refers to its mode shape, that is, the shape the string has at a given time as it vibrates if one were to take a still photograph of it (the camera would need a time resolution of about 0.0001 seconds in order to capture it well).  The shapes of the oscillations are often overlooked because they occur so fast, but more so because the amplitude of vibration is so small.

A mode shape for a vibrating string is defined by its nodes and antinodes, although a physicist would describe it by its wavelength, λ.  A node is a point along the string that does not move at all during vibration, while anti-nodes are those that move the most.  For a given mode shape on a string, there will always be one more node than anti-node.  The first mode (n = 1), or fundamental mode, represents the simplest shape, a half sinusoidal wave.  It has a node at each end, and an anti-node in the middle.  The second mode is a full sine wave, and it has a node in the center, and two anti-nodes located one quarter and three quarters along the length.

A guitarist can cause a given mode shape to resonate by enforcing the position of a given node appropriately.  The term guitarists use to describe the individual oscillation of one particular mode is ‘harmonic’.  If one wanted to excite the second mode, all one must do is touch the middle of the string with one finger and then pluck it with the other hand anywhere else along the string.  By touching this particular point, you are restricting its motion, and the resultant standing wave has = 2.  The frequency of a standing wave is proportional to n.

In reality, when a guitar string is vibrated, we do not hear just one frequency.  The sound we hear is actually a combination of many modes of vibration.  The linear combination of different modal contributions is known as tone.  If I sing a note, and someone else sings the same note, we can differentiate between the two sounds because they have different tones.  Finally, what causes the final output of sound from an acoustic guitar to be so pleasing is that the vibrating strings cause air to vibrate and echo inside the body of the guitar.

There is, of course, much more to know about playing a guitar than making specific frequencies.  As mentioned previously, many different notes played at once constitute chords, which can be very pleasant to the ear if the right combinations are selected.  Also, the dynamics of one’s playing is determined by the amplitude of the strings’ oscillations.  Finally, the length of time that the strings resonate for is up to the guitarist, who can mute the sound simply by touching the strings at any point.

As fascinating as the physics of the guitar can be, the instrument is far better in practice.  My favourite guitar composers and players include Dave Matthews, Kaki King, and John Mayer.  I wonder if any of them know the string frequency equation...


Tano Porta said...

Very cool blog!!!!
I like your examples (yelling at the pc is independent of the time it will take to unfreeze)
i teach and i sometimes find myself giving some explanations very similar... (wave-particle duality is like batman and bruce wayne hahha)


ps. in this article you wrote that doubling tension doubles freq. actually it would take a factor of root square of two times the tension to double freq.

The Engineer said...

Hey Stan,

Thanks for the positive feedback, and also for catching my blunder (I updated the posting accordingly)... How nice it would be to have an editor :)

Martin said...

Can you tell me about a string defect, I call it wobbling. I think the thickness of string is not continuous. would it be possible to manufacture a string that makes a not perfectly fretted instrument intonate correctly? Would this string vibrate wobbly?

The Engineer said...

Martin, what an interesting question.

Standard strings have constant cross-section, and their corresponding mode shapes are symmetrical sine waves. Non-uniform cross-section would lead to asymmetrical mode shapes (a more technical term for wobbly I suppose).

Plucking such a string would cause a surprising tone, as it would include a fair bit of higher modes with a reasonable amount of weight (hard to get just the fundamental mode to oscillate).

I would need to review my boundary value problems (non-uniform string) to properly answer the last question you asked. Won't happen anytime soon, since my second child was born this week ;)

Matt said...

In this context, I think wobbly means multiple frequences vibrating simultaneously on the string. I'll take a shot at this mathematically - I think you would take the frequency function and multiply it against another frequency function (see below). If the defect mass per unit length varied over the defect section, you'd need to integrate over v.

f = (n/2L)(T/µ)0.5

f = (n/2L)(T/µ)0.5 * (n/2M)(T/v)0.5 * (n/2N)(T/µ)0.5


L is length of string before defect
M is length of string during defect
N is length of string after defect
v is mass per unit length of defect

The Engineer said...


If wobbly means this, then all strings are wobbly. That is, all motion of ANY structure can be expressed as a linear combination of its various modes.

Not sure about the equation you have provided, but it appears to me that it has units of Hz^3, and thus cannot be frequency.

Regardless, thanks for sharing!

Unknown said...

Hey engineer...amazing blog...i think the artist is "John Mayer" ..... u misspelt it

The Engineer said...

Hey Asutosh,

Thanks for the comment. I'll insert the 'h', lol. If I'm such a big fan I should spell his name right :)

andrea chiu said...
This comment has been removed by a blog administrator.
Michael said...

Nice article. We just did a lab in my physics class on guitar strings. We measured the mass and length of a string to find its linear density and then hung the strings over the tuners with weights attached to set the tension. Our calculated values were close (within 10 % ) of the actual frequencies.

The Engineer said...

That's great Michael. One of the difficulties that is easy to overlook in this kind of experiment is that tension actually can affect linear density: by stretching the medium, its linear density actually decreases.