I know that the difference between two musical notes is given by the sound frequency, and the difference in volume is given by the amplitude.

What I am wondering is why does the same note sound different on different musical instruments?
What in the wave makes the difference between the sound of a harmonica and the sound of a violin singing the same note?

2 Answers
2

The different tonality of a note in different instruments stems from the different mixes of amplitudes in the harmonic frequencies that the instrument provides.

To be more concrete (and keeping to a slightly simplified view), you play the A note (440 Hz) and then you have the harmonic frequencies 880, 1320, 1760, ... ($440n$ where $n$ is the number of the harmonic). Each of the frequencies will have an amplitude or "volume" contributing to the sound produced by an instrument. Thus a particular set of amplitudes gives the instrument its tonality.

This is highly related to the concept of Fourier analysis used in many areas of physics.

It's not just a pure single frequency of sound that is being transmitted by an instrument. Just like with light, if you ask the frequency of the sun's emission, the answer would be that it's a whole broad spectrum (hence its ability to produce a rainbow, or allow objects to reflect colours other than yellow) but its peak frequency is yellow. You can ask for a distribution of the colours (or light frequencies) that it transmits, and you'll get a plot of intensity vs light frequency (this is also known as the Fourier Transform of the plot of the actual amplitude of light waves travelling from the sun)... the plot will peak at the frequency represented by yellow light.

You will see something similar for a sound note. If you look at the Fourier transform of the middle C played by a piano string (approximately 262 Hz), you will see a plot with a bunch of hills and valleys, the tallest hill peaking at 262 Hz, the second tallest at 524 Hz, the third tallest at 786 Hz, etc (note that they are integer multiples of the note itself) but those hills will have some shape to them meaning that other frequencies outside of the peak note are represented in the note itself. It's the shape of those hills (as well as the ratio of the peak of those hills to the following integer multiple peaks) that determine the style of the sound.