How to change the frequency of an input ding.wmv file
Hello!
I'm making a virtual piano and having problems setting the right frequency to achieve the notes:
C, C#, D, D#, E, F, F#, G, G#, A, A#, B.
My input file is a ding.wmv file, which sounds better then the default computer beep voice.
I've managed to play the sounds, but i would like to change the frequency and play the altered frequency.
Re: How to change the frequency of an input ding.wmv file
Mike,
Just off the top of my head, take a look at the DirectX library. In particular, DirectSound. This library should give you a lot more control over all aspects of Sound.
http://msdn.microsoft.com/en-us/libr...22(VS.85).aspx
Re: How to change the frequency of an input ding.wmv file
Very nice this directsound library. I've managed now to change the frequency, but i'm facing another problem. When i press the key "C" and then press key "C#" or "E" it just raises or lowerst the sound until it's played to the end. I would like the 'ding' every time i press the button, not just change the pitch. I tried stopping the sound but it's not the right solution.
Any idea?
//tnx for help, -MiKE
------------------------------------------------------------------------EDiT-----------------------------------------------------------------------------
Ok, solved the problem. I just set the sound position back to 0.
And i'm here with another problem... :)
I want to play chords too, how can i do that? Can i run with my keyboard two events at the same time?