[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Definition and Measurement of Harmonicity



Jim, Reinhart, Chris and Others,

I think Jim's comment below (under the new thread: Inharmonicity definition
and measurement) is probably what Chris intended, and my contribution was
attempting to show ways of doing this, with measures of degree of
harmonicity that could be derived from the signal itself without reference
to a physical production mechanism (e.g. vibrating strings), interesting
though the production mechanism may be in its own right.

I mentioned two basic harmonicity measures (with variations, including
another one below), but there are many other conceivable measures, such as
those in the survey by W.J. Hess that I quoted, plus a great many
contributions in the speech coding literature of the last 10 or 15 years.

However, I think the term "tonality" should be used with care, since this
and several similar words (below) have a number of different but related
meanings, largely depending on who is using them.  You can check this by
doing Google searches and looking at how the words are used.  In addition,
most of these meanings relate to psychoacoustic perception, which is much
more than just harmonicity.

In the first place, "tonality" means something else entirely in music
theory.  In addition, it is often also used to mean the same as
"tonalness", which is a purely perceptual concept, referring to the
sensation of pitch of a sound complex.  Pitch perception is much more
complex than the question of the degree of harmonicity.  For example, pitch
can be heard in sounds that are far from being harmonic, as explained in
the articles by E. Terhardt on pitch that are available on
http://www.mmk.ei.tum.de/persons/ter.html or by R. Meddis and M.J. Hewitt
(JASA, 89 (6), June 1991).  There have been attempts to predict tonalness
based on various theories, such as Terhardt's virtual pitch concept or the
Meddis and Hewitt temporal approach (q.v.).  I haven't seen them, but I
believe that there are even standards about this: ASA 118-1995 and DIN
45681 (the latter still in draft form a few years ago, but may be final by
now).

Another similar concept with a similar name is "tonality measure", which is
used when deriving auditory masking thresholds (also a perceptual concept)
for use in audio coding algorithms such as MPEG.  This refers to the degree
to which the individual sine wave components stand out above the noise
floor.  Masking models often treat "tonal components" differently from
others when calculating the auditory masking threshold.

Also, in some speech coding work these or similar terms may also refer to
the degree to which individual partials of a tonal complex can be "heard
out" individually (usually only the lower partials), still another
perceptual concept, and similar to (but different from) the masking concept
above.  If partials can be heard out, they are sometimes coded differently
from those that can't be heard individually.

The fact that these terms (tonality etc.) are often used to mean different
things by different authors is alone a good reason to avoid them unless
they are clearly defined when used.

I therefore think that degree or measure of harmonicity (or similar) is a
better term when referring to the degree to which a signal is
harmonic.  This is a relatively straightforward physical concept (though
with many possible ways of defining or estimating it), and is much simpler
than the concepts underlying the other terms (tonality, tonalness, virtual
pitch etc.), which are mostly perceptual in nature and have shifting
meanings depending on who uses them.


******************** While still on this topic, another variation of my first harmonicity measure H1 is obtained with a different definition of ACF:

    RB(k) = SUM (x(n) * x(n+k)),

where the sum is taken over all n in the range [0, N-1], with values of
x(n) outside this range being set to zero.  (This definition is the one
used by the Matlab function xcorr.m.  It applies a window to the signal,
and, apart from a constant scale factor, gives a biassed estimate if
certain statistical assumptions are made, unlike the previous
definition.)  The resulting harmonicity measure is then

    H11 = MAX (RB(k)) / RB(0),

where the maximum is taken over k in the range [1, MAX], where MAX should
be larger than any likely period of the harmonic component.

(Incidentally, I should also have written [1, MAX] instead of [1, N-1] for
this range earlier, since both R(k) and RB(k) are unreliable for large lags
k, though for different reasons.)

    Harvey Holmes

At 09:45 22/01/2005, Jim Beauchamp wrote:
-----
That said, it turns out that this is not really what Chris
was interested in. He is interested in something called "tonality",
which is something that has been mentioned in the audio
literature many times, but I have not seen a simple definition.
But basically if a signal is composed of harmonic or quasi-harmonic
sinusoids, it is "tonal". The other extreme is a noisy, random
signal. And, of course, signals can be combinations of both.

Jim Beauchamp