DSPRelated.com
Forums

Pitch Estimation using Autocorrelation

Started by olivers September 7, 2005
Jerry Avins wrote:
> rhnlogic@yahoo.com wrote: > > Jerry Avins wrote: > > > >>Pitch is subjective. > > > > > > Even perceptual pitch can be considered objective if you > > consider it, not just as a single number, but as a statistical > > distribution, given a large enough sample set of reported > > observations & observers under sufficiently controlled conditions. > > > > You might even be able to model the distribution as the > > signal-to-noise ratio of the human ear-brain system.
...
> Aptly put. However it's modeled, pitch falls into the purview of > psychology, not engineering. Both are science, but they are not the same.
Psychology and engineering are not completely non-overlapping disciplines. Bioengineering, human factors engineering, user interface design, etc. Any successful product must be engineered with consideration of the end points or end user in mind, else the result might meet some some spec, but be an utter failure. For some applications of pitch estimation, a human ear is one of the end points, or perhaps at least part of the calibration standard. IMHO. YMMV. -- rhn A.T nicholson d.O.t C-o-M
robert bristow-johnson <rbj@audioimagination.com> writes:

> duh. i seemed to have missed 2 very important words: "does not". > > in article BF4E12B6.A647%rbj@audioimagination.com, robert bristow-johnson at > rbj@audioimagination.com wrote on 09/14/2005 17:47: > > > in article dg9ph1$469$1@avnika.corp.mot.com, Chip Wood at > > chip.wood@motorola.com wrote on 09/14/2005 14:18: > > > >> BTW, I would NEVER say that resonances determine pitch, you > >> misread me. [...]
> > but i don't think we are misreading you when you are saying that the > > fundamental frequency (which, if it's there, can be determined by > > autocorrelation-like algorithms) DOES NOT solely defines the pitch (by use > > of the log2() function if pitch is measured in octaves). if that is what > > you're saying, i sorta agree but only in two cases: > [...]
Pitch, which is a subjective parameter, is closely related to the physical parameter frequency. But frequency is not the only physical parameter that influences pitch. Sound pressure does have an influence, and may, for pure tones, give a pitch shift of several percent. (Where pitch shift is defined as relative difference in frequency between two tones of different levels that give the same pitch.) This pitch shift may be positive or negative, depending upon the frequency of the tone. (Zwicker and Fastl, Pyschoacoustics, second updated edition, p. 114.) Further, partial masking of a tone by noise or another tone may also induce pitch shift. "For a 4kHz test tone partially masked by a 3-kHz tone or a narrow-band noise, a pitch shift up to about 6% can be achieved." (Z&F, p. 115). Keeping in mind that a semitone is about six percent, I would say that these effects are significant. Asbj&#4294967295;rn -- Asbj&#4294967295;rn S&#4294967295;b&#4294967295;, post.doc. Centre for Quantifiable Quality of Service in Communication Systems Norwegian University of Science and Technology <URL: http://www.q2s.ntnu.no/ >
Predictor predictr@bellatlantic.net wrote on 09/14/2005 20:59:
> > Fuzzy logic, in itself, is completely deterministic.
robert bristow-johnson wrote:
> i thought there was a RNG in there and the thresholds required to determine > if a state went one way or the other was dependent, to some degree, on such > a RNG. if that is not part of the canonical "fuzzy logic", then i retract > such usage ...
There is no randomness inherent in fuzzy logic. Please see any of the following: http://www.austinlinks.com/Fuzzy/overview.html http://www.ncst.ernet.in/education/apgdst/aifac/aicontent/fuzzy/fuzzy.pdf http://www.fpk.tu-berlin.de/~anderl/epsilon/fuzzyintro4.pdf http://www.phys.ufl.edu/docs/matlab/pdf_doc/fuzzy/fuzzy_tb.pdf http://www.faqs.org/faqs/fuzzy-logic/part1/ http://www.fuzzy-logic.com/ch3.htm -Will Dwinnell http://will.dwinnell.com
rhnlogic@yahoo.com wrote:
> Jerry Avins wrote: >> ... pitch falls into the purview of >>psychology, not engineering. Both are science, but they are not the same. > > > Psychology and engineering are not completely non-overlapping > disciplines. Bioengineering, human factors engineering, user > interface design, etc. Any successful product must be engineered > with consideration of the end points or end user in mind, else the > result might meet some some spec, but be an utter failure. For > some applications of pitch estimation, a human ear is one of the > end points, or perhaps at least part of the calibration standard.
I see no contradiction there. Do you? 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;
Predictor wrote:
> Predictor predictr@bellatlantic.net wrote on 09/14/2005 20:59: > >>>Fuzzy logic, in itself, is completely deterministic. > > > > robert bristow-johnson wrote: > >>i thought there was a RNG in there and the thresholds required to determine >>if a state went one way or the other was dependent, to some degree, on such >>a RNG. if that is not part of the canonical "fuzzy logic", then i retract >>such usage ... > > > > There is no randomness inherent in fuzzy logic. Please see any of the > following: > > http://www.austinlinks.com/Fuzzy/overview.html > http://www.ncst.ernet.in/education/apgdst/aifac/aicontent/fuzzy/fuzzy.pdf > http://www.fpk.tu-berlin.de/~anderl/epsilon/fuzzyintro4.pdf > http://www.phys.ufl.edu/docs/matlab/pdf_doc/fuzzy/fuzzy_tb.pdf > http://www.faqs.org/faqs/fuzzy-logic/part1/ > http://www.fuzzy-logic.com/ch3.htm
He just conceded the point. Why are you still going after it? 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;
in article KJmdnUJMG4bu7LTeRVn-pg@rcn.net, Jerry Avins at jya@ieee.org wrote
on 09/15/2005 09:04:

> Predictor wrote: >> Predictor predictr@bellatlantic.net wrote on 09/14/2005 20:59: >> >>>> Fuzzy logic, in itself, is completely deterministic. >> >> >> >> robert bristow-johnson wrote: >> >>> i thought there was a RNG in there and the thresholds required to determine >>> if a state went one way or the other was dependent, to some degree, on such >>> a RNG. if that is not part of the canonical "fuzzy logic", then i retract >>> such usage ... >> >> >> >> There is no randomness inherent in fuzzy logic. Please see any of the >> following: >> >> http://www.austinlinks.com/Fuzzy/overview.html >> http://www.ncst.ernet.in/education/apgdst/aifac/aicontent/fuzzy/fuzzy.pdf >> http://www.fpk.tu-berlin.de/~anderl/epsilon/fuzzyintro4.pdf >> http://www.phys.ufl.edu/docs/matlab/pdf_doc/fuzzy/fuzzy_tb.pdf >> http://www.faqs.org/faqs/fuzzy-logic/part1/ >> http://www.fuzzy-logic.com/ch3.htm > > He just conceded the point.
only the use of the term "fuzzy logic". but i still say that a machine with internal programming designed with some RNG that meaningfully affects its output is not 100% predictable for repeated identical inputs. i have also been known to misuse the term "wavelet" when i meant a synchronously windowed off period or cycle of a waveform of a singing voice or tonal musical instrument. now i use "grain", but i still think that "wavelet" was appropriate even though it had nothing to do with Daubechies. perhaps it isn't the canonical use of the term "fuzzy logic" but the little that i had read about it (decades ago), it seemed to me that for nearly identical inputs there were different binary output. it almost seemed like they were dithering the data, but i guess not. logic with dithered thresholds is "fuzzy", but i guess it ain't "fuzzy logic". -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Chip Wood wrote:
> 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.
So what are you saying then? In your first paragraph you say that the resonance of cavities determines the spectrum of whatever sound is radiated from such a body. I have never contested that. In your second paragraph you say that such resonances in the vocal tract do not determine the pitch of the voice. I believe we agree on both accounts.
> 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.
This is a VERY bad arguement. The "argument by authority" or "argument by powerful position" is exactly the type of attitude that causes people to loose track of engineering. Since you brought up the academic credentials, I have a PhD in physical acoustics as applied to seismics, underwater acoustics and general signal processing. What speech is concerned, I only have the layman's experience of actually talking, but my experience in that respect is approaching 40 years. For what it is worth. Rune
Chip Wood wrote:
> 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.
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). I am sure you agree thet the in all string instruments sound can be generated by "plucking" (I don't know the proper English word, I mean playing the violin pizzicato style) the string. In the piano, there are hammers that literally hit the strings. I don't know how fast a really good pianist is able to hit the keys; I would be surprised if it is much faster than 10 Hz. 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. We agree that the lips of a brass player sets up the resonant behaviour of a brass instrument, at least in a "wide" sense (I commented on this in a reply to Jerry Avins). We agree that the periodic source is what determines the pitch in the human voice. 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. You are plain wrong when you equate the string instruments and drums, which "periodic" behaviour are caused by resonant impulse responses, with the human voice, which is dominated by a quasiperiodic pulse train. Keeping track of the details is fundamental to obtaining ANY kind of insight into one's profession. Rune
Rune Allnor 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. > > 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.
It seems to me that the vocal impulse train itself is not always driven by individual muscular control of each impulse (but can be, for "stops" and clicks), but usually by the resonance of the vocal cord folds themselves (shape and tension, etc. and separate from the resonances of the rest the vocal tract). So this seems to me be to be a coupled system with multiple, independantly modulated resonances. But I know nothing about this subject. IMHO. YMMV. -- rhn A.T nicholson d.O.t of C-o-M
robert bristow-johnson wrote:
>
...
> but i still say that a machine with internal programming designed with some > RNG that meaningfully affects its output is not 100% predictable for > repeated identical inputs.
So do we all. I assume Predictor conceded that he can't predict in that case. ... 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;