Abstract
During the last decade, much attention has been given to sound rendering and the simulation of acoustic phenomena by solving appropriate models described by Hamiltonian partial differential equations. In this contribution, we introduce a procedure to develop appropriate tools inspired from geometric integration in order to simulate musical sounds. Geometric integrators are numerical integrators of excellent quality that are designed exclusively for Hamiltonian ordinary differential equations. The introduced procedure is a combination of two techniques in geometric integration: the semi-discretization method by Celledoni et al. (2012) and symplectic partitioned Runge–Kutta methods. This combination turns out to be a right procedure that derives numerical schemes that are effective and suitable for computation of musical sounds. By using this procedure we derive a series of explicit integration algorithms for a simple model describing piano sounds as a representative example for virtual instruments. We demonstrate the advantage of the numerical methods by evaluating a variety of numerical test cases.
Introduction: The Challenge of Physical Modeling in Audio
Simulating the sound of a musical instrument is a significant computational challenge. While traditional signal processing methods like sampling are efficient, they often fail to capture the complex, non-linear interactions inherent in real instruments, such as a hammer striking a piano string. To achieve high-fidelity "real" sound, researchers employ physical modeling based on Partial Differential Equations (PDEs).
However, humans perceive frequencies up to 20,000 Hz. Simulating just a few seconds of sound requires a numerical solver to calculate hundreds of thousands of vibration cycles. Standard numerical methods frequently suffer from "energy drift," where simulations either artificially gain energy (leading to instability) or lose it (resulting in muffled, unrealistic sound) over time. The primary challenge lies in developing a method that is computationally efficient for sound synthesis while remaining stable enough to maintain physical accuracy over millions of time steps.
Methodology: Variational Semi-discretization and Symplectic Integration
This paper introduces a systematic framework for simulating musical sounds by combining variational semi-discretization with symplectic numerical integrators. The authors propose a two-step "geometric integration" procedure:
- Variational Semi-discretization: Instead of discretizing the PDE directly, the instrument's Hamiltonian (total energy function) is discretized first. Equations of motion are then derived using variational calculus, ensuring the resulting system of Ordinary Differential Equations (ODEs) preserves the Hamiltonian structure of the original physics.
- Symplectic Partitioned Runge–Kutta (SPRK) Methods: These geometric integrators are applied to solve the ODEs. Specifically designed for Hamiltonian systems, they offer superior long-term stability.
Crucially, most musical instrument models are separable Hamiltonian systems, where kinetic and potential energy are distinct terms. This allows for the use of explicit SPRK schemes, which avoid the heavy computational cost of solving non-linear equations at every time step, making the approach practical for real-time sound rendering.
Key Results: Stability and Spectral Accuracy
The proposed framework was validated using analytical benchmarks and physical parameters for a "C4" piano tone. The numerical solutions demonstrated perfect convergence to exact analytical solutions as time steps and grid spacing were reduced.
In undamped tests, the discrete energy remained bounded within a range of $10^{-12}$ to $10^{-14}$ over tens of thousands of steps, a feat typically unachievable by non-geometric methods. This energy stability is crucial for maintaining the "timbre" of the instrument over long durations.
The simulation accurately reproduced the fundamental frequency of a C4 note (261.63 Hz) and its integer harmonics, matching the acoustic "fingerprint" of real piano tones. The 4th-order SPRK method, in particular, provided an optimal balance of accuracy and computational efficiency.
Discussion and Future Work
This research highlights that for audio synthesis, preserving the underlying physical structure—such as energy conservation—is often more critical than raw local accuracy. Structure preservation ensures that the simulation remains stable and the sound remains consistent over time.
While the current study focused on a simplified piano model (one string and one hammer), future work will aim to incorporate more complex interactions, such as soundboard resonance and multi-string coupling. Additionally, exploring higher-order spatial discretization schemes could further enhance the clarity of high-frequency tones. The interaction between symplectic integrators and dissipative (damping) terms also remains an area for further theoretical investigation.
Summary updated