DSPRelated.com
Forums

Pitch Estimation using Autocorrelation

Started by olivers September 7, 2005
in article kcidnaVK0vKQobXeRVn-vQ@rcn.net, Jerry Avins at jya@ieee.org wrote
on 09/14/2005 11:04:

> Rune Allnor wrote: >> Jerry Avins wrote: >> >>> Rune Allnor wrote: >>> >>> ... >>> >>> >>>> The property of the human voice that I find to be >>>> almost unique (apart from voices of other animals) >>>> is that it is the excitation period of the impulse >>>> train that determines the pitch. >>> >>> Unique? I think it is always true that the forcing function determines >>> the frequency. Even with a trumpet. If that needs explaining, I'll try. >> >> >> Brass instruments are the only other system I can think of, where >> this exitation mechanism has a part of determining the pitch. > > Organ pipe, flute, recorder, clarinet, ...
guitar, bass guitar, piano, violin, cello, viola. sure, the excitation is an impulse or some kinda noise source, but it is the fundamental frequency that is coupled to pitch and not the formants (frequencies of resonance). however there may be noisy sounds like some wood block where the formants *do* determine the pitch (there may be no fundamental of any kind because there is little periodicity). an autocorrelation based PDA won't work so good for them. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Jerry Avins wrote:
> Rune Allnor wrote: > > Jerry Avins wrote: > > > >>Rune Allnor wrote: > >> > >> ... > >> > >> > >>>The property of the human voice that I find to be > >>>almost unique (apart from voices of other animals) > >>>is that it is the excitation period of the impulse > >>>train that determines the pitch. > >> > >>Unique? I think it is always true that the forcing function determines > >>the frequency. Even with a trumpet. If that needs explaining, I'll try. > > > > > > Brass instruments are the only other system I can think of, where > > this exitation mechanism has a part of determining the pitch. > > Organ pipe, flute, recorder, clarinet, ...
The vibrating lip does induce the resonance of the air in the clarinet and organ pipes. It is turbulence of the air blown into the (modern) flute mouthpiece that resonates in the flute. What determines the pitch in all these instruments is the air that resonates inside some cavity. This is not the case in the human voice.
> > A good trumpeter can use the tention of his lips to determine > > the pitch of a signal horn (bugle?) without using valves. > > The bore of the mouthpiece of a Baroque trumpet is much larger than the > bore in a modern one. That allows the mouth volume to influence the > pitch also. Baroque trumpets had a more irregular flare, thus lowering > the Q and making the pitch more easily pulled. > > > As I remember, the "natural tones" of a B trumet were c, g, c1, e1, > > g1, c2 ... (details of musical notations may be wrong). These are > > the tones a trumpeter hits by adjusting his "lip service" with no > > use of valves. I was able to modulate rougly 1/2 to one full tone > > to each side of a "natural". Unintentionally, most of the time... > > > > But the lip action only sets up the resonance of the air inside > > the instrument. The pitch in a trumpet, unlike in the voice, > > is determined by the physical size of a resonant cavity. > > Hence the valves that couple the air into various elongations. > > Just like other oscillators that are part of a resonant element. To > separate formant and pitch, the oscillator must be uncoupled from the > resonance. That seems to be the case with vocal cords (tuned by varying > the tension) and formants (resonances in acoustically remote cavities).
The formants determines the "contents" of the sound. They don't influence pitch very much. Maybe a definition is in place: To me "resonance" means a sustained narrowband oscillation, that can be induced by one single impulse. In that sense, the pulses generated by the vocal cord are not part of a resonant phenomena. Rune
Rune Allnor wrote:

   ...

> The vibrating lip does induce the resonance of the air in the > clarinet and organ pipes.
If we include "reed" with lip, then yes.
> It is turbulence of the air blown > into the (modern) flute mouthpiece that resonates in the flute.
How does a flute's excitation differ from an organ pipe's?
> What determines the pitch in all these instruments is the air > that resonates inside some cavity.
The mouth can be part of that cavity.
> This is not the case in the human voice.
That's what I tried to state. ...
> The formants determines the "contents" of the sound. They don't > influence pitch very much.
We're agreeing too much. We need to establish a mutual admiration society.
> Maybe a definition is in place: To me "resonance" means a > sustained narrowband oscillation, that can be induced by one > single impulse. In that sense, the pulses generated by the vocal > cord are not part of a resonant phenomena.
Your definition is sound (pun noted), but it doesn't apply to vocal cords. The pitch they produce is determined largely by their mass (relatively fixed) and tension (under muscular control). If you mean that they are only very loosely coupled to the throat's resonances, then I agree. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
malakhov@cas.ru wrote:
> Rune Allnor wrote: > > If there are more than one sinusoidal present (two or > > three suffice) and some noise, there is little reason to believe > > that one would be able to see anything useful in a time-domain > > autocorrelation function. In frequency domain, yes, but not > > in time domain. > > > Adding to Your words I like to give an example. > There is a demo sound (noise with pitch) at: > http://www.mrc-cbu.cam.ac.uk/cnbh/ > web2005/teaching/sounds_movies/ > Sounds/fixed16.wav > The repetitive nature of this sound one can detect perceptually. > The time-domain processing also finds stable repetition period. > The frequency-domain information seems to be useless for > this sound signal period detection. But if stable "period" exists > then it should be "frequency" somewhere. Am I wrong?
I don't know. Your question contains the word "percieves", which in turn involves the human auditory system. I don't know how the human auditory system reacts to noise. I know that I percieve a changing pitch when the kettle boild up water, but I am not able to detect any spectral lines in a recording I made. I hav, on the other hand, not tried to do time-domain analysis of that signal.
> So, I can find (and I did) the repetition period of this sound > in pure spectral way. I'm far from idea the frequency-domain > processing is always better, I only want to say the spectral > analysis has a good ability for development.
Well, it ought to have. But again, I have not tried to wrap my mind around the workings of the human auditory system.
> Vladimir Malakhov.
Rune
Jerry Avins wrote:
> Rune Allnor wrote: > > ... > > > The vibrating lip does induce the resonance of the air in the > > clarinet and organ pipes. > > If we include "reed" with lip, then yes.
I don't know the English terminology of musical instruments. I am thinking about the wood chip in the mouthpiece of the clarinet.
> > It is turbulence of the air blown > > into the (modern) flute mouthpiece that resonates in the flute. > > How does a flute's excitation differ from an organ pipe's?
It doesn't, as far as I know. I haven't seen an organ pipe up close, though.
> > What determines the pitch in all these instruments is the air > > that resonates inside some cavity. > > The mouth can be part of that cavity.
Do you have examples? Except for the kazoo?
> > This is not the case in the human voice. > > That's what I tried to state. > > ... > > > The formants determines the "contents" of the sound. They don't > > influence pitch very much. > > We're agreeing too much. We need to establish a mutual admiration society.
A mutual terminology might be better...
> > Maybe a definition is in place: To me "resonance" means a > > sustained narrowband oscillation, that can be induced by one > > single impulse. In that sense, the pulses generated by the vocal > > cord are not part of a resonant phenomena. > > Your definition is sound (pun noted), but it doesn't apply to vocal > cords. The pitch they produce is determined largely by their mass > (relatively fixed) and tension (under muscular control). If you mean > that they are only very loosely coupled to the throat's resonances, then > I agree.
That's exactly what I mean. Whatever happens in the vocal cords is a nonlinear effect caused by the pressure of the air trying to flow by, the tension of the cords and whatever other physiology is relevant. Rune
Huh?  You have these exactly backward- frequency (period) is
the objective machine measurable, pitch is the subjective
psychoacoustic.  And not many people, only those people who
understand what is going on.

-- 
Chip Wood

"Jerry Avins" <jya@ieee.org> wrote in message
news:1rmdnYjWgtRvrrreRVn-pg@rcn.net...

> Either we have pitch and > frequency as synonyms (so requiring perceived pitch as a
distinction) or
> re assign objective, computer-measurable attributes to
frequency and
> subjective and psychoacoustic attributes to pitch, which
many people do
> anyway.
Not to disagree, but I will.  When we psychoacousticians
refer to "pitch",  it is ONLY measurable by asking a human.
True, the human response is close to the even tempered
scale, when played on a well tuned piano. Which can be tuned
by looking at the readout of a machine or by a expert's
human ear.  I prefer the ear tuned piano myself.

I will also disagree that a human is a machine.  When a
machine is programmed or designed correctly and running with
no faults, the outcome is 100% predictable  for repeated
identical inputs.  The human rarely makes 100% exactly the
same response EVER to similar inputs.  If the black box is
not predictable then it is not a machine.

BTW, I was trying to be funny about the dissertations.
Having written one myself, I know how worthless many of them
are.
-- 
Chip Wood

"robert bristow-johnson" <rbj@audioimagination.com> wrote in
message news:BF4CDF6A.A5CE%

> not to disagree with the specific point (multiple physical
parameters *can*
> contribute to the sense of "pitch" or "loudness"), but,
Chip, *we* are
> machines, biological machines.
*but* when we in
> the audio/music engineering discipline say "pitch
detection", it is almost
> always understood to be a parameter that is something like
12*log2(f0/fr)
> where f0 is the fundamental frequency of a quasi-periodic
"tone" or "note"
Please, please read a fundamental book on acoustics.  The
periodic (or aperiodic )  source (vocal folds, strings,
lips, membrane) drives the resonances of the cavity ( vocal
tract, violin body, trumpet tube, drum body) and those
harmonics (or inharmonics) of the source near a resonance
are reinforced and become larger and those harmonics near
the anti-resonances (if any) are decreased.  This is
fundamental to understand ANY sound generation.

BTW, I would NEVER say that resonances determine pitch, you
misread me.  The fundamental frequency and its harmonics are
generated at the source, the resonances of the cavity shape
these harmonics into the final spectra.

Also, BTW, not to throw my credentials around, but I have a
PH.D in Speech Science, taught Speech Science and Musical
Acoustics at the University level, and have over 40 years of
experience in speech, acoustics, and DSP.  Getting something
like this wrong at this point in my career rarely happens.

-- 
Chip Wood

"Rune Allnor" <allnor@tele.ntnu.no> wrote in message
news:1126701300.699877.145820@g49g2000cwa.googlegroups.com...
> > Chip Wood wrote:
It is not unique to voice, it is the fundamental
> > principle of all sound created by wo/man. > > Sorry, you are wrong. > > 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. > > As I am sure you know, the (vocal) sound of the human > voice is modeled by the convolution of the impulse > train and the impulse response of the vocal tract. > > If you were right in that it is the resonant behaviour > of the vocal tract that determines the pitch,
Chip Wood wrote:
> Huh? You have these exactly backward- frequency (period) is > the objective machine measurable, pitch is the subjective > psychoacoustic. And not many people, only those people who > understand what is going on.
Both period and frequency cam be objectively measured. Period, by measuring the time between [a known number of] zero crossings; frequency, by measuring the number of zero crossings for a given time. Pitch is subjective. If I gave any other impression, I didn't express myself clearly. Set an oscillator to about 2000 Hz and play the sound at different volumes. Many people perceive the pitch to increase slightly when the tone is played louder. jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Chip Wood wrote:

   ...

 > If the black box is
> not predictable then it is not a machine.
I believe you mean "If the black box is not predictable then it is not a machine." If so, I can't agree. I do agree that if a black box _is_ predictable, i.e. perfectly repeatable, then it _is_ a machine. Is that what you mean? If I bet you that I could build an unpredictable device and enclose it in a black box, you would be unwise to take the bet. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;