Ideal Piano Acoustics
For clarity, everything in this section is under the assumption that the strings of a piano are ideal strings. Non-idealities such as in inharmonicity will be covered in the last section of this document, along with a more realistic model of a piano string.
String Acoustics and Vibration ■ / ■
When a piano key is pressed, a felt hammer strikes one or more strings to play a note1. The tension in the strings provides a restoring force, pulling them back towards equilibrium. Due to inertia, the strings overshoot this position, and an oscillation begins.
1 Keys in the middle register of a piano will hit two strings, while keys in the upper register will hit three strings because as the strings thin, the frequencies they produce attenuate faster.
The Wave Equation for an Ideal String ■
Consider a string stretched along the x-axis with tension T (Newtons) and linear mass density \mu (mass per unit length, kg/m). The behavior of an ideal vibrating string is described by the one-dimensional wave equation.
Consider a differential segment of an oscillating ideal string stretched along the x-axis. We examine a segment of length \Delta x with linear mass density \mu (kg/m) and constant tension T (N).
We assume the distortions of the string are small. This implies that the slope of the string is small everywhere, so the local angle \theta between the string and the horizontal is always small.
To find the equation of motion, we analyze the vertical forces acting on the segment between x and x + \Delta x. The net vertical force F_y is the difference between the vertical components of the tension at the two ends. Since there is no horizontal motion, the horizontal component of the tension is constant. For small angles (\cos \theta \approx 1), this implies the magnitude of the tension T is effectively constant throughout the segment, thus giving us the relation:
\begin{align*} F_y &= T \sin(\theta(x + \Delta x)) - T \sin(\theta(x)) \\ &= T \sin(\theta_2) - T \sin(\theta_1) \end{align*}
We can then use the small angle approximation, where the sine of the angle is approximately equal to its tangent (\sin \theta \approx \tan \theta).
Geometrically, the tangent of the angle represents the instantaneous slope of the string:
\sin(\theta) \approx \tan(\theta) = \frac{\partial y}{\partial x}
Substituting this approximation back into the force equation allows us to express the forces in terms of the string’s slope rather than trigonometric angles:
F_y \approx T \left[ \frac{\partial y}{\partial x}\bigg|_{x+\Delta x} - \frac{\partial y}{\partial x}\bigg|_{x} \right]
We apply Newton’s Second Law (F = ma) to the segment and define the following:
- Mass (m): The mass of the segment is \mu \Delta x.
- Acceleration (a): The vertical acceleration is \frac{\partial^2 y}{\partial t^2}.
Resulting in the equation:
T \left[ \frac{\partial y}{\partial x}\bigg|_{x+\Delta x} - \frac{\partial y}{\partial x}\bigg|_{x} \right] = (\mu \Delta x) \frac{\partial^2 y}{\partial t^2}
To isolate the spatial terms, we divide the entire equation by \Delta x:
T \left[ \frac{ \frac{\partial y}{\partial x}\big|_{x+\Delta x} - \frac{\partial y}{\partial x}\big|_{x} }{\Delta x} \right] = \mu \frac{\partial^2 y}{\partial t^2}
Now, we take the limit as the segment length approaches zero. The term in the brackets matches the fundamental definition of the derivative (see Definition 1). In our case, the function being differentiated is the slope, \frac{\partial y}{\partial x}. Therefore, the limit yields the derivative of the slope, which is the second spatial derivative:
\lim_{\Delta x \to 0} \left[ \frac{ \frac{\partial y}{\partial x}\big|_{x+\Delta x} - \frac{\partial y}{\partial x}\big|_{x} }{\Delta x} \right] = \frac{\partial}{\partial x}\left( \frac{\partial y}{\partial x} \right) = \frac{\partial^2 y}{\partial x^2}
This results in the PDE:
T \frac{\partial^2 y}{\partial x^2} = \mu \frac{\partial^2 y}{\partial t^2}
Rearranging the equation above highlights the physical mechanism of wave propagation:
\frac{\partial^2 y}{\partial t^2} = \frac{T}{\mu} \frac{\partial^2 y}{\partial x^2}
This equation states that acceleration is proportional to curvature.
- Zero Curvature: If the string is a straight line (constant slope), \frac{\partial^2 y}{\partial x^2} = 0. The tension vectors at x and x+\Delta x are parallel and cancel perfectly. The net force is zero, so the string does not accelerate.
- Non-Zero Curvature: When the string curves, the tension vectors are misaligned. While their horizontal components cancel, their vertical components sum to create a net restoring force.
The string curves specifically to generate the force required to accelerate the mass back toward equilibrium. This interaction causes the disturbance to propagate.
Finally, to reach the standard form, we define the propagation velocity v:
v = \sqrt{\frac{T}{\mu}}
Substituting this into our equation, we arrive at the classical 1D wave equation:
Definition 1 Recall the definition of the derivative: f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}
\frac{\partial^2 y}{\partial t^2} = v^2 \frac{\partial^2 y}{\partial x^2} where:
- y(x,t) is the vertical displacement of the string at position x and time t.
- v= \sqrt{\frac{T}{\mu}} is the wave speed along the string.
The equation shows that the acceleration \left(\frac{\partial^2 y}{\partial t^2}\right) of any point on the string is proportional to its curvature2 \left(\frac{\partial^2 y}{\partial x^2}\right).This makes intuitive sense. The more curved the string is, the stronger the net restoring force from the string’s tension, which in turn creates a greater acceleration, pulling it back toward its equilibrium position. So,a higher tension T or a lower mass density \mu results in a faster wave propagation speed c, and thus a higher frequency of the string.
2 Curvature, also referred to as concavity
Solution to the Wave Equation: Harmonics ■
The solution to this wave equation, for a string fixed at both ends (e.g., at x=0 and x=L), is a superposition of standing waves, known as harmonics or partials. The general solution is a Fourier series:
To find the solution to the wave equation, we will start with the assumption that the PDE is separable3 as a way to isolate the space and time variables. We assume a trial solution of the form:
y(x, t) = X(x)T(t)
We substitute this into the wave equation and separate the variables to find the solutions for X(x) and T(t).
T(t)X^{\prime\prime}(x) = \frac{1}{c^2} T^{\prime\prime}(t)X(x)
Dividing both sides by X(x)T(t), we obtain:
\frac{X^{\prime\prime}(x)}{X(x)} = \frac{1}{c^2} \frac{T^{\prime\prime}(t)}{T(t)}
Since the left side depends only on x and the right side depends only on t, both sides must be equal to a constant (see Lemma 1). We will call this constant -k^2 (to ensure oscillatory solutions and not exponential growth, we set the constant to be negative). This leads to two ordinary differential equations (ODEs):
\mathbf{Space}: X^{\prime\prime}(x) + k^2 X(x) = 0
\mathbf{Time}: T^{\prime\prime}(t) + k^2 c^2 T(t) = 0
These are standard harmonic oscillator equations. Their solutions are:
X(x) = C_1 \cos(k x) + C_2 \sin(k x)
T(t) = C_3 \cos(\omega t) + C_4 \sin(\omega t)
where \omega = k c is the angular frequency.
Now since we assume the string is fixed at both ends, we apply the boundary conditions y(0,t) = 0 and y(L,t) = 0 and can solve for the constants of the spacial part (i.e. C_1 and C_2).
\begin{align} \text{At } x&=0:\ C_1 \cos(0) + C_2 \sin(0) = 0 \implies C_1 = 0 \\ \text{At } x&=L:\ C_2 \sin(k L) = 0 \end{align}
For non-trivial solutions, B \neq 0, the sine term must be zero. Sine being zero implies that k must be discrete, i.e.
k_n = \frac{n\pi}{L} \quad\mathbf{for}\ n = 1, 2, 3, ...
Thus the solution for X(x) is:
X(x) = \sin\left(k_n x\right)
(We will drop the constant coefficient here (e.g. C_2) and absorb it into the complete solution)
Recalling our assumption: y(x, t) = X(x)T(t), we can combine our solutions (and our constant coefficients) to yield the complete solution:
\begin{aligned} y_n(x,t) &= X_n(x) \cdot T_n(t) \\ y_n(x,t) &= \underbrace{\sin(k_n x)}_{\text{Shape on the string}} \cdot \underbrace{[A_n \cos(\omega_n t) + B_n \sin(\omega_n t)]}_{\text{Oscillation over time}} \end{aligned}
With this solution, we can make a few observations:
- X_n(x) (The Spatial Profile): Because this term has no t variable, the points where the string is still (the nodes) and where it reaches maximum displacement (the antinodes) are fixed in space, thus dictating the “geometry” of the wave.
- T_n(t) (The Temporal Scaling): Dependent on time, this term doesn’t change the relative shape of the string; instead, it tells every point on that X_n(x) stencil exactly what percentage of its maximum height it should be at any given moment. It forces the Spatial Profile to expand, flatten, and flip across the equilibrium line periodically.
However, since the wave equation is linear, the general solution is a superposition of all valid n modes. This superposition yields the Fourier series solution:
y(x, t) = \sum_{n=1}^{\infty} \sin\left(\frac{n\pi x}{L}\right) \left[A_n\cos\left(\omega_n t\right) + B_n\sin\left(\omega_n t\right)\right]
Where:
- \sin\left(\frac{n\pi x}{L}\right) represents the standing wave shape (harmonics).
- The terms in the bracket represent the oscillation in time.
- A_n and B_n are Fourier coefficients determined by the initial shape and velocity of the string.
Expanding all terms, we get:
3 One may ask how we could just assume that the PDE is separable. In reality, we are hoping that we are lucky and that the assumption holds after we finish solving the PDE. Most PDEs are not separable, and finding a solution to a non-separable PDE is often a very complex task.
Lemma 1 (Argument of separation of variables:) Imagine a the system: L(x) = R(t) Where x and t are independent variables. To prove L(x) is constant, we differentiate both sides with respect to x: \frac{\partial}{\partial x} \left[ L(x) \right] = \frac{\partial}{\partial x} \left[ R(t) \right] Since R(t) is a function of t only, it is treated as a constant with respect to x. Therefore, the derivative is zero L(t)^{\prime} = 0 and \therefore L(x) = C for some constant C. If you differentiate the system with respect to t, the same logic applies and R(t) = C and given how L(x) = R(t), they both equal the same constant L(x) = R(t) = C
y(x, t) = \sum_{n=1}^{\infty} \sin\left(\frac{n\pi x}{L}\right) \left[A_n\cos\left(\frac{n\pi c t}{L}\right) + B_n\sin\left(\frac{n\pi c t}{L}\right)\right]
Each term in the series represents a mode of vibration with a specific frequency:
- Fundamental Frequency (n=1): f_1 = \frac{v}{2L} = \frac{1}{2L}\sqrt{\frac{T}{\mu}}. This is the lowest frequency and determines the pitch we perceive4.
- Overtones (n>1): f_n = n\cdot f_1. These are integer multiples of the fundamental frequency.
4 Recall that wavelength is defined as \lambda = \frac{v}{f} with the wavelength of the fundamental being \lambda_1 = 2L.
When we say we have “solved” the PDE and found y(x,t), what do we actually possess?
Mathematically, the function y(x,t) is a tool that we can use to calculate the displacement of the string at any point in space and time.
- Without this, we would only know the behavior that the string would follow (e.g. Newton’s laws and the Wave equation).
- With this, we know the outcome of the system, making it deterministic.
Physcially, y(x,t) is a surface in 3D space.
- If you slice this surface at a fixed time t_0, the cross-section y(x, t_0) is a photograph of the string’s shape at that moment.
- If you slice this surface at a fixed position x_0, the cross-section y(x_0, t) is a history graph of that single particle’s motion up and down.
In summary, the solution is not just the physics but also its environment and conditions
- The terms inside the PDE (\frac{\partial^2}{\partial x^2}) encode the fundamental laws (Force = Mass \times Acceleration).
- The restrictions on the constants (n\pi/L) encode the geometry (the string is tied down).
- The coefficients (A_n, B_n) encode the history (how you plucked the string).
Timbre
Why is this important to piano tuning?
Well the timbre, or unique sound quality, of the piano note is determined by the relative amplitudes (A_n) of these harmonics. The hammer’s shape, hardness, and striking position excite these harmonics with different initial energies, creating the piano’s characteristic rich and complex tone.
Below is an interactive simulation of how the relative amplitudes of the harmonics affect the timbre of a vibrating string. Adjust the sliders to see how the timbre changes. Keep in mind that simulation does not capture the visual change of the fundamental frequency but rather, only the relative amplitudes of the harmonics.
In reality real piano strings are stiff, not perfectly flexible. This stiffness adds a restoring force, slightly altering the frequencies of the overtones. They become slightly sharper (higher in frequency) or flatter (lower in frequency) than perfect integer multiples of the fundamental. This phenomenon, known as inharmonicity, is a key characteristic of the piano’s sound.
This will be properly covered in the end of the document
The Soundboard: String amplification
While we modeled the string ends as fixed points to derive the frequencies, in reality, the piano bridge end moves microscopically—this ‘imperfection’ in the boundary condition is exactly how energy escapes the string to reach your ears.
A vibrating string on its own displaces very little air and produces a very faint sound. To make the sound audible, its energy must be transferred to a larger radiating surface. This is the job of the soundboard.
The strings are stretched over a wooden bridge, which is glued directly to a large, thin sheet of wood (typically spruce)—the soundboard. The strings’ vibrations travel through the bridge, forcing the entire soundboard to vibrate. Because the soundboard has a much larger surface area than the strings, it can move a significant volume of air, thus acting as an efficient acoustic amplifier. It doesn’t add energy, but rather converts the string’s vibrational energy into audible sound energy more effectively.
Acoustic Wave Propagation ■ / ■
The vibrating soundboard acts like a large piston, creating compressions and rarefactions (areas of high and low pressure) in the surrounding air. These pressure disturbances propagate outward as a sound wave.
If you are interested in how to simulate acoustic behavior with FDTD , you can find it in the supplemental material section.
The Acoustic Wave Equation ■
The propagation of sound in a medium like air is described by the three-dimensional acoustic wave equation:
To begin, we will start with the following assumptions:
- We treat air not as discrete particles, but as a continuous fluid.
- We assume the disturbance is a “small signal” (linear behavior), meaning the fluctuations are tiny compared to the static atmospheric values.
We will also identity our unknown variables as follows:
- Pressure (P): Total pressure P(\vec{r}, t) = P_0 + p(\vec{r}, t), where P_0 is static atmospheric pressure and p is the acoustic pressure.
- Density (\rho): Total density \rho(\vec{r}, t) = \rho_0 + \rho'(\vec{r}, t), where \rho_0 is static atmospheric density and \rho' is the acoustic density fluctuation.
- Particle Velocity (\vec{u}): The velocity of the fluid elements \vec{u}(\vec{r}, t). Ambient air velocity is assumed to be zero.
To solve for the three unknown variables (p, \rho', \vec{u}), we require three independent physical laws. These are presented in their linearized forms, assuming small perturbations where second-order terms (like convective acceleration) are negligible.
- The Linearized Continuity Equation (Conservation of Mass)
- This equation relates the scalar density field to the vector velocity field.
\frac{\partial \rho'}{\partial t} + \rho_0 \nabla \cdot \vec{u} = 0
This is the differential form of mass conservation.
- Physically, it states that the time rate of change of the scalar mass density is exactly balanced by the negative divergence of the mass flux density vector (\vec{J}_m \approx \rho_0 \vec{u}). If the flux vector field has non-zero divergence (a source or sink, i.e \nabla \cdot \vec{u} \neq 0), the local density must change time-synchronously. In other words, this equation asserts that a non-zero divergence in the velocity field (local expansion or compression) must result in a corresponding time-rate change of the scalar density field.
- The Linearized Euler’s Equation (Conservation of Momentum)
- This is the fluid dynamic equivalent of Newton’s Second Law, neglecting viscous losses and convective acceleration terms. \rho_0 \frac{\partial \vec{u}}{\partial t} = -\nabla p
where:
\nabla p represents the spatial variation of the pressure field.
Physically, this equation couples the temporal change of the momentum density vector (\rho_0 \vec{u}) to the spatial variation of the pressure field. The negative gradient operator (-\nabla) implies that the acceleration vector of the fluid particles is aligned with the steepest descent of the scalar pressure field.
- The Equation of State (Constitutive Relation)
- Assuming an adiabatic process (negligible heat transfer during oscillation), we approximate the pressure-density relationship as linear. p = c^2 \rho'
- Physically, this provides the linear mapping between the two scalar fields (density and pressure), acting as the restoring force constant for the medium.
Derivation of the Acoustic Wave Equation
Our approach to derive the acoustic wave equation is to decouple the vector field \vec{u} from the scalar fields to form a single wave equation for pressure p(\vec{r},t).
Time-Differentiation of the Continuity Equation
We substitute the Equation of State (\rho' = p/c^2) into the Continuity Equation, then take the partial derivative with respect to time:
substitution \frac{1}{c^2} \frac{\partial p}{\partial t} + \rho_0 \nabla \cdot \vec{u} = 0
differentiation \frac{1}{c^2} \frac{\partial^2 p}{\partial t^2} + \rho_0 \frac{\partial}{\partial t} (\nabla \cdot \vec{u}) = 0
Since the spatial and temporal operators on continuous fields commute (\nabla \cdot \frac{\partial}{\partial t} = \frac{\partial}{\partial t} \nabla \cdot), we rewrite this as:
\frac{1}{c^2} \frac{\partial^2 p}{\partial t^2} + \rho_0 \nabla \cdot \left( \frac{\partial \vec{u}}{\partial t} \right) = 0
Divergence (Space-Differentiation) of Euler’s Equation
Next, we operate on Euler’s Equation with the divergence operator to isolate the term \nabla \cdot \frac{\partial \vec{u}}{\partial t}:
\nabla \cdot \left( \rho_0 \frac{\partial \vec{u}}{\partial t} \right) = \nabla \cdot (-\nabla p)
Applying the identity \nabla \cdot (\nabla \phi) = \nabla^2 \phi (the Laplacian), this becomes:
\rho_0 \nabla \cdot \left( \frac{\partial \vec{u}}{\partial t} \right) = -\nabla^2 p
Synthesis
We substitute the divergence of the acceleration term into the modified Continuity Equation
\frac{1}{c^2} \frac{\partial^2 p}{\partial t^2} + (-\nabla^2 p) = 0
Rearranging yields the homogeneous Acoustic Wave Equation:
\nabla^2 p - \frac{1}{c^2} \frac{\partial^2 p}{\partial t^2} = 0
\frac{\partial^2 p}{\partial t^2} = c^2 \nabla^2 p
where:
- p(x,y,z,t) is the acoustic pressure—the deviation from the ambient atmospheric pressure.
- c is the speed of sound in the medium (approximately 343 m/s in air at room temperature).
- \nabla^2 = \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z^2} is the Laplace operator, representing the spatial variation of pressure in all three dimensions.
This equation describes how a pressure change at one point in space spreads outwards spherically over time. The soundboard’s complex vibrations, containing all the harmonic frequencies from the strings, are imprinted onto this pressure wave.
Solutions to the Wave Equation
While the scalar Wave Equation governs the system dynamics, the solution topology depends on the boundary conditions and source geometry.
The Plane Wave
For a wave propagating in a single direction (e.g., \hat{x}), we assume invariance in y and z. The Laplacian reduces to \partial^2/\partial x^2.Harmonic Solution:
p(x,t) = P_+ e^{j(\omega t - kx)}
where k = \omega/c is the wavenumber and the real part of this complex function is the physical pressure wave. This represents a uniform wavefront with constant energy density.
The Spherical Wave
For a point source, we utilize spherical coordinates. Assuming isotropic radiation (symmetry in \theta and \phi), the Laplacian is \nabla^2 = \frac{1}{r^2}\frac{\partial}{\partial r}(r^2 \frac{\partial}{\partial r}).Harmonic Solution:
p(r,t) = \frac{A}{r} e^{j(\omega t - kr)}
Physical Implication:Unlike the 1D string or Plane Wave where amplitude is conserved, the Spherical Wave solution contains a 1/r dependence. This geometric attenuation is required to satisfy conservation of energy: as the spherical wavefront area expands by r^2, the power density (Intensity) must decrease by 1/r^2, necessitating that the pressure field amplitude decreases by 1/r.
Conclusion
For our purposes we are going to assume that the piano is a point source radiating sound waves into a free field. However, when we recieve the sound, we will assume that it arrives at the microphone as a plane wave. This is a reasonable assumption if the distance between the piano and the microphone is much larger than the wavelength of the sound.
Finally, the piano’s case and the position of its lid (open or closed) play a role in reflecting and directing these sound waves, shaping the final sound that reaches the listener’s ear. The entire structure works in concert to transform a simple hammer strike into a rich, resonant musical tone.