What you’re looking for is called a “sample library”. Usually what you get is a single note or a few octaves of a single note from an instrument of a given key, which you load into a sampler that makes the proper pitch adjustments to “play” that instrument for a given scale.
It’s reasonably easy to find royalty-free sample libraries, particularly on discs bundled with print editions of magazines like “Music Tech” or “Future Music.”
Of course, you have to do your own pitch adjustment to the notes you get out of a sample library. If you’re adventurous you can use the “secret undocumented” OpenAL API to do this.