coopiano: A physically modelled piano synthesizer in C++17
Coopiano is a piano synthesizer built in C++17 that models the physical properties of a piano, including components like the hammer, string, soundboard and sympathetic-resonance, along with a room reverb effect. This code renders MIDI files and notes to stereo WAV files, and supports live MIDI input on macOS. It does not rely on piano samples, downloads or third-party libraries. The project is still in an early stage of release.
To use coopiano, a C++17 compiler and Make are required. On macOS, install the Xcode Command Line Tools and run a specific command to build and test the code. The software supports offline rendering on other platforms as well, but live MIDI/audio is only available on macOS.
The synthesized sound is created using parameters such as hammer, string, soundboard, and sympathetic-resonance models, with the option to adjust a room reverb effect. No piano samples are required to run the software. The default settings are peak-normalized independently, and the rendered files are 44.1 kHz, 16-bit stereo WAV files.
To listen to the output, use the 'afplay' command on macOS. The build-in defaults don't require any configuration file, and the 'audition' command allows playing a chord at increasing velocities. The '--help' option provides information on chord, velocity and timing options. Changes made to the 'default.ini' file will not affect the built-in sound unless explicitly loaded using the '--preset' option and restarting playback.
To save the settings, set the environment variable 'GP_SAVE_SETTINGS' to '1', which writes a resolved preset beside the WAV file. Environment overrides take precedence over preset settings. The C++ source and header files are derived from a larger development project, so historical comments might refer to documentation from that project.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.