Click to See Complete Forum and Search --> : How to change the frequency of an input ding.wmv file


mike_m
February 10th, 2009, 12:35 PM
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.

rliq
February 10th, 2009, 09:08 PM
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/library/bb219822(VS.85).aspx

mike_m
February 12th, 2009, 10:41 AM
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?