michele-perrone / OpenPiano

An open source real-time piano engine and JUCE plugin based on physical modelling
GNU Affero General Public License v3.0
108 stars 2 forks source link

Open Piano: an open source piano engine based on physical modeling

Summary

1. What is Open Piano?

2. How do I use it?

3. Building

4. Current state and road map

5. How does it work?

6. Can I contribute to this project?

7. Are you crazy?

What is Open Piano?

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.

How do I use it?

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.

Building

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

Current state and road map

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:

How does it work?

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.

Can I contribute to this project?

Once the project reaches a certain usability level, contributions will be welcome.

Are you crazy?

Yes I do. I am. Whatever