Waves on Strings

Set String Parameters First

The vibrational properties of a stretched string are determined by the length and mass of the string, and by the degree of tension (force) by which the string is stretched.  These physical factors determine the speed of the transverse elastic waves that can travel along the string.

Set the mass:

Choose a mass in kilograms

mass = 0.00112 .6

Set the length:

Choose a length in meters

length =0.60

Choose a tension:

Choose a tension (in Newtons) for the string

tension  =  5 1.5 9.8

Calculation of the wave properties

linear density

From these values, we compute the linear density of the string

μ = (mass/length)

transverse wave speed

The speed of waves on the string (in meters/second) is given by:

v = (Sqrt[(tension/μ)])

fundamental frequency

and the fundamental frequency of these waves (in cycles per second, or Hertz)

f = (v/(2 length))

Vibrations of Plucked Strings

In this section, we will look at the pattern of vibration that results from plucking a string at various points along the length of the string.  This is a model of the behavior of strings found on musical instruments such as the harp, harpsichord, banjo, guitar or mandolin.

Choose where to pluck the string

First, we need to choose where the string is to be plucked.

pluckpoint = (3/4) length

The function g[x] represents the profile of the plucked string just before it is released

g[x_] := 
      If[x < pluckpoint, (length/(8 pluckpoint)) 
          x, ((length (length - x))/(8 (length - pluckpoint)))]

Here is what the initial profile of the string looks like, based on your choice of pluckpoint

Plot[
      g[x], {x, 0, length},  {Axes -> {True, False}, 
        AspectRatio -> 0.25, 
        PlotRegion -> {{- .2, 1.1}, {0, 1}}, 
        PlotStyle -> {RGBColor[0, 0, 1], 
            AbsoluteThickness[2]}}]

Calculate the Amplitudes of each of the Harmonics

Strange but true, the string profile shown in the graph above can be represented as the summation of a series of sine waves of progressively shorter wavelengths (=((2 length)/m),  m  = 1, 2,  
        3, ....)where m is the mode number and (Subscript[A, m]) is the Amplitude of the (m^th)   mode sine wave.

Choose the number of desired Harmonics

n = 50

Find the Amplitudes

This next step calculates the Amplitudes, (Subscript[A, m]) of each mode.  These values are needed to construct the wave in the next part. Don't worry.  You don't need to know about the details of how this is done, just evaluate the expression

A =  
        Table[(2/length) (∫_0^length) g[x] 
                Sin[((m π x)/length)] \[DifferentialD]x, {m, 1, 
            n}];

Construct the wave

Now we need to construct a mathematical expression that will show the vibrational pattern of the plucked string.  Each mode vibrates at its own characteristic frequency, (Subscript[f, m]) = m f, where f, you recall, is the fundamental frequency of vibration for a string with the parameters chosen in the first part.

wave[x_, 
        t_] := (∑_(m = 1)^n) (Subscript[A, [[m]]]) Sin[((m π x)/length)] 
          Cos[2 π m f t]

Display an animation of the wave

After constructing the plot, you can double-click on the top frame to animate the wave. Click anywhere else in the notebook to stop the animation.

Do[Plot[wave[x, t], {x, 0, length}, 
        PlotRange -> {-length/8, length/8}, 
        AspectRatio ->  .25, Axes -> {True, False}, 
        Ticks -> False,  
        PlotStyle -> {RGBColor[0, 0, 1], AbsoluteThickness[2]}], {t, 0, 
        1/f, 1/(20 f)}]

Show Relative Amplitudes of each of the Harmonics

Need this next command to make the bar graph command work ok.

<< Graphics`Graphics`

This Bar graph shows the relative intensities, in dB,  of each of the vibrational modes for the plucked string.  The most intense mode is arbitrarily set at 100 dB.

BarChart[
      Take[100 + 
          20  Log[10, 
              Abs[A/(Subscript[A, [[1]]])]], 50], PlotRange -> {0, 101}]

Vibrations of Struck (Hammered) Strings

In this section, we will look the pattern of vibration that results from striking a string at various points along the length of the string with a hammer of a certain size.  This is a model of the behavior of strings found on pianos.

Choose where to strike the string

First, we need to choose the where the string is to be struck.

strikepoint = (7/8) length

Choose the size of the hammer

In addition, we need to pick the radius of the round hammer that will strike the string.  Realistically, this radius should be small compared to the length of the string.

hammerradius  =  (1/100) length

The function h[x] represents the velocity profile of the struck string just after it is struck.

h[x_] := 
      If[(strikepoint - hammerradius) <= 
          x <= (strikepoint + hammerradius), 
        100000 Sqrt[hammerradius^2  -  (x - strikepoint)^2], 
        0]

Here is what the initial velocity profile of the string looks like, based on your choice of strikepoint.

Plot[h[x], {x, 0, length},  Axes -> {True, False}, 
      AspectRatio -> 0.1, PlotRegion -> {{0, 1}, {0, 1. }}, 
      PlotStyle -> {RGBColor[0, 0, 1], AbsoluteThickness[2]}]

Calculate the Amplitudes of each of the Harmonics

Strange but true, the string profile shown in the graph above can be represented as the summation of a series of sine waves of progressively shorter wavelengths (=((2 length)/m),  m  = 1, 2,  
        3, ....)where m is the mode number and (Subscript[B, m]) is the Amplitude of the (m^th)   mode sine wave.

Choose the number of desired Harmonics

Pick the number of modes you want to look at

n = 50

Find the Amplitudes

This next step calculates the Amplitudes, (Subscript[B, m]) of each mode.  Don't worry.  You don't need to know about the details of how this is done, just evaluate the expression and you may ignore all the blue-lettered warnings that arise when you do this.

B = 
        Chop[ Table[(2/(m π v)) 
              NIntegrate[
                h[x] Sin[((m π x)/length)], {x, 
                  strikepoint - hammerradius, 
                  strikepoint + hammerradius}], {m, 1, n}]];

Construct the wave

Now we need to construct a mathematical expression that will show the vibrational pattern of the struck string.  Each mode vibrates at its own characteristic frequency, (Subscript[f, m]) = m f, where f, you recall, is the fundamental frequency of vibration for a string with the parameters chosen in the first part.

wave[x_, 
        t_] := (∑_(m = 1)^n) (Subscript[B, [[m]]]) Sin[((m π x)/length)] 
          Sin[2 π m f t]

Display an Animation of  the wave

Table[
      Plot[wave[x, t], {x, 0, length}, 
        PlotRange -> {-length/8, length/8}, 
        AspectRatio ->  .45, Axes -> {True, False}, 
        Ticks -> False,  
        PlotStyle -> {RGBColor[0, 0, 1], AbsoluteThickness[2]}], {t, 0, 
        1/f - 1/(40 f), 1/(40 f)}]

Show Relative Amplitudes of each of the Harmonics

<< Graphics`Graphics`

This Bar graph shows the relative intensities, in dB,  of each of the vibrational modes for the struck string.  The most intense mode is arbitrarily set at 100 dB.

BarChart[
      Take[100 + 
          20  Log[10, 
              Abs[B/(Subscript[B, [[1]]])]], 30], PlotRange -> {0, 101}]

Vibrations of Bowed Strings

This analyis follows Helmholtz in "On the Sensations of Tone."

The envelope of the the bowed strings motion is parabolic.  The kink in the string travels around the parabolic shown below

A =  .05

Plot[{8  A x (length - x)/(length^2), -8 
          A x (length - x)/(length^2)}, {x, 0, length}, 
      AspectRatio -> 1, PlotRange -> {- .2,  .2}]

Calculate the Amplitudes of each of the Harmonics

Choose the number of desired Harmonics

n = 50

Find the Amplitudes

This next step calculates the Amplitudes, (Subscript[B, m]) of each mode.  These values are needed to construct the wave in the next part. Don't worry.  You don't need to know about the details of how this is done, just evaluate the expression

B =  Table[((8  A)/(((m π))^2)), {m, 1, n}];

Construct the wave

Now we need to construct a mathematical expression that will show the vibrational pattern of the plucked string.  Each mode vibrates at its own characteristic frequency, (Subscript[f, m]) = m f, where f, you recall, is the fundamental frequency of vibration for a string with the parameters chosen in the first part.

wave[x_, 
        t_] := (∑_(m = 1)^n) (Subscript[B, [[m]]]) Sin[((m π x)/length)] 
          Sin[2 π m f ( t - (1/(4 f)))]

Display an animation of the wave

After constructing the plot, you can double-click on the top frame to animate the wave. Click anywhere else in the notebook to stop the animation.

Do[Plot[wave[x, t], {x, 0, length}, 
        PlotRange -> {-length/8, length/8}, 
        AspectRatio ->  .25, Axes -> {True, False}, 
        Ticks -> False,  
        PlotStyle -> {RGBColor[0, 0, 1], AbsoluteThickness[2]}], {t, 0, 
        1/f, 1/(20 f)}]

Show Relative Amplitudes of each of the Harmonics

Need this next command to make the bar graph command work ok.

<< Graphics`Graphics`

This Bar graph shows the relative Amplitudes of each of the harmonics for the plucked string

BarChart[
      Take[100 + 
          20  Log[10, 
              Abs[B/(Subscript[B, [[1]]])]], 30], PlotRange -> {0, 101}]

Questions

1.  Given the option to pluck a string at some point along its length or to strike the same string at the same point, which option would you choose to get a sound that would be richer in harmonic content?   Show how you figured this out.

2.  What is the effect of changing the hammer size on the harmonic content of the sound from a struck string?  Does using a bigger hammer increase or decrease harmonic content?  Show how you figured this out.

3. If you wanted to make a string produce a sound that contained the fundamental frequency and odd multiples of the fundamental frequency (but absolutely no even multiples of the fundamental frequency) how could you do this?