
I mentioned above that a periodic vibration has a harmonic spectrum. The converse is also true: the sum of harmonic vibrations is a periodic vibration. These make up the two halves of Fourier's theorem. The second is easy to see. Let the fundamental frequency f have a period T. The second harmonic with frequency 2f has a period of T/2, so, after one vibration of the fundamental (after time T), the second harmonic has had exactly two vibrations, so the two waves are ready to start again with exactly the same relative position to each other, so they will produce the same combination that they did for the first cycle of the fundamental. The same is true for each harmonic nf, where n is a whole number. After time T, exactly n cycles of the nth harmonic have passed, and so all the harmonics are ready to start again for a new cycle. This is explained in more detail, and with diagrams, in What is a Sound Spectrum? The harmonic series is special because any combination of its vibrations produces a periodic or repeated vibration at the fundamental frequency f. The resonances of strings and pipes are not inherently harmonic. An ideal, homogeneous, infinitely thin or infinitely flexible string has exactly harmonic modes of vibration. So does an ideal, homogeneous, infinitely thin pipe. Real strings and pipes do not. We saw in the experiment that adding a mass  making the string inhomogeneous  makes the string inharmonic. (By the way, worn or dirty strings are also inharmonic and harder to tune. Washing them can help.) Real pipes have inharmonic resonances because of their finite diameter: the end effects are frequency dependent. The pipes of musical instruments are complicated by departures from cylindrical or conical shape (valves and tone holes). Some of these complications are there to improve the harmonicity, but the results are rarely perfect. For any one note, however, the lip or the reed performs the same (strongly nonlinear) role as the bow: the lip or reed undergoes periodic vibration and so produces a harmonic spectrum. Again, the operating mode of a brass or woodwind instrument playing a steady* note is a compromise among the tunings of all of the (slightly inharmonic) pipe resonances (mode locking again). * "steady" here means over a very long time. Measurements of frequency are ultimately limited by the Musician's Uncertainty Principle (which is almost the same as Heisenberg's Uncertainty Principle, see this explanation). If you play a note for m seconds, the frequency of its harmonics cannot be measured with an accuracy greater than about 1/m Hz. If your spectrum analyser measures over only k seconds, it cannot measure much more accurately than very roughly 1/k Hz. An interesting point about winds: the sound spectra of clarinets tend to have strong odd harmonics (fundamental, 3rd, 5th etc) and weak even harmonics (2nd, 4th etc), in their lowest register (but not in high registers). This effect is discussed in "pipes and harmonics" and "flutes vs clarinets". Real strings also have inharmonic resonances because they are not infinitely thin or flexible, and so do not bend perfectly easily at the bridge and the nut. This bending stiffness affects the higher modes more than the lower, so the 'harmonics' are stretched, compared with harmonics. Solid strings are less idealy than wound strings, steel strings are less ideal than others, pianos  especially little pianos  are less ideal than harps. The inharmonicity disappears when the strings are bowed, but is more noticeable when they are plucked or struck. Because the bow's stickslip action is periodic, it drives all of the resonances of the string at exactly harmonic ratios, even if it has to drive them slightly off their natural frequency. Thus the operating mode of a bowed string playing a steady note is a compromise among the tunings of all of the (slightly inharmonic) string resonances. This phenomenon is due to the strong nonlinearity of the stickslip action. It is called mode locking.)
