[net.music.synth] Difficulty of synthesising piano sounds

ian@wcwvax.UUCP (Ian Kemmish) (02/05/86)

I think there are two main difficulties with synthesising the
sound of a real piano.  First, a modern (post-Steinway) piano
appears to be one of the most harmonically complex sounds around;
and it shows quite a lot of variation across the keyboard.  I
saw an article recently which said that Dr. John Chowning and
Dave Bristow (on secondment from Yamaha) were working on doing
a "proper" synthetic piano at IRCAM - and using *all* of a TX816
(16 lots of 96 oscillators) to do it!   On the other hand, you
can get a reasonable imitation of a Broadwood era piano on a
DX7.

The second problem is that the upper harmonics of a piano tone
are *not* exact multiples of the fundamental.  This is why pianos
are normally tuned in that funny way - slightly sharp at the top
of the keyboard, slightly flat at the bottom.   I don't know the
exact mechanism that causes this effect, but then I would imagine
that the equation describing the oscillatory motion of a thick,
massive, inhomogeneous wire under a lot of tension is quite a bit
more complicated than the simple wave equation we all solved in
Fourier Analysis at university! (Maybe someone in netland can even
write it down??!)

jeq@laidbak.UUCP (Jonathan E. Quist) (02/11/86)

In article <669@wcwvax.UUCP> ian@wcwvax.UUCP (Ian Kemmish) writes:
>(Discussion of difficulty of synthesizing a piano sound) ... I
>saw an article recently which said that Dr. John Chowning and
>Dave Bristow (on secondment from Yamaha) were working on doing
>a "proper" synthetic piano at IRCAM - and using *all* of a TX816
>(16 lots of 96 oscillators) to do it!

I've heard _a_ full-TX816 piano setup.  I don't know if it
was this one, but it was rather effective.  Among other things,
one module of the TX816 was used solely to simulate the
mechanical thunk of the hammers on the strings.

>The second problem is that the upper harmonics of a piano tone
>are *not* exact multiples of the fundamental.  This is why pianos
>are normally tuned in that funny way - slightly sharp at the top
>of the keyboard, slightly flat at the bottom.   I don't know the
>exact mechanism that causes this effect, but then I would imagine
>that the equation describing the oscillatory motion of a thick,
>massive, inhomogeneous wire under a lot of tension is quite a bit
>more complicated than the simple wave equation we all solved in
>Fourier Analysis at university! (Maybe someone in netland can even
>write it down??!)

I find it much easier to tune piano strings by the relationship
between harmonics rather than the fundamentals; perhaps piano
technicians do this to some extent as well.  (Years of tuning
a piano every six to ten months, of course, doesn't qualify
me to say;  one of the few things I've learned about piano
tuning is that there's no substitute for experience.  But,
I digress...)

The primary reason that the upper harmonics of piano strings
are not integer multiples of the fundamental, I have been told,
is that the diameter of a piano string is NOT infinitessimal,
and therefore the nodes in a vibration at a harmonic frequency
take space along the length of the string.  The result is
that the string is effectively shortened at higher harmonics,
causing them to sound sharp.  Because the ratio of string
diameter to string length is not constant over the scale,
this effect varies from note to note.

This model is mostly qualitative, and I have only heard
it from one source, but it seems a reasonable explanation.
An alternate theory would be that the tension increase per
unit of string displacement is greater at higher harmonics
than at the fundamental (due to string geometry), which would
tend to raise the pitch of harmonics.  If you think about it
long enough, though, this effect is similar (possibly identical)
to the one described above.

Okay, so I'm rambling.  (I did try to shorten the original draft. :)
If I've got the explanation all wrong, please correct me.

Enough of this, it's time for dinner.

Jonathan E. Quist
Lachman Associates, Inc.
ihnp4!laidbak!jeq
``I deny this is a disclaimer.''

csz@well.UUCP (carter scholz) (03/02/86)

     Someone at Whitechapel Computer Works started a
discussion of piano acoustics some time ago, asking for the
appropriate formulae.  Since no one has posted them yet, I will.
     The non-mathematical gist is this:
     As thickness and stiffness increase from zero, and as
tension decreases from infinite, the overtones of a vibrating
string depart from the "ideal" Fourier harmonic series.
     The tension, length, diameter, and material of a stiff
string determine a "constant of inharmonicity", B.
     Knowing B, you can calculte the "allowed frequencies" of
the vibrating stiff string.  This will ot tell you anything
about the time evolution of the piano tone, which is essential
for synthesis.  But it will give you an idea of how the overtones
are "stretched" from the harmonic series.
     All units are in CGS (cm, grams, seconds, Hertz).

==============================================================

        n * f(1) * (1 + B*n^2 / 2 )            pi^3 * Q * d^4
f(n) = ----------------------------- ;    B = ----------------
                 (1 + B/2)                      64 * L^2 * T

  d = diameter of string
  Q = Young's modulus of string material (1.95E12 for steel)
  L = length
  n = overtone number (NOTE: 1 = fundamental)
  T = tension on string (typically on the order of 2E12)


===============================================================

Empirically derived values for real piano strings:

for solid strings:                 for wound strings:

    3.95E10 * d^2                        4.6E10 * d^4
B = -------------                  B = ------------------ ,
    L^4 * f(0)^2                       D^2 * f(0)^2 * L^4

where d=core diameter and D=outer diameter of wound string.

B can be determined empirically by measuring the frequencies f(m)
and f(n) of two partials m & n, and taking their ratio r:

        (r*m/n)^2 - 1               (m*f(n)/n)^2 - (n*f(m)/m)^2
B = ---------------------     F^2 = ---------------------------
    n^2 - (r*m/n)^2 * m^2                    m^2 - n^2

                                                        (r-2)
When m=2n,  F = ( 8*f(n)-f(2*n) ) / (6*n) ; B = 2/n^2 * -----
                                                        (8-r)

               f(n)             1
Also: B = ( ---------- ) ^2 - ----- .
            n^2 * f(0)         n^2


NOTE: f(0) is not the fundamental.  f(1) is the fundamental.

        1            T
f(0) = --- * sqrt ( --- )   where rho = density * pi * d^2 / 4
       2*L          rho

For pinned boundary conditions:  f(n) = n* f(0) * sqrt (1+B*n^2)

For clamped boundary conditions:

f(n) = n * f(0) * sqrt(1+B*n^2) * (1 + (2/pi)*sqrt(B) + (4/pi^2)*B)

The piano string usually behaves as something between a pinned
and clamped condition, necessitating some kind of real-world
approximation between these two formulae.  One approximation is:

f(n) = n * f(1) * (1+(B/2)*n^2) / (1+B/2)

===============================================================
REFERENCES

Rayleigh, _Theory of Sound_, Dover Publications.
Morse, _Vibration and Sound_, McGraw-Hill, 1948.
Fletcher, "Normal Vibration Frequencies of a Stiff Piano String",
   _Journal of the Acoustical Society of America_ (JASA),
   v.36, n.1, pp. 203-209, Jan 1964.
Fletcher et al, "Quality of Piano Tones", JASA, v.34, n.6,
   pp. 749-761, June 1962.

===============================================================
--Carter Scholz         well!csz