Open Piano is an attempt at recreating the characteristic sound of the piano with physical modeling sound synthesis. This allows for greater expressiveness and flexibility in comparison to sampled pianos. There is also no need to download huge libraries of audio samples, since everything is generated in real time.
DISCLAIMER: I don't discourage you from trying out Open Piano, but please note that this is still alpha quality software. As of now, it is nowhere near commercial plugins like Modartt's Pianoteq (which I own, and love) or Arturia's Piano V.
A first binary release of Open Piano will be published once the project reaches a usable state.
To build the Open Piano JUCE app/plugin, you will need CMake (version 3.15 or above), a C++ compiler (C++17 or above), and the latest version of the JUCE library. Once you clone/download this repository, you need to clone/download a copy of JUCE inside the OpenPianoJUCE/
folder. You end up with this directory structure:
OpenPiano
├── OpenPianoCore/
├ ├── Source/
├ └── CMakeLists.txt
└── OpenPianoJUCE/
├── JUCE/
├── Source/
└── CMakeLists.txt
- Windows/macOS/Linux: if you use a CMake-based IDE like CLion or QtCreator, use it to open
CMakeLists.txt
and proceed building from there. - Windows only: download and install the latest CMake installer, Visual Studio Community IDE, and the Windows SDK. Open CMake, point it to the source folder (OpenPianoJUCE or OpenPianoCore), and generate a VS project to be opened in Visual Studio.
- macOS only: download and install XCode from the App Store and the CMake installer. Use CMake to generate an XCode project.
- Linux/macOS and other UNIX/UNIX-based/UNIX-like operating systems: use the command line 😉
Right now, Open Piano sounds like a strangely out of tune piano with no soundboard and only one string per note. Here's a short list of what needs to be done:
-
Fix repeated hits of the string by the hammer, without resetting the entire string displacement (see here)- Fixed HERE -
Optimize the FD model to make it... usable- Partially done HERE, but there's room for improvement -
Take advantage of multithreading- Semi-decent implementation HERE -
Add string dampers (normal people call it pedal)- Rudimentary implementation HERE - Find a mitigation for the fact that higher strings have a decreasingly lower spatial resolution, which makes it impossible to use the entire piano range with reasonable sampling frequencies
- Simulate multiple strings per note and the double decay phenomenon
- Simulate the soundboard
- Find a decent set of physical parameters for all the strings
- Simulate sympathetic resonances
- (In case FD shows itself to be too burdensome, consider the possibility of switching to modal analysis)
Everything starts from the differential equation of vibration of a lossy stiff string, hit by a hammer:
To obtain the spatial displacement of each piano string at each temporal instant, we need to solve this equation. There are different approaches: two examples are finite differences (FD) and modal analysis. The idea behind FD is to discretize the differential equation by substituting its derivatives with finite differences - hence the name. Modal analysis, on the other hand, assumes that the solutions of the equation are in modal form, and discretizes the solutions rather than the equation itself. Open Piano uses the FD approach.
Once the project reaches a certain usability level, contributions will be welcome.
Yes I do. I am. Whatever