A simple and far from the good physically modelled pianos, but a nice project to learn more about the subject.
This is a physically modeled piano implemented in the Odin programming language that one can give a function with the piano notes, timmings and dynamics, and it will generate a stereo WAV file with the piano music.
--- Commuted Waveguide Piano Synthesis ---
- Commuted excitation ( hammer + soundboard combined ).
- Velocity-dependent hammer hardness.
- Calibrated loop filter ( T60 curve matching ).
- Hammer position comb filtering.
- Stiffness dispersion ( inharmonicity ).
- Delay line preloading ( harmonic seeding ).
- Multi-string detuning ( double-decay + chorus ).
- Sympathetic resonance ( pedal coupling ).
- Two-stage damper model ( felt contact + damping ).
- Voice stealing ( 256 voice polyphony ).
- Soundboard body filter ( modal resonances ).
- chroeder reverb with early reflections.
- Stereo keyboard panning.
-
Beethoven - Fur Elise
./fur_elise.mp3 -
Beethoven - Moonlight_sonata
./moonlight.mp3
make
make run # option 1
make run # option 2
# To play the wav
ffplay fur_elise.wav
ffplay moonlight.wav
# To compress to MP3
ffmpeg -i fur_elise.wav -ab 256k fur_elise.mp3
ffmpeg -i moonlight.wav -ab 256k moonlight.mp3
ffplay fur_elise.mp3
ffplay moonlight.mp3
MIT Open Source License
Best regards,
Joao Carvalho