This project has moved and is read-only. For the latest updates, please go here.

How to ascend / descend a piano tone through a pre-generated .wav piano tone?

Dec 23, 2013 at 4:56 AM
What I'm trying to do is to create a virtual piano that can generate piano sound when each button is pressed. What i actually have in my mind is to use a sample .wav piano sound and ascend/descend the tone by altering its frequency. However, I have no idea how to do so.

I'm new to audio programming and I really wish you guys can guide me on this so I really wish you guys could give me some guide on this. Thanks in Advance.
Dec 23, 2013 at 8:18 PM
If you have access to Pluralsight, this is the exact example I show in my NAudio course. It's not the simplest task to attempt for your first attempt at audio programming. The way I built it was with RawSourceWaveStream playing the samples from memory, and using a custom pitch shifting sample provider, and an ADSR envelope generator. The notes were mixed together with a MixingSampleProvider.