I am making a piano app, where each key plays a different .wav
file. For instance, if the C
note is pressed then C.wav
is played.
So far I have only managed to play a wav file using the code in the screenshot, otherwise the file is not found. However this method is not suitable for what I am trying to do. The wav file i am trying to play is called hello.wav
and I have provided the location. Any suggestions?
This is the current code:
SoundPlayer sp = new SoundPlayer(PianoApp.Properties.Resources.Hello);
sp.Play();
or as it appears in my IDE:
This is the file location: