Why does the same frequency sounds differ?

  • Thread starter !kx!
  • Start date
  • Tags
    Frequency
In summary: Hz) is recognised and the sound you hear is just that, the sound of middle-C on the piano.All you need to do to get zillions of harmonics is amplify your tones until they overload the amplifier.But real instruments have startup and decay transients and tremulo and vibrato (oft caused by the inevitable coupling between the vibrations of one string and another and the ELIPTICAL motion of precessing strings.Many string instruments use 2 or 3 strings per note especially to enhance this effectDue to temperature changes (speed of sound) a reed organ pipe goes out of tune with the other pipes of the same organ - giving beats.All you need to
  • #1
!kx!
58
0
Hi

I am trying to generate tones using computer software. I generated a sine wave tone for a frequency of 261.63 Hz, corresponding to middle-C key on a keyboard/piano. But this sound produced is completely different from when I generate it on the instrument.

Shouldn't all the sounds of same frequencies sound the same? :grumpy:

Could the difference be because of the specific software I am using (and not something wrong with naturally occurring sound waves :biggrin:) ?
 
Physics news on Phys.org
  • #2
Not all (sound) waves are sinusoidal
Look up waveforms
 
  • #3
The difference in sound is not because of your software. It is because most "real" sounds are composed of more than just one frequency. What you have generated is only the fundamental tone of the note middle C. The timbre of a piano--its distinctive sound--is a sum of many harmonics of that pure sine wave you made, as well as some effects due to the physics of the piano's strings and its geometry. To be able to create an authentic piano sound you would probably have to model it with techniques from signal processing.
 
Last edited:
  • #4
cwilkins is correct. A synthesized pure frequency sounds very dull. The rich sound of real instruments is precisely because there is a broad spectrum of other sounds besides the pure frequency.

If you listen to synthesizers in the 80's when they first became popular you can easily hear the very artifical sounding tone. This is precisely because the computers of the time were limited and could produce tones with only a very few harmonics, if any. As computer power progressed, more harmonics could be added, making synthesized tones be further and further from an ideal pure tone and closer to natural tones.
 
  • #5
DaleSpam said:
cwilkins is correct. A synthesized pure frequency sounds very dull. The rich sound of real instruments is precisely because there is a broad spectrum of other sounds besides the pure frequency.

If you listen to synthesizers in the 80's when they first became popular you can easily hear the very artifical sounding tone. This is precisely because the computers of the time were limited and could produce tones with only a very few harmonics, if any. As computer power progressed, more harmonics could be added, making synthesized tones be further and further from an ideal pure tone and closer to natural tones.

All you need to do to get zillions of harmonics is amplify your tones until they overload the amplifier.
But real instruments have startup and decay transients and tremulo and vibrato (oft caused by the inevitable coupling between the vibrations of one string and another and the ELIPTICAL motion of precessing strings.
Many string instruments use 2 or 3 strings per note especially to enhance this effect
Due to temperature changes (speed of sound) a reed organ pipe goes out of tune with the other pipes of the same organ - giving beats.
 
  • #6
Drmarshall said:
All you need to do to get zillions of harmonics is amplify your tones until they overload the amplifier.
But real instruments have startup and decay transients and tremulo and vibrato (oft caused by the inevitable coupling between the vibrations of one string and another and the ELIPTICAL motion of precessing strings.
Many string instruments use 2 or 3 strings per note especially to enhance this effect
Due to temperature changes (speed of sound) a reed organ pipe goes out of tune with the other pipes of the same organ - giving beats.

This is really interesting. They should have a 'music physics' course in every university.
 
  • #7
Thanks for the replies.

If I get it correctly.. then you mean to say that the piano sound of middle-C contains all the harmonics of the fundamental frequency 261.63 Hz.

But that should not be the case... since the 'C' of all the octaves are harmonics of each other. (261.63, 523.25, 1046.5, 2093, 4186 Hz).

If the middle-C contains all the harmonics of the fundamental frequency, then, e.g., playing middle-C alone, should be indistinguishable from playing it with the C of the higher octaves... But there is an observable difference..

What am I missing?
 
  • #8
The harmonics are softer than the main note.
 
  • #9
!kx! said:
Thanks for the replies.

If I get it correctly.. then you mean to say that the piano sound of middle-C contains all the harmonics of the fundamental frequency 261.63 Hz.

But that should not be the case... since the 'C' of all the octaves are harmonics of each other. (261.63, 523.25, 1046.5, 2093, 4186 Hz).

If the middle-C contains all the harmonics of the fundamental frequency, then, e.g., playing middle-C alone, should be indistinguishable from playing it with the C of the higher octaves... But there is an observable difference..

What am I missing?

We talk of the "timbre" of a piano. Thus we recognise it from how it sounds.



Middle C on the piano starts with anharmonic "noise" for a millisec or so while the higher anharmanic frequencies die out
But pretty soon the "interference" between waves on the string leaves behind only SLOWLY decaying harmonics of intensities depending WHERE on its length the string was struck and how HARD it was struck and how quickly the hammer lay in contact with it before it bounced off.

The ear is HORRIBLY nonlinear and the brain (TWO WAY communication real-time with the cochlea!) does a marvellous job of sorting it out to our satisfaction (acting as both judge, jury and audience!).
Among many other things the brain SUPPLIES the fundamental tone if perchance in the "real world" it be absent!
 
  • #11
!kx! said:
I am trying to generate tones using computer software. I generated a sine wave tone for a frequency of 261.63 Hz, corresponding to middle-C key on a keyboard/piano. But this sound produced is completely different from when I generate it on the instrument.
It is the same note or tune. If not, your instrument needs tuning. The note (tune) is determined by the frequency and will be recognised as such. The actual sound is different as you have noticed. A piano, guitar and singer can all follow the same tune yet sound different.

The octave thing you asked in a later post (where C4 and C5 have different frequency yet are said to be the same note) is just to do with the arbitary definitions of western music. We call it the same note but 1 octave higher, but only because the guy who taugt us called it that, and he the guy before him, back until whenever it was defined.
 
  • #12
how boring music would be if all instruments sounded the same
 
  • #13
I think it's a shame that you guys always forget to mention the fact that real instruments generate Overtones and not Harmonics. Overtones of distributed mechanically oscillating systems are not necessarily exactly harmonically related to the fundamental - because of end effects and the finite width of air columns etc.. This means, for instance, that brass instruments with conical bores will sound markedly different from the equivalent instrument with cylindrical bores (Trumpet vs Cornet etc.). Synthesising overtones is a lot harder than sysnthesising harmonics and there's no point in sampling instruments and scaling up and down to produce different notes because the relationships between overtones and harmonics will vary over the scale. You can't fool an experienced ear'ole.
 
  • #14
sophiecentaur said:
I think it's a shame that you guys always forget to mention the fact that real instruments
Real instruments? I am out of here before the electro/synth/whatever lynchmob turns up. They are musicians after all. How can you say it's not a "real" instrument? I don't like synth pop stuff but I can play a guitar and I would never say that wasn't real music or wasn't a real instrument.

It really bugs me how electric violins sound like saxophones.
 
  • #15
Sophiecentaur that is a good point. Edit: In a real piano tone there will be some bandwidth (frequency spread) on the harmonics.

For anyone who is curious, I have attached a Fourier spectrum of a piano being struck on the note C3, which has a fundamental frequency of approximately 130 Hz. The solid (unshaded) curve on top depicts the frequency content of the the tone after it has just been struck. The solid orange plot is the frequency content of the sustained note after the transients have decayed (≈200ms). The horizontal axis is in Hz and the vertical axis is in increments of 6 dB. (The top of the plot is -24 dB.)

Link to the picture: http://www.ocf.berkeley.edu/~cwilkins/piano_sustained_c2.png
Link to the piano tone: http://www.ocf.berkeley.edu/~cwilkins/piano_c2.wav
 
Last edited:
  • #16
d3mm said:
Real instruments? I am out of here before the electro/synth/whatever lynchmob turns up. They are musicians after all. How can you say it's not a "real" instrument? I don't like synth pop stuff but I can play a guitar and I would never say that wasn't real music or wasn't a real instrument.

It really bugs me how electric violins sound like saxophones.

An electric guitar has strings which have overtones and not harmonics (albeit at nearly the same frequencies a harmonics). Any non linear amplification will produce harmonics too, of course. The more 'fuzzy', the more the harmonics will dominate.

cwilkins said:
Sophiecentaur that is a good point, and you are indeed correct in the general case. However for a piano it is definitely the harmonics of a fundamental tone which generate its distinctive sound. You would be able to tell the tone was from a piano just from a sum of harmonics with a characteristic envelope. (Of course, there must a small amount of non-linearity to achieve a real-sounding timbre.)

For anyone who is curious, I have attached a Fourier spectrum of a piano being struck on the note C3, which has a fundamental frequency of approximately 130 Hz. The solid (unshaded) curve on top depicts the frequency content of the the tone after it has just been struck. The solid orange plot is the frequency content of the sustained note after the transients have decayed (≈200ms). The horizontal axis is in Hz and the vertical axis is in increments of 6 dB. (The top of the plot is -24 dB.)


Link to the picture: http://www.ocf.berkeley.edu/~cwilkins/piano_sustained_c2.png
Link to the piano tone: http://www.ocf.berkeley.edu/~cwilkins/piano_c2.wav

From the plot you can see that the piano's distinctive sound really does come from a sum of these harmonics.
I don't think those plots show that the overtones are exact harmonics. The spectrum analyser has a finite bandwidth and cannot distinguish between the two ( which are close for strings). Your ear will be able to spot beats between harmonics (ear generated) and overtones (from the strings), which will give the 'pianoness' of what you hear.

A harmonic is an exact multiple of a fundamental and is formed when a single tone hits a nonlinearity. Where is the nonlinearity in a gently struck string? The Overtones correspond to the natural modes of the string. The difference will be small or large, depending upon the instrument but it is fundamental (no pun intended).

I am amazed that the clear distinction is not acknowledged more widely. But, in a world where the term Fourier is bandied about very casually, it is hardly surprising.
 
  • #17
Looks like a harmonic to me: 130-260-390-540 etc are integer multiples above the base of 130
 
  • #18
I see what you are saying. To be clear, my point is that the piano does follow a "sum of modes" model, and that the highest-amplitude frequencies present are those at integer multiples of the fundamental tone. There's a certain amount of bandwidth on the harmonics; I am not saying that the sound is only composed of those pure frequencies. For the sake of this argument I will agree that they are not harmonics in the strictest sense.
 
  • #19
d3mm said:
Looks like a harmonic to me: 130-260-390-540 etc are integer multiples above the base of 130

It "looks to me" that the accuracy of the frequency measurement is in question - as in all things. Can you (and the measuring equipment) really resolve those frequencies to that degree of accuracy? If it is a digital system then all results are quantised, in any case and the apparent bandwidth in those photos is significant (which it has to be as the sample time is pretty short for an 'struck' and decaying note). The point I am making is that those frequencies come from the vibrational modes, which are Overtones - which often nearly coincide with harmonics of the zerth overtone (the fundamental). It is sloppy terminology that's used and sloppy terminology, in other cases, seems to be important to PF. How bad (what error) would it need to be before the difference in actual frequency value would be enough to acknowledge the difference in name?
 
  • #20
cwilkins said:
I see what you are saying. To be clear, my point is that the piano does follow a "sum of modes" model, and that the highest-amplitude frequencies present are those at integer multiples of the fundamental tone. There's a certain amount of bandwidth on the harmonics; I am not saying that the sound is only composed of those pure frequencies. For the sake of this argument I will agree that they are not harmonics in the strictest sense.

Which seems, to me, to be a good reason for giving them the correct name. :smile:
It could avoid a lot of confusion at times.
The word Harmonic is also often used wrongly when describing many other of the products when a signal passes through a non-linearity. People must just lurve it so much - it is a nicer sounding word than Overtone, Intermodulation or Cross modulation, which sound a bit deprecating.
 
  • #21
An important example of when the difference in frequency between a harmonics and an overtone is highly relevant is when a quartz crystal is used in an oscillator. You will find that crystals have their frequency specified as, say, a third overtone. It is possible, in error, to make the crystal oscillate at its fundamental frequency and then produce and filter out its fourth harmonic, using a circuit that looks almost identical to a circuit that will produce the correct (third overtone) frequency. The frequencies of the two oscillators are often very close but they are not the same. If the manufacturers mixed up their terms, they would be taken to court for mis-representation; at the very least, everyone would want their money back.
Why can't everyone be as accurate in their terminology? In fact, why do so many people argue against using the right words? It's not the most difficult bit of Physics to get a grasp of.
For every PF member who falls, like a ton of bricks, on someone who uses the word weight when they really mean mass, there is another member who says that a harmonic is the same as an overtone.
 
  • #22
sophiecentaur said:
Why can't everyone be as accurate in their terminology? In fact, why do so many people argue against using the right words? It's not the most difficult bit of Physics to get a grasp of.
For every PF member who falls, like a ton of bricks, on someone who uses the word weight when they really mean mass, there is another member who says that a harmonic is the same as an overtone.
Isn't that a bit of an arbitrary distinction when we're talking about real musical instruments? The "fundamental frequency" really includes some nonzero bandwidth, yet we don't have a terminology problem with that. The "overtones" may be known to be significantly different from pure harmonics of the fundamental, but they will are integer multiples of some frequency contained in the band if you want to be that precise.

When you start to analyze the overtones carefully then you will find some overtones on some instruments are more "anharmonic" than others, and that this affects the "sound" of the instrument, but by the time you are measuring the overtones then there won't be much confusion anyway.
 
Last edited:
  • #23
olivermsun said:
Isn't that a bit of an arbitrary distinction when we're talking about real musical instruments? The "fundamental frequency" really includes some nonzero bandwidth, yet we don't have a terminology problem with that. The "overtones" may be known to be significantly different from pure harmonics of the fundamental, but they will are integer multiples of some frequency contained in the band if you want to be that precise.

When you start to analyze the overtones carefully then you will find some overtones on some instruments are more "anharmonic" than others, and that this affects the "sound" of the instrument, but by the time you are measuring the overtones then there won't be much confusion anyway.

Absolutely not right. You appear to be missing my point entirely and to mis-informed about what is really happening with a 'mechanically resonant' musical instrument. I think this sort of misconception must account for the common mis-use of the term Harmonic.
The modes that are excited in a vibrating string, membrane or volume are all quite independent of each other. Whilst strings, which have a well defined end, have natural modes that are pretty near harmonically related, if you take a round membrane (drum) the modes are nothing like harmonically related. http://hyperphysics.phy-astr.gsu.edu/%E2%80%8Chbase/music/cirmem.html
When it is forming itself, the oscillation in a plucked string will take a time to settle down and this will result in a re-arrangement of the energy in the various modes but there is only a 'bandwidth' due to the changing amplitudes (as in Amplitude Modulation). There will be a bandwidth associated with the resonance under an externally applied oscillation and that will be associated with the Q factor of the system. No such thing occurs when the string is plucked with an impulse - when the natural modes will be the only frequencies present (there are no other solutions to the equation of motion of the system).
Whilst many of the overtones are 'near harmonic' (and I would guess that this is what represents a 'good sounding' instrument) there are many anharmonic tones in some instruments and you could not formulate a mechanism whereby they could possibly be generated, starting with the fundamental; how would you get phase continuity to produce an anharmonic product. Any bandwidth considerations would be due to the measurement system.
 
  • #24
sophiecentaur said:
Absolutely not right. You appear to be missing my point entirely and to mis-informed about what is really happening with a 'mechanically resonant' musical instrument. I think this sort of misconception must account for the common mis-use of the term Harmonic.
I think you need to step back sometimes before you reply and consider the possibility that other readers may have a better understanding of a topic than you give them credit for.

The modes that are excited in a vibrating string, membrane or volume are all quite independent of each other. Whilst strings, which have a well defined end, have natural modes that are pretty near harmonically related, if you take a round membrane (drum) the modes are nothing like harmonically related.
I kind of took from earlier posts that we were talking about piano and guitar strings. I grant you that what happens on a drum or a set of cymbals is not at all the same.

When it is forming itself, the oscillation in a plucked string will take a time to settle down and this will result in a re-arrangement of the energy in the various modes but there is only a 'bandwidth' due to the changing amplitudes (as in Amplitude Modulation). There will be a bandwidth associated with the resonance under an externally applied oscillation and that will be associated with the Q factor of the system. No such thing occurs when the string is plucked with an impulse - when the natural modes will be the only frequencies present (there are no other solutions to the equation of motion of the system).
The changing amplitude (time dependence) of the vibration is certainly associated with a bandwidth. Also be aware that the pitch in a real string changes from attack through the decay.

Whilst many of the overtones are 'near harmonic' (and I would guess that this is what represents a 'good sounding' instrument) there are many anharmonic tones in some instruments and you could not formulate a mechanism whereby they could possibly be generated, starting with the fundamental; how would you get phase continuity to produce an anharmonic product.
Of course I could formulate such a mechanism. One example is called the "stiffness of the string." You can look it up.
 
Last edited:
  • #25
I don't mind being wrong and I agree with most of your points. It's quite hard to assess the knowledge level behind a post without either recognising the name or seeing a suitable reference. (And vice versa, I'm sure) BTW, on re-reading it, I can see that first sentence of mine was a bit OTT - sorry.

In the specific case of a string I have agreed that the overtones are near-harmonically related - but does that mean that they really are harmonics? A string is about the only musical instrument that behaves like that, though. You don't need to go as far as a circular membrane - a brass instrument is a really good example of a note with some really odd overtones, or a bell. Don't those two examples make my point about the right terms to use?

You seem to be suggesting that you could excite a string at its fundamental frequency and it would produce harmonics (a non-linear product) just because of stiffness (a linear function). I don't understand that.

But are we really arguing whether or not there is a difference between Harmonics and Overtones?
 
  • #26
One way string stiffness causes anharmonicity is by introducing dispersion. The additional restoring force due to stiffness is dependent on the wavenumber. Higher modes will have a therefore have a slightly faster wave speed and hence a higher frequency.

A bell (or a xylophone bar) is even stiffer than a string.

For a horn the effective length of the column is slightly different for each mode, also leading to anharmonicity.

My original point was just that mixing up "overtones" and "harmonics" for the above examples doesn't seem to me like such a "physics crime." If you want to take the strictest possible definition, no musical instrument (or anything else I can think of) has true "harmonics." At best we're talking about identifying "the things that would be harmonics (if the world were linear)." Of course I agree that a real instrument also makes lots of other sounds which are not even remotely "harmonics" but are definitely part of the characteristic "sound."
 
  • #27
Cool, I learned some stuff in this argument. Anyways, cwilkins, it looks like the bandwidth that is visible in your piano power spectrum could be limited by the sample rate used. I can't really tell by eye if that's the case. Did you use a window function?
 
  • #28
I always thought the harmonics arise, at least in a stringed instrument, because the "pluck" creates an initial condition shaped like a triangular wave, and the Fourier decomposition of that wave has strong contributions from the string's fundamental frequency and multiples thereof.

So a single pluck will never produce a single note anyway.

Furthermore in reality even a professional cannot pluck the string perfectly halfway along its length, leading to an assymetric initial condition and contributions from odd sinusoids as well as even. Plus, the resonant cavity's shape is so complicated that the sounds are amplified/decay with all sorts of complicated maths.

End result: a very complicated non-sinusoid waveform that does, however, have its dominant frequency as the note that was originally intended.
 
  • #29
MikeyW said:
I always thought the harmonics arise, at least in a stringed instrument, because the "pluck" creates an initial condition shaped like a triangular wave, and the Fourier decomposition of that wave has strong contributions from the string's fundamental frequency and multiples thereof.

So a single pluck will never produce a single note anyway.

Furthermore in reality even a professional cannot pluck the string perfectly halfway along its length, leading to an assymetric initial condition and contributions from odd sinusoids as well as even. Plus, the resonant cavity's shape is so complicated that the sounds are amplified/decay with all sorts of complicated maths.

End result: a very complicated non-sinusoid waveform that does, however, have its dominant frequency as the note that was originally intended.

Fourier analysis applies to time varying waveforms, which can be described in either the time domain or the frequency domain. When you pluck a string, the resulting vibrations are given as solutions to the wave equation of the string and the initial conditions - such as the length of the string and where it is plucked. That will give the amplitudes of the natural modes of the string, which may or may not be harmonically related. Fourier analysis of the shape of the string is not going to give you the resulting time variation of the string (the sound); it's the wrong calculation to do.
 
  • #30
sophiecentaur said:
Fourier analysis applies to time varying waveforms, which can be described in either the time domain or the frequency domain...Fourier analysis of the shape of the string is not going to give you the resulting time variation of the string (the sound); it's the wrong calculation to do.

For the linear problem, one approach might be to do a Fourier decomposition of the initial "plucked" shape, as MikeW describes, into a sum of string modes. Since you know the amplitude (and phase) of every mode at t=0, and you get the time evolution by advancing the phase of all the independent modes and adding them together again.
 
Last edited:
  • #31
olivermsun said:
For the linear problem, one approach might be to do a Fourier decomposition of the initial "plucked" shape, as MikeW describes, into a sum of string modes. Since you know the amplitude (and phase) of every mode at t=0, and you get the time evolution by advancing the phase of all the independent modes and adding them together again.

Once the modes are established, in their relative amplitudes, then the output (time varying) waveform can be established. My point was that the modes are not simply the result of Fourier analysis of the 'spatial shape' of a system - that is found differently. The modes are strictly Overtones and not necessarily harmonically related - although they are pretty near, numerically for a string. It is probably easier to consider a 'bowed' string, rather than a 'plucked' string because it is a steady state situation.
 
  • #32
sophiecentaur said:
My point was that the modes are not simply the result of Fourier analysis of the 'spatial shape' of a system - that is found differently. The modes are strictly Overtones and not necessarily harmonically related - although they are pretty near, numerically for a string.
The "modes" ARE the spatial Fourier modes of the string! For each mode number [itex]n[/itex] with wavelength [itex]\lambda_n = L/n[/itex], where [itex]L[/itex] is the string length, there will be a corresponding overtone at frequency [itex]f_n[/itex]. This is results directly from the frequency-wavelength relationship [itex]f_n = c/\lambda_n[/itex], where [itex]c[/itex] is linear wave speed in the string. Since every mode has nodes (zeros) at the ends of the string, it follows that every overtone must occur at exactly a harmonic of the fundamental frequency [itex]f_1[/itex].

For the ideal undamped string, it means that you can get the frequency spectrum for all time by simply Fourier transforming the initial shape of the string in space and converting the wave numbers to frequency using the wave speed relationship!

It is probably easier to consider a 'bowed' string, rather than a 'plucked' string because it is a steady state situation.
A bowed string is NOT a steady state condition and is much more complicated than a plucked string! (See "Helmholtz motion" for anyone who is interested.)
 
Last edited:
  • #33
A string is probably the most ideal of all the instruments and a piano or harp are seen more ideal. You say the end is the same for all modes. That can't really apply to strings resting on a nut, bridge or fret. With an air column (very three dimentional) it's even more extreme, so the modes do not have the same end points. Is this not acknowledged by the use of the term 'end effect'?
This means the modes are not necessarily harmonically related. So we are now dealing with what can only be described as something different: why not Overtones?
Would it not be inconsistent to use the term Harmonic sometimes and Overtone on other occasions? Where would you draw the line?
 
Last edited:
  • #34
DaleSpam said:
A synthesized pure frequency sounds very dull.

Quite close to recorder if memory serves me well.
 
  • #35
Recorder. AArrrrgh!
"Little bird, I have heard, what a pretty song you sing... etc"
 

Similar threads

Replies
9
Views
1K
  • Classical Physics
Replies
5
Views
371
Replies
2
Views
999
Replies
1
Views
1K
Replies
15
Views
2K
  • Electromagnetism
Replies
11
Views
4K
Replies
8
Views
564
Replies
20
Views
3K
  • Introductory Physics Homework Help
Replies
23
Views
2K
  • Electromagnetism
Replies
4
Views
2K
Back
Top