openpbso is a C++ open-source library for physics-based sound. We provide functionalities to synthesize rigid-body sound models such as those built by the KleinPAT algorithm (KleinPAT preprocessing tools not included).
Below is a list of dependencies along with the version that are tested:
- CMake: 3.12.1
- Eigen: 3.2.10
- Libigl: 2.1.0 (modified)
- PortAudio: latest stable release here
- Protobuf: 3.7.1
We recommend you to install libigl using git via:
cd external
git clone https://github.com/jhwang7628/libigl.git
cd libigl/
git submodule update --init --recursive
cd ..
Compile this project using the standard cmake routine:
mkdir build
cd build
cmake ..
make
This will create a binary named real_time_modal_sound_bin
. C++11 or above is
recommended.
Since the code uses serialized data, it is recommended to run the protocol buffer compiler at the root directory:
protoc --cpp_out=. ./ffat_map.proto
The modal sound synthesizer uses preprocessed data to run the modal sound synthesis. You will need the following data files.
- .obj file
- surface modes file
- modal material txt file
- FFAT maps folder built by KleinPAT
There are two ways of loading the data files. If everything is named properly like the examples we provided, you can simply run
./real_time_modal_sound_bin -d <data_folder> -name <obj_name>
An example of <obj_name>
would be wine
. The name
flag is optional.
<data_folder>
is where the .obj file can be located.
Alternatively, you can also specify each required files/folder:
./real_time_modal_sound_bin -m <obj_file> -s <modes_file> -t <material_file> -p <ffat_maps_folder>
This is likely due to older protoc version. Please try to upgrade the protocol buffer.