This web application demonstrates the artificial generation of a piano sound using additive sound synthesis and envelopes. Implemented with Vue.js, JavaScript and the Mozilla Web Audio API.
The demo application can be run here. It's an interval ear trainer.
The PDF (German) describes the mathematical principles and some aspects of the implementation.