in article d39gmo$vqr$1@blue.rahul.net, Ronald H. Nicholson Jr. at
rhn@mauve.rahul.net wrote on 04/09/2005 17:16:
> If the spectral energy peaks are very closely but not exactly harmonically
> related (which the physics of some real-world resonators can produce),
> a sub-multiple of the lowest frequency might be what a human would call
> the approximate pitch, but a sub-multiple of an even higher frequency
> present might be what a musician would call the exact pitch relative to
> other simultaneous musical notes present.
>
> A good example might be a spinet piano, where a slightly flat low-A
> (say 109.8 Hz)
what is 109.8 Hz? is it the frequency of the bottom overtone (often called
the fundamental)? or is it the reciprocal of the period? especially in the
situation you describe below, they are not exactly the same thing. the AMDF
or ASDF measures the period.
> played through a teleco quality circuit might only have
> frequency content above 200 Hz, but would still be heard as a low-A,
> two octaves below concert-A, in appropriate context, even with little
> spectral energy in that range.
yup. and the measured period will be about 1000/109.8 milliseconds. but
possibly not exactly.
> But if the near 4th harmonic peaked at 440.8 Hz,
you mean there's a formant (or resonance) at around 440 Hz making the 4th
harmonic particularly loud compared to others? that will increase its
influence on the measured period.
> and this waveform was played against a simultaneous exact 440
> Hz concert-A flute tone, thus producing a noticeable beat, the low-A
> piano note might be perceived as slightly #sharp in pitch, not flat.
that may be true, but i am not sure that the AMDF will see it any
differently. especially if the 109.8 Hz component was killed by an HPF,
then the period *will* be determined as the greatest common factor of the
remaining harmonics and if they are sharper than their integer harmonic
index times the 109.8 Hz component, the AMDF will arrive at a pitch that is
higher than 109.8.
> Humans may also be more sensitive to pitch errors in the middle of
> a the audio spectrum, versus in the lower or higher frequency ranges.
that may be, but is still not the issue. just like for a VU meter, you
could run the audio through something like an A-weighting filter to
emphasize frequency components in the 2 to 5 kHz range and de-emphasize
components in the highest and lowest octaves before the AMDF algorithm see
it.
> Thus the pitch in the above situation, to a piano tuner, might be best
> considered as closer to 440.8/4 = 110.2 Hz, and neither, say, at 220 Hz,
> where there might be the highest absolute spectral peak (according to
> an FFT maxima), nor at the fundamental 109.8 Hz string resonance that
> started off this overtone sequence (and which an AMDF or autocorrelation
> algorithm might hunt and find).
no. the AMDF or ASDF will find the best fit for the period, which is
influenced by all of the harmonics, and the harmonics greater in amplitude
will influence the measure more. the reciprocal of that would be called the
fundamental frequency, but it might not be exactly the same frequency as the
1st harmonic. as in the case above, if there was zero amplitude at 109.8 (i
dunno what meaning that precise frequency would have) but a decent amount of
energy at 220, 330.3, 440.8, 551.5, the AMDF will not measure a period of
1/109.8, but will be shorter than 1/110 because of the other harmonics.
i know about sharpened harmonics in many fixed string instruments with
increasing harmonic number (due to stiffness at the string termination that
effectively shortens the string, particularly for high amplitude hits). i
know that piano tuners may very well tune higher notes slightly sharp, in
comparison to their mathematical value in an equally tempered scale to line
up octaves to power of 2 harmonics from lower notes. for 12 note/octave
equal temperament, we don't line up the other harmonics, say the 3rd to
exactly 19 semitones up because 3 does not exactly equal 2^(19/12). i know
about some tones possibly having missing fundamental (and possibly other
harmonics). it's also possible, that the fundamental, even when it is
there, does not exactly equal the reciprocal of the measured period, because
of the aggregate influence of the other harmonics.
that doesn't change anything. for a tonal musical note, they are
quasi-periodic and, for those kinds of notes, our most salient queue for
pitch will the reciprocal of the period and the AMDF or ASDF is designed to
best estimate that period. now there are problems. there is the classic
"octave problem" (but it could be with other harmonic intervals, too, but
most often, if there is an ambiguity, it's about an octave). this come from
the fact that a 110 Hz note that is added to a *very* quiet 55 Hz note (say,
at -80 dB relative to the 110 Hz note), will look like a 55 Hz note
mathematically, but will sound like a 110 Hz note. then there needs to be a
little brains built into the AMDF analysis to reject the null at 1/55 sec
just because it is ever so slightly lower than the null at 1/110 sec. so
somehow you want to choose the first really good looking null, even if the
null at twice the lag is very slightly better.
that's the main problem with AMDF or ASDF. i don't see the situation you
described as being a problem. if you have a good (and short) sound file of
a note or even just a collection of amplitudes and frequencies that you
think would fool this, i might want to try it with a MATLAB kludge to see if
it does.
--
r b-j rbj@audioimagination.com
"Imagination is more important than knowledge."