WHY do harmonics happen?

The answers to the question 'How do harmonics work?' were most interesting.

OK, that's the HOW it happens. But WHY does it happen ? What is the physics here ? Why doesn't a guitar string vibrate at one frequency only?

• Vibrational Modes: en.wikipedia.org/wiki/Normal_mode May 13 '16 at 4:34
• How are these answers any better/different than those in the post you cited?
– user50691
Apr 27 '21 at 18:15
• Check out this simulation: phet.colorado.edu/en/simulation/legacy/fourier. You can create any resultant shape by adding together the harmonics in different amounts/ amplitudes. Conversely, when you pull back a string and pluck it, you are giving the string some initial shape. The initial shape determines which harmonics are present and how loud they are. If we stick to an idealized string, then that's the whole answer. For a real-world string, there are some good answers below. Apr 27 '21 at 18:18

It's a simple question with quite an involved answer.

First a quick primer on wavelength, frequency and pitch.

Frequency is how many times a vibration repeats in a period of time. Wavelength is the length of a single vibration, which for something like a guitar string, corresponds to the length of time it takes to repeat. You can see that if the wavelength halves, the frequency doubles.

Conveniently, the wavelength of the sound from a vibrating string is proportional to the length of the string, so we can talk about the two almost interchangeably.

Doubling the frequency (halving the wavelength) takes us up an octave.

When you hit/pluck/shake anything, it will vibrate at all kinds of frequency. Most of those frequencies will die away very quickly. Here's why.

These are conceptual pictures of a string vibrating. Think of one end as the nut of a guitar, and the other as the bridge. The bottom one is "not a resonant frequency", because the line doesn't end at the bridge. I could perhaps have drawn the last part of the wave with a steeper curve, so it reached the dot, and that would have shown what happens to waves of that frequency -- rather than work with the length of the string to reinforce itself, it works against the length of the string, gets cancelled out, and dies away.

Now look at the other waves. They sustain because they "fit" into the length of the string. They would carry on vibrating that way forever, if it weren't for the sound board, the friction of the air, and so forth, perhaps the magnetic field of a pickup, taking energy away.

I've shown the 1st, 2nd, 3rd and 4th -- but they keep going on, at various levels of loudness.

The complex waveform of a guitar note is the result of adding all those resonant frequencies together.

Here are some waveforms:

Here is a frequency analysis of single guitar note - horizontal axis is frequency, vertical axis is amplitude. Each spike is a different harmonic.

It's the precise mixture of frequencies, and how quickly each one dies away, that provides the timbre of the instrument.

A good way to get a feel for this is to play with an analogue synth (or a simulation of one). These use "additive synthesis", in which an oscillator produces a pure sin wave, and you build up a timbre by adding in "harmonics" using more oscillators, choosing the relative pitch and volume for each one.

You may have noticed that your guitar sounds "boomier" if you pluck it near the 12th fret, and more trebly when you pluck it near the bridge. That's because when you pluck near the middle of the string, you're giving lots of energy to the 1st harmonic, and very little to the other harmonics.

Now, what happens if you gently touch the midpoint of the string?

• You kill the 1st harmonic. That involved the string moving at exactly the point you've suppressed.
• You allow the 2nd harmonic to keep ringing - the string doesn't need to move at the position you've muted.
• You kill the 3rd harmonic
• The 4th harmonic keeps ringing
• ... and so on.

The result is that you subtract the fundamental note, and a lot of "odd" harmonics, leaving a harmonic that's an octave up, and some of the higher harmonics. The result is a sound with fewer harmonics that therefore sounds "purer".

A great way to get a feel for this is to play the open string, then listen carefully as you gently touch the midpoint, to see how you achieve the octave by subtracting part of the sound.

• Nitpicks: the wavelength is the spatial length of "a single vibration", i.e. the distance between e.g. two knots on a string. That may be proportional to the period, which is the length in time, but it's not the same thing; in fact the quantities are not proportional on anything more complicated than a free string or a free column of air (e.g. drums, bells...), leading to harmonics that aren't integer multiples. That's why most melody/harmony-instruments use strings or air columns. — Most synthesizers use primarily substractive synthesis, not additive. Feb 21 '12 at 13:43
• @leftaroundabout Those are fair nitpicks. If you leave the filters alone, you can play with additive synthesis on a typical multi-oscillator analogue synth.
– slim
Feb 21 '12 at 13:51
• @slim Why will it vibrate at all kinds of frequency, if I pluck a string? Oct 10 '14 at 4:04
• "When you hit/pluck/shake anything, it will vibrate at all kinds of frequency." Why? E.g., damping? But this doesn't explain an infinite number of overtones arising into non-perceptible frequency ranges. In fact, a dampening sound wave should cause a rising series of tones, not simultaneous overtones. Mar 30 '20 at 21:10
• @UdonJoe it's not because of damping, as explained in the various answers. Apr 28 '21 at 11:44

WHY do harmonics happen?

Well, they don't happen – not necessarily.

Strings can do all kinds of stuff:

All these are possible ways a snapshot of a moving string could look like. Not only that, it could also move at each point with an arbitrary velocity. The velocity could be everywhere 0 (for an infinitesimally short moment). In the first shown state, if the velocity we also zero then this would mean the string is simply in “silent mode”, i.e. no vibration at all. The second state is an overtone-free one (the lowest eigenstate of the string; if this snapshot is with zero velocity it means the string is at the upper turnaround position, i.e. it moved upwards until now and will then start moving down).

The 4th state is a confused bunch of harmonics. By this I mean, you could take a little bit of the ground state from picture 2, something of the second harmonic (an S-like shape), a little of the 3rd and so on, add them all up and get exactly picture 4. What would that sound like? Well, just the sum of all those frequencies as overtones, like in typical string vibration as we're use to hear. Except that picture 4 is not a typical string state: I wouldn't expect to ever find a real string in that state.

In contrary to state 3: that's exactly what a guitar string looks like when you've plucked it and it's just about to slip off the nail/pick. And what happens then? Well, it moves on as if there never was a pick, i.e. as if it was in the middle of its normal movement and we simply took a snapshot which happened to look like picture 3. But picture 3 is clearly not an eigenstate: just like picture 4, the only way a string could look like this is by vibrating in multiple modes at the same time. And that's why a guitar doesn't produce sine oscillations, but proper tones with harmonics.

• Considering the velocity of the string at the moment when it is zero isn't particularly instructive given that vibration is a temporal phenomenon. Also, the first image represents not only a silent-mode string but also a vibrating string at the moment when its displacement is zero, its acceleration is zero, and its velocity is at its maximum value. Apr 28 '21 at 11:51

Actually, the opposite question is more relevant

• why doesn't a string vibrate at all the frequencies? When you hit it, you aren't providing just one vibration node, but putting in a chunk of energy.

It comes down to where the nodes, or zeros are (have a look at @MatthewRead's answer over here) as with the ends of the string fixed, any wave which has an element of movement at those points will not propagate (the end point just won't move)

So what that does is limit the possible frequencies to those which have a wavelength which fits into the string a whole number of times.

From a purely theoretical point of view it has to do with two things: Excitation and non-linearity.

As suggested by leftaroundabout's diagrams, WHERE you pluck on a string, eg, will affect to a large degree whether it vibrates primarily at the "fundamental" or some harmonic. This is excitation. So someone playing a stringed instrument can get a purer, more "fundamental" sound by plucking near the middle of the string, and a "richer", more "harmonic" sound by plucking closer to the end of the string.

Non-linearity, on the other hand, has to do with the fact that, eg, the string of a stringed instrument is not perfectly flexible, must deal with the resistance of air, and a number of other factors. This means that even if somehow initially excited to precisely the fundamental frequency, the fact that, eg, the strings are stiff at the ends will cause the ends to "lag" slightly the motion of the rest of the string, so rather than vibrating in a smooth arc the string will take on a slight S shape. If you analyze the S shape mathematically and plot its frequency spectrum, there will be a strong spike at the fundamental frequency, but (due to the S shape) weaker spikes at the overtones. In addition, the "sharp" peak at the fundamental (and the overtones) will "spread" slightly due to air resistance, etc.

It's all these subtle variations that give a musical instrument its tone. A pure fundamental tone sounds "electronic" and very artificial. (But of course, too many overtones and too much "spread" results in a muddy sound.)

So far I've seen nobody addressing the "why" question of harmonics to any useful degree: everybody is either intent on explaining how a string (as a nice example of an oscillator with overtones) can support multiple harmonics, or handwaving around the issue.

The answer is "boundary conditions". An oscillator can support multiple modes, so the question is what combination of modes will actually correspond to a certain one-time or continuous or semicontinuous excitement: the excitement places the boundary conditions. If we pluck a non-sounding string, it is formed into two straight line segments (assuming that the plucking is slow in comparison with the vibration) and then let go.

So we need to find a superposition of overtones and modes that will result in exactly the shape of the string and the forces and impulse in every part of it at the time we let go and leave it to its own devices: this will determine the various ratios of modes, and they will usually decay with different time constants, too. With strings, you can give some partials an unfair advantage by touching the string in places they would not move: then other partials die out much faster, the result being a "flageolet" or pure harmonic sound.

Also plucking a string at various points will have different overtones in the result. Some like to pluck it very close to the bridge so that it's basically the pick noise travelling back and forth the string that makes up the initial sound, rather overtone-rich until the higher partials die off.

• Less confusingly called initial condition. The boundary condition (both in common sense and in hyperbolic-PDE lingo) is rather the requirement that the ends of the string at all time rest on the bridge/nut – which is in fact necessary for harmonics, but doesn't imply that any will be excited. Feb 3 '17 at 22:25

I'll assume that you wonder about the harmonic components of a sound, not the guitar harmonics played by just touching the string (which was the real question behind "How do harmonics work?", I believe).

Any periodical signal can be represented as a sum of sine waves. These sine waves are shown in a spectrum: the spikes in the spectrum graph by slim represent the amplitudes of sine waves, which frequencies are given by the x-axis of the spikes.

Sum up these sine waves and you will get your original signal back. If you have only one component (one spike) in a spectrum, the signal is just a sine with that frequency and amplitude.

With that in mind, your question may be rephrased:

"Why doesn't a guitar string vibrate at one frequency only?" -> "Why doesn't a guitar string vibrate as a sine wave?"

You could say that a guitar string vibrates at one frequency (in a non-sine waveform). But its waveform may be decomposed into a sum of sine waves of different frequencies.

Now why doesn't a guitar string vibrate as a sine? As mentioned by others, this is controlled by the constraints applied to the string. The contact with the pluck, where the string is struck, the stiffness of the string, the connections to the guitar body, the body itself, the room, your fingers...

It all has to do with overtones. In a nutshell, sound is a compression wave. (It's usually drawn as a standing wave for simplicity.) Every pitch is at a set frequency, so the high point in the wave occurs every so often.

An overtone, which is what a harmonic is, happens when you have two sound waves whose high points overlap at certain intervals. For instance, an octave above any given note is twice that note's frequency, so the high points of the upper note will overlap the high points in the lower note every other time. Similar effects occur for most overtones.

A guitar string really does only vibrate at a single frequency, which is determined by its length and its tension. The overtones line up with other frequencies, which causes any appropriately tuned strings nearby to resonate with the string if they match one of the harmonics.

This is a gross oversimplification of course. This youtube video is the best explanation of the whole process I've seen in a while.

• Actually, the plucked string vibrates at several superimposed frequencies. "Added" together they describe the complex shape the string takes on. But you are correct that the "sympathetic" vibration of adjacent strings has a significant effect (as of course does the instrument body). Of particular note would be instruments with distinct sympathetic elements that are never directly "excited" such as the Hardanger fiddle. Feb 20 '12 at 12:10

Why doesn't a guitar string vibrate at one frequency only?

An ideal one carefully plucked at its middle would, but real-world guitar strings are not idealized strings. They are not massless, they have thickness, they're often twisted bundles of metal, inconstant tension, gauge, etc. And, probably most importantly, they're plucked somewhere close to one end of the string, which is against the natural motion an ideal string would like to take. Thus, more than one mode (frequency) of the string will be vibrating; these are the harmonics.

This diagram shows what the real motion of a plucked string (black) looks like:

The colors are the different modes (overtones or harmonics) of the string's vibration. Any of these colored "strings" is a natural motion the black string would like to take. Since the red "string" has the largest amplitude, its frequency is the most prominent heard coming from the vibrating string. All these colors, when superimposed, create the non-"pure" vibration of a plucked sting. You can see the shape of the black string isn't symmetric, is "bent," unlike the colored "strings."

Plucking at the middle of the string is one way to minimize the harmonics. If you do this, you'll hear a more pure sound. This is because it's not as against the natural motion of a string as plucking near an end of the string.

• Even if you pluck at the middle you get a considerable amount of harmonics. Just the even harmonics are completely suppressed this way. May 13 '16 at 0:12
• This is a good explanation of the physics, but it doesn't depend in any way on the fact that the string is "not idealized". The same concept (mathematically called Fourier analysis) applies just as well to an idealized string that is pulled to one side and held in that position (i.e. its shape becomes two straight lines) and then released so that it vibrates.
– user19146
May 13 '16 at 0:25
• @leftaroundabout If you pluck an ideal string contrary to its natural motion, you can produce harmonics, yes. May 13 '16 at 0:42
• @alephzero Different types of strings have different timbres, and a string's harmonics contribute to a string's unique timbre. An ideal string vibrating at its fundamental mode only (like the red string in the picture alone) would produce a perfect sine wave sound with no harmonics. May 13 '16 at 0:51
• @Geremia the timbre of a single plucked string depends strongly on the position of the plucking point along the string. You can easily demonstrate that on an acoustic guitar. It is impossible to pluck a string, ideal or not, to excite only the fundamental frequency.
– user19146
May 13 '16 at 2:43

Why doesn't a guitar string vibrate at one frequency only?

Harmonics in general are produced by systems which have a non-linear response, like a string.

One way to understand harmonics is to look at mathematical operations, like Fourier transforms, or other transforms. These operations convert (transform) an integral equation of some quantity, typically amplitude vs. time, into a sum of another quantity, typically amplitude vs. frequency, where harmonic frequencies show up as major terms of the sum.

Another way is to look at how non-linearity create harmonics. This is what I'll elaborate on here. Non-linearity is not something unknown for musicians, as soon as an amplifier or a microphone is non-linear, it creates harmonic distortion, which is just parasitic harmonic frequencies added to the amplified copy of the audio input. Harmonic distortion in music is also called... instrument timbre. So many different words for one physical effect!

Linearity of the restoring force: Spring

As an example of linearity, imagine a spring. If one elongates the spring they sense a restoring force, the larger the elongation and the larger the force, maybe to the point the spring cannot be extended further. In general a helical spring develops a restoring force exactly proportional to the elongation:

Such system is said linear as regards to its response to a perturbation. For more information on the linearity of springs, and some applications, a good read is the Wikipedia article on Hooke's law.

Linearity of the restoring force: Diapason

The diapason is an interesting instrument because it oscillates mostly without harmonic. Prongs oscillation occurs in the linear domain of metal elasticity, where the restoring force is proportional to the current distance from the rest position.

This (quasi-) linear elasticity exists for metallic material but only for small displacements, which means small energy transmitted to air and limited sound intensity. If we tried to create higher sounds, we would leave the linear domain and harmonics would appear.

We'll be back to the diapason later. Let's first see a truly non-linear system: The guitar string!

Guitar: Large oscillation, mostly non linear

An oscillating system like a vibrating string has also a rest position. When moved away from this position it develops a force, in the form of a tension, tending to restore the rest state, the larger the transverse distance from the rest position, the larger the longitudinal tension.

However the guitar string doesn't work in the small linear elasticity range of the diapason, it needs to produce powerful sounds, the string is "excited" with large inputs, to which the material is not able to respond in a linear way. The tension is not proportional to the transverse distance at a given point of the string:

(Right hand graph from Henrik B Pedersen and Jeppe Langeland Knudsen, adapted)

(Note: The figure above has been updated after @user1079505 comment on wrong value for amplitude x. Wrong/original figure is here.)

The amplitude of the restoring force tends to increase in greater proportion as we approach the elasticity limit and come a bit closer to the permanent deformation/breaking point. Other factors play a role, including the response is not time independent, the response also depends on previous perturbation of the string.

The result is the restoring force is not a scaled copy of the current string distance from its rest position and, adding complexity, at a given time, the scaling factor is not the same for all segments of the string.

This non-linearity between displacement amplitude and restoring tension is the origin of the harmonics. The actual mechanism is complex, but we'll see a simple case by looking again at the diapason, which after all is not totally linear...

Back to the diapason with its small non-linearity

Saying a diapason has no harmonics was an approximation. The diapason usually develops the second harmonic, and the detail of how this happens is a good example of the extreme sensibility of physical oscillating devices to asymmetry and non-linearity which is seen in action with strings.

Basically the prongs of a tuning fork oscillate in their common plane like cantilever beams, and the center of mass, seen from the top is kept motionless due to the symmetry of the displacements. However this is not the case for its vertical position.

When the prongs oscillate, their individual center of mass moves up and down by a small distance, following a circular arc. It also occurs at 440 Hz (or whatever frequency the fork is tuned for). This displacement of the mass induces a reaction in the vertical direction, the stem goes up and down by a very small amount.

The diapason is usually held against another support, e.g. a table. When doing so, prongs vibrations are transmitted to the support acting as an amplifier.

It appears the stem is more efficient to transmit vertical vibrations, and the table surface is more easily bent vertically than moved horizontally. Due to this selective amplification by the table, the very small vertical vibration has now more relative importance.

The frequency of the transverse wave and the center of mass wave being the same, this could still goes without consequences, however what is problematic is their waveform is different, one is a distorted sinusoid. And guess the reason for this distortion... Here we are: Non-linearity!

This graph is part of a study that is good to read. It shows the two oscillations (scales are not of the same order). While the transverse wave is almost sinusoidal, the vertical wave due to the mass displacement has peaks and lows of different shapes. The cause is the vertical oscillation alternates tension and compression forces in the stem, to which metal responds in a different way, with different velocities. We are left with two waves which naturally interfere, creating the 880 Hz harmonic:

This is a simple example of harmonics created by a small non-linearity, the principle is the same for other materials and vibrating devices, including guitar strings, though more elements are involved.

Linearity: A more precise definition

Technically we say it's an homomorphism, from homos- same and -morphe shape. That's big words, in practical here is a linear transformation:

BC and B'C' are linear transformations of each other. The definition of a linear system is:

• If input x produces output u, then for any number k, k.x must produce k.u. This means the output must be proportional to the input. If the input is increased by a factor k, then the output is increased by the same factor.

• If input x produces u, and input y produces v, then input k1.x + k2.y must produces k1.u + k2.v (k1 and k2 being any multipliers). It means the output produced by the sum is the same to the sum of the outputs from individual inputs.

That's all. Any system which has not the two properties above produces distortion / harmonics. It can happens for amplifiers, for vibrating devices, for cosmic waves, or the electrical grid. Harmonics are usually unwanted, but they can be difficult to remove.

• I don't understand your story of nonlinearity. E.g. if you pluck a string, you displace it, so you provide an initial shape. Fourier transform of this shape defines the harmonic content, and then energy is not transferred between various modes (I neglect here second order nonlinear effects, which you neglect as well). If you excite a string with a single frequency, e.g. by resonance, it will continue to vibrate with a single mode, and no new modes will be produced. Oscillations will be harmonic. Also a string fullfils both requirements of linearity you provide in the last section. Apr 27 '21 at 18:38
• Cont. If you excite string with twice larger amplitude it will vibrate the same way, but with twice larger amplitude. If you excite string with two frequencies, it will oscillate with two frequencies, the oscillation will be superposition of oscillations with each of the two frequencies. So (within certain limits) string is a good linear system. Apr 27 '21 at 18:41
• @user1079505: "If you excite string with twice larger amplitude it will vibrate the same way". That's the whole point, it won't, the way the string reacts to small inputs and large inputs is different. This creates ripples on the sinusoid, which show as harmonics after the FT.
– mins
Apr 27 '21 at 18:45
• This seems to contradict both my experience and my knowledge of physics. Can you support your claims with any reputable sources? Apr 27 '21 at 18:49
• 1. Harmonics are present on a guitar string primarily because they are excited already when you pluck the string. When you pluck the string you deflect it in a triangular shape, and Fourier transform of this shape defines the harmonic content. You don't need non-linear phenomena to explain that. 2. Pedersen and Knudsen studied a low tension copper wire oscillating at quite large amplitude. If you put parameters of actual acoustic, electric or classical guitar strings in Eq. 13 you'll find a much smaller effect. Apr 28 '21 at 14:31

You asked "Why doesn't a guitar string vibrate at one frequency only?". Let's look at it from the other perspective: Every kind of musical instrument makes sounds that have overtones in them, and every pitch played on every kind of instrument has multiple frequencies in it--not just on the guitar. There is no repeating, oscillating sound made by any musical instrument that has absolutely no overtones. The only sound that can exist that has no overtones would be a completely pure sine wave. You could only create a pure sine wave with an electronic oscillator. No acoustic or electro-acoustic musical instrument can create a sound that is similar to a pure sine wave.

• This answer doesn't explain the "why" behind the question. Apr 27 '21 at 22:06

It would vibrate only at the fundamental frequency if you excited it exactly at the middle and there were no losses in the material.

However, if you excite it randomly, it will go to an "equilibrium" status in which only standing waves multiple of fundamental frequency survive.

That is, in an ideal scenario you could generate only the desired harmonics if you excite an ideal string in the correct points.

• I don't know why this answer was down graded twice, except for hazing. It's just as good as many of the higher ranked answers. Maybe there is more that you could say about it.
– user50691
Apr 27 '21 at 18:14
• @ggcg The information in this answer is incorrect, or at best extremely unclear. What does it mean to "excite string in the middle"? Do you mean to pluck it, strike it or bow it in the middle? Then it would still have all odd harmonics, not only the fundamental. Apr 27 '21 at 22:42
• True it could be clearer but no one offered a suggestion and that seems cowardly. It is at least not-communal and we are a community.
– user50691
Apr 27 '21 at 23:55

Building on everyone's answers so far I'll provide a concrete example that you can play with: https://www.desmos.com/calculator/ii4bptqcb0 . In all of the examples you'll want to let the t variable change by pressing the play button next to the variable.

To understand this start with the basic version and understand that k is changing the phase of the 2nd harmonic.

After that you can see that in the original example v1 ... vk is the phase corresponding to each harmonic, so they can be tweaked.

Notice that when you load the experiment that the line is simulating the moment before the player releases the string like in leftaroundabout's diagram:

And after it is realeased it looks more like the final wave in the above diagram.

Also note that setting all of the parameters to 0 also gives a good approximation of a pluck: https://www.desmos.com/calculator/p8rpxes5tw

And then let the t variable "play". Notice how close this motion is to the motion we observe in this video:

I hope these examples help you get a concrete understanding of the other solutions.