DSPRelated.com
Forums

Pitch Estimation using Autocorrelation

Started by olivers September 7, 2005
Rune Allnor wrote:

   ...

> I agree that the violin when played with a bow, is > subject to a quasi-periodic source (the acoustics > book "Theoretical Acoustics" by Morse and Ingard > contains a very nice discussion about this. Did you > read that book?). This ensures a sustained sound > (as opposed to a fading tone as with the piano) > but I don't think it determines the pitch.
It does determine the pitch, The string and bow hair stick (with rosin's help) as the bow is drawn, displacing the string until the friction force exceeds the tension in the bow hairs. (Pressing harder increases the friction force, displacing the string more and producing a louder sound.) Static friction exceeding dynamic friction, the string snaps back when the bond breaks, overshooting, then slowing, reversing, and again sticking to the bow. Excitation is therefore continuous (on time scales longer than a cycle) and periodic, the period being determined by the resonance of the string. A whistle or organ pipe (flue pipe; reeds are a bit different) has a fundamentally similar mechanism. The diagrams and descriptions in http://nersp.nerdc.ufl.edu/~bodinew/Pages/SoundCharac.html#Flues will give you a good idea of their construction. The air stream flowing in the mouth is divided by the lip, and Bernoulli effect give the structure has positive feedback. When the flow is larger inside the pipe than out, more of the stream tends to go there. Vice versa. Increased flow in the pipe raises the pressure and decreased flow lowers it. The Bernoulli effect is strong enough to maintain the one-sided flow, but not much stronger. The pressure pulse -- positive or negative -- is reflected by the impedance mismatch at the end of the pipe. When the reflected pulse reaches the lip after a round trip, it overcomes the air stream's tendency to stay on one side and blows (or sucks) it to the other. The air stream switched sides in the time needed by sound to make a round trip in the pipe. Excitation is continuous and periodic at a rate determined by the resonance. Dog whistles and police whistles work the same way, but not the whistle sounds that people make. The positive feedback in an organ pipe is weak, so the attack time of an acoustic organ is long. Structures with high feedback gain produce unpleasant spectra. With a police whistle, that can be an advantage. ... Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:
> Rune Allnor wrote: > > ... > > > I agree that the violin when played with a bow, is > > subject to a quasi-periodic source (the acoustics > > book "Theoretical Acoustics" by Morse and Ingard > > contains a very nice discussion about this. Did you > > read that book?). This ensures a sustained sound > > (as opposed to a fading tone as with the piano) > > but I don't think it determines the pitch. > > It does determine the pitch, The string and bow hair stick (with rosin's > help) as the bow is drawn, displacing the string until the friction > force exceeds the tension in the bow hairs. (Pressing harder increases > the friction force, displacing the string more and producing a louder > sound.) Static friction exceeding dynamic friction, the string snaps > back when the bond breaks, overshooting, then slowing, reversing, and > again sticking to the bow. Excitation is therefore continuous (on time > scales longer than a cycle) and periodic, the period being determined by > the resonance of the string.
Exactly. The bow keeps the string resonating, the vibration of the string being amplified in the resonance cave of the violin to produce the sound. How do you manipulate the bow to adjust the pitch? Don't you adjust the length of the resonant part of the string by pressing it towards the "neck" of the violin? Rune
Rune Allnor wrote:
> Jerry Avins wrote: > >>Rune Allnor wrote: >> >> ... >> >> >>>I agree that the violin when played with a bow, is >>>subject to a quasi-periodic source (the acoustics >>>book "Theoretical Acoustics" by Morse and Ingard >>>contains a very nice discussion about this. Did you >>>read that book?). This ensures a sustained sound >>>(as opposed to a fading tone as with the piano) >>>but I don't think it determines the pitch. >> >>It does determine the pitch, The string and bow hair stick (with rosin's >>help) as the bow is drawn, displacing the string until the friction >>force exceeds the tension in the bow hairs. (Pressing harder increases >>the friction force, displacing the string more and producing a louder >>sound.) Static friction exceeding dynamic friction, the string snaps >>back when the bond breaks, overshooting, then slowing, reversing, and >>again sticking to the bow. Excitation is therefore continuous (on time >>scales longer than a cycle) and periodic, the period being determined by >>the resonance of the string. > > > Exactly. The bow keeps the string resonating, the vibration of > the string being amplified in the resonance cave of the violin > to produce the sound. > > How do you manipulate the bow to adjust the pitch? > Don't you adjust the length of the resonant part of the > string by pressing it towards the "neck" of the violin?
Yes. For a given tension, the period is proportional to the length, just as with an (ideal) organ pipe. Pythagoras knew that. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
I repeat, please read a book about Musical Acoustics!
Backus, John, The Acoustical Foundations of Music, 2nd Ed.,
New York:W.W. Norton Co.,(1977).

is an oldie, but a goody.

Chip Wood


"Rune Allnor" <allnor@tele.ntnu.no> wrote in message
news:1126807950.879563.180550@o13g2000cwo.googlegroups.com...

> This is where you are wrong. > > There are no periodic or aperiodic sources in the drums > or string instruments (here "strings" include violins > pianos, guitars).
Your statement above is pure nonsense. All musical instruments can be explained using the source-filter model. The source (glottis, lips, strings, reeds, membranes) provides the excitation energy and periodicity. The body, tube, or sounding board filter these energies into the final output. In any string instument, the length, tension, and the mass density of the string(s) determine the periodicity and harmonics. Whether they are struck or bowed. The drum being a membrane is slightly different . If you assume the outer circular edge of the membrane constitutes a fixed boundary condition, the fundamental frequency is inversely proportional to the radius, directly proportional to the square root of the tension, and inversely proportional to the square root of the mass per unit area. Drums excite in different modes depending on place and energy of being struck.
> > There is a vast difference between "a periodic source" > and "a resonant system" that can be excited with > an impulse excitation. This subtle difference is > what this whole thread has revolved around.
Nothing subtle about it. Name me one purely "periodic source" without an accompaning "resonant system", besides a tuning fork (which usually has a resonate box to amp the sound) or a sine, sq, or saw-tooth wave generator. Even an electric guiter has a pick-up, amp, effects box, and loudspeaker acting as its resonate system.
Chip Wood wrote:
> "Rune Allnor" <allnor@tele.ntnu.no> wrote in message > news:1126807950.879563.180550@o13g2000cwo.googlegroups.com... > > > This is where you are wrong. > > > > There are no periodic or aperiodic sources in the drums > > or string instruments (here "strings" include violins > > pianos, guitars). > > Your statement above is pure nonsense. All musical > instruments can be explained using the source-filter model. > The source (glottis, lips, strings, reeds, membranes) > provides the excitation energy and periodicity. The body, > tube, or sounding board filter these energies into the final > output.
What nonsense? Rune is differentiating between continuous periodic energy sources and impulse energy sources. The excitation sources you mention confuse a mix of continuous and decaying sources (blown reed versus impacted membrane). Impulse sources initiate the exchange of energy between resonant systems, but the original energy source (hammer/drumstick strike) often isn't periodic. IMHO. YMMV. -- rhn A.T nicholson d.O.t C-o-M
Actually, Chip is quite right. All musical instruments can be explained
using the source-filter model. The source may be periodic but it need
not be. Even a drum can be explained that way.

Regarding Rune's original assertion that human voice is special and
different from musical instruments: Both can be modeled with the
source-filter model. Where I see the difference is that the human voice
apparatus typically is capable of producing many more different sounds
than one instrument. To improve the voice model one typically uses two
sources in the source-filter model, an impulse train and white noise
and then one switches between the two.

Nevertheless, this is only a model. The glottis signal certainly is not
an impulse train. However, it can be modelled as an impulse train that
has been filtered. This "filter" is simply included when the "vocal
tract filter" of the source-filter model is estimated. It is the same
with a string instrument. Here, too, we have a source which can be
modeled as an impulse train which is shaped by a filter.

In a previous mail Rune wrote:
> You are right in that the resonance is what drives the > pitch of most sources, it is not what drives the pitch > of the human voice.
and in another:
> The bow keeps the string resonating, the vibration of > the string being amplified in the resonance cave of the violin > to produce the sound.
I think you are contradicting yourself here. The string is the source and it determines the pitch. The resonance cave of the violin is what shapes the source signal and acts as a filter. It is not the resonance that determines the pitch. Unless your are using the term "resonance" in a rather confusing way and I have misunderstood you. Marcus
Agreed, but the statement was "There are no periodic or
APERIODIC (emphasis added) sources in the drums or string
instruments".  There is ALWAYS a source of input energy and
there is ALWAYS a resonant "something" that filters that
source energy.
-- 
Chip Wood

<rhnlogic@yahoo.com> wrote in message
> Impulse sources > initiate the exchange of energy between resonant systems, > but the original energy source (hammer/drumstick strike)
often
> isn't periodic.
Speedy wrote:
> > The bow keeps the string resonating, the vibration of > > the string being amplified in the resonance cave of the violin > > to produce the sound. > > I think you are contradicting yourself here. The string is the source > and it determines the pitch. The resonance cave of the violin is what > shapes the source signal and acts as a filter. It is not the resonance > that determines the pitch. Unless your are using the term "resonance" > in a rather confusing way and I have misunderstood you.
There are at least *two* resonances involved, in the case of the violin, the resonance of the string and the resonance of the violin body; in the case of the voice, the resonance of the vocal chords/folds and the resonance of the throat/head cavity. In voiced situations, normally the first resonances above determines the pitch. IMHO. YMMV. -- rhn A.T. nicholson d.O.t C-o-M
Chip Wood wrote:
> I repeat, please read a book about Musical Acoustics! > Backus, John, The Acoustical Foundations of Music, 2nd Ed., > New York:W.W. Norton Co.,(1977). > > is an oldie, but a goody. > > Chip Wood > > > "Rune Allnor" <allnor@tele.ntnu.no> wrote in message > news:1126807950.879563.180550@o13g2000cwo.googlegroups.com... > > > This is where you are wrong. > > > > There are no periodic or aperiodic sources in the drums > > or string instruments (here "strings" include violins > > pianos, guitars). > > Your statement above is pure nonsense. All musical > instruments can be explained using the source-filter model. > The source (glottis, lips, strings, reeds, membranes) > provides the excitation energy and periodicity. The body, > tube, or sounding board filter these energies into the final > output.
My statement above was impresice. I could have mentioned the "impulse source", but that too would have been wrong. The string is lifted off its initial state, storing energy. The string is released when the finger slips off it. This causes the string to vibrate resonantely, as it releases the stored energy as acoustic radiation as it seeks back its initial state of least energy. The finger acting on the string is the source of this system. The combination of a resonating string and the resonant body of the guitar is the filter.
> In any string instument, the length, tension, and the mass > density of the string(s) determine the periodicity and > harmonics.
Agreed. We disagre as to whether the strings are the sources, or whether the finger or bows acting on those strings and so cause them to vibrate, are the sources.
> Whether they are struck or bowed. The drum > being a membrane is slightly different . If you assume the > outer circular edge of the membrane constitutes a fixed > boundary condition, the fundamental frequency is inversely > proportional to the radius, directly proportional to the > square root of the tension, and inversely proportional to > the square root of the mass per unit area. Drums excite in > different modes depending on place and energy of being > struck.
Agreed. This is very basic normar mode theory.
> > > > There is a vast difference between "a periodic source" > > and "a resonant system" that can be excited with > > an impulse excitation. This subtle difference is > > what this whole thread has revolved around. > > Nothing subtle about it. Name me one purely "periodic > source" without an accompaning "resonant system",
The human vocal cords. There is nothing that resonate in the glottis (if that's the name of where the cords are located). "Resonance" is a very specific technical term that is based on the idea that energy that is rapidly fed to a linear system (like some sort of impulse), takes a long time to fade away. The "resonant system" has long memory, if you like. The vocal cords don't satisfy those criteria. They tend to restrict pressurized air that are pushed out of the lungs. The cords are somewhat rigid, so they don't give way just like that. When they do, a small pulse of air is released, thus lowering the pressure on the inside of the cords just enough for the cords to seal tight. This is the same principle that a trumpet player uses to get his horn to sound. Ask your local trumpet player to demonstrate what happens inside his mouthpiece. "Playing without the horn" was basic part of trumpet training in my days. The tension applied to the vocal chords, as well as the lips in the trumpet demonstartion, determines how well they seal, what force it takes to have them slip, and thus the period between each released pulse. Once the pressure inside the cords is lovered there is no vibration whatosever in the vocal chords or lips. Thus, they are not a resonant system. Nonlinear, not resonant.
> besides a > tuning fork (which usually has a resonate box to amp the > sound) or a sine, sq, or saw-tooth wave generator.
These could be decomposioned by the Fourier transform into sinusoidals. Not very different from the resonant system itself. The main difference is that theseignal you mantion above are specified in terms of a fixed phase relationship between the harmonics over one period, while in the resonant linear system the phase relationships are specified ony at some reference time. These are minor technicalities, though.
> Even an > electric guiter has a pick-up, amp, effects box, and > loudspeaker acting as its resonate system.
How far back to basic do I have to go? The guitar comprises three major parts: - The source (finger or Norwegian "plekter", the piece of plastic some players use) - The reonant sytem (The strings) - The amplifier. While the first two elements vary little between the acoustic and the electric guitar, the last one, the amplifier, does. The purpose of the resonant body of the acoustic guitar is to amplify the resonant vibration of the strings enough for the sound to be audible. In fact, the resonance body itself is not resonant. The purpose of the elegtrical gizmos you mention above are to amplify the sound, and have nothing to do with resonance. Rune
Speedy wrote:

> In a previous mail Rune wrote: > > You are right in that the resonance is what drives the > > pitch of most sources, it is not what drives the pitch > > of the human voice. > > and in another: > > > The bow keeps the string resonating, the vibration of > > the string being amplified in the resonance cave of the violin > > to produce the sound. > > I think you are contradicting yourself here. The string is the source > and it determines the pitch. The resonance cave of the violin is what > shapes the source signal and acts as a filter. It is not the resonance > that determines the pitch. Unless your are using the term "resonance" > in a rather confusing way and I have misunderstood you.
No, I am not confusing anybody. I am sticking to the technical terms. The string is not the source in a violin. The bow or finger that cuases it to vibrate, is. Now, it seems to me as if the music and speech people find it easier (and understandably so) to use a model where the the string of a violin or or membrane of a drum is the source. Thise does introduce quite a bit of confusion when they talk with people who are used to more elborate models. Rune