TL;DR
The nlm package introduces a set of open-source Max externals that bring high-performance, non-linear modal synthesis to real-time musical performance. By implementing complex physical models for strings, membranes, and plates in C++, the authors provide a tool that allows sound designers and composers to interactively manipulate physical properties—like tension and material density—to create rich, dynamic sounds that go far beyond traditional linear simulations.
What Problem Does This Paper Address?
Physical modeling synthesis aims to recreate the sound of real-world objects by simulating their physical properties. Modal synthesis is a popular subset of this field because it breaks down complex vibrations into individual "modes" (resonant frequencies), which is computationally efficient and intuitive for musicians.
However, most real-time modal tools are linear. In a linear model, if you hit a drum twice as hard, it just gets twice as loud. In the real world, physical objects are non-linear: hitting a gong harder changes its pitch and timbre over time due to internal tension and deformation. While researchers have developed mathematical models for these non-linearities (like the Kirchhoff-Carrier or von Kármán models), they are usually confined to slow, offline simulations. The nlm project bridges this gap, providing a unified, optimized framework for these complex physics within the Max/MSP environment.
Methods
The authors developed a C++ core library using the Eigen library for optimized matrix operations. The system is built around four Max externals (e.g., nlm.string~, nlm.plate~) that utilize a few key mathematical approaches:
- Modal Decomposition: The physical system is decomposed into $M$ modes. In the linear case, these modes evolve independently; in the non-linear case, they interact through coupling terms.
- Non-linear Models: The package implements specific models for different geometries:
- Strings: Kirchhoff-Carrier model (tension modulation).
- Membranes: Berger approximation.
- Plates: von Kármán model, which accounts for the complex coupling between transverse (up/down) and in-plane (side-to-side) vibrations.
- Discretization: They use an impulse-invariant discretization to turn continuous physics equations into a discrete update scheme suitable for digital audio.
- Customizability: While the objects default to rectangular geometries, they allow users to load custom "eigenpairs" (mode shapes and frequencies) and coupling coefficients calculated externally, enabling the simulation of irregular shapes.
Datasets
As this paper focuses on a physics-based simulation tool rather than a machine learning model, no training datasets were used. The "data" involved consists of physical parameters (Young's modulus, Poisson's ratio, etc.) and pre-computed modal data for specific geometries.
Key Insights and Ideas
- Unified Framework: Instead of separate, disconnected tools,
nlmprovides a consistent interface for strings, membranes, and plates, making it easier for artists to experiment across different physical paradigms. - Efficiency through Optimization: By leveraging C++ and Eigen, the authors achieved real-time performance for models that were previously too heavy for live use.
- Decoupled Interaction: To keep the system responsive, the authors assume the external force (the "hit") is independent of the resonator's state. This allows users to use any audio signal—like a live microphone feed or filtered noise—as an excitation source without needing a complex feedback loop.
- Accessibility: By releasing this as a set of Max externals, the authors are "lowering the barrier" for non-engineers to explore high-level physical modeling.
Key Results
- Real-Time Performance: On modern hardware, the externals can handle roughly 100 modes for plates and several hundred modes for strings and membranes without audio glitches.
- Computational Complexity: The authors note that for the von Kármán plate model, the complexity is $O(NM^2)$, where $N$ is the number of in-plane modes and $M$ is the number of transverse modes.
- Open Source: The entire project is available on GitHub, providing a new standard tool for the computer music community.
Limitations and Future Work
- Numerical Stability: Currently, the system can become unstable (blow up) if the excitation force is too strong. The authors plan to implement "energy-clamping" strategies to prevent this.
- Computational Load: While efficient, high mode counts can still overwhelm a CPU, especially when parameters are modulated in real-time.
- Geometry Support: Native support is currently limited to rectangular shapes; the authors want to provide better built-in support for arbitrary geometries to avoid requiring external pre-processing.
- Platform Expansion: A version for Pure Data (Pd) is planned for the future.
Summary updated