You can also consider Tone.js which is a synthesizer. Also, I like the sound of https://github.com/PencilCode/musical.js
Those two above will allow you to make a simple website toy piano.
If you are making a command line app, you can record the samples from GarageBand if you have a Mac.
There are other cool command line options. If you're interested, let me know.
1. https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_AP... 2. https://abbernie.github.io/tune/
https://mobile.twitter.com/leapjosh/status/14230524867604111...
Most instruments that you're trying to emulate have timbre that varies widely across their frequency range. A piano key on the left side of the keyboard sounds very different from a piano key on the right side recorded and pitched down.
This is why sample-based instruments are generally multisampled. It's not to avoid resampling, which is generally efficient and sounds good. It's to accommodate timbre changes.
Anyone got any recommendations?
(edit - the tag seems to be 'multisample' https://freesound.org/browse/tags/multisample/ )
I found some good sets:
https://freesound.org/people/Carlos_Vaquero/packs/9528/
https://freesound.org/people/tim.kahn/packs/2680/