Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Okay so here's what I'm doing. I've recently been given the task of creating a Karaoke program. Basically, for those of us who don't know what this is, you have a user singing into a microphone, trying to hit the same note that the singer of the song which is playing in the background.

I've done my research, and I've seen different approaches to this. One of which was using the winmm.dll, but I also saw an approach which uses DirectSound. Now, I downloaded and installed the DirectX 9.0 SDK, in hopes that I could then use Microsoft.Directx reference in my c# project. Even after installation, I was unable to do so.

So now, after several attempts at my problem, I've come to you guys for help. I require a base to start, I've never worked with audio input and processing so I really don't know how to begin. Google suggested that audio streaming is an option, however there really aren't that many karaoke guides out there. At least I wasn't able to find any useful ones.

That's it. Thank you all in advance.
Posted
Comments
Dr.Walt Fair, PE 21-Dec-10 21:27pm    
I don't have a solution, but I'd check into some of the DSP libraries, since they also need to grab real time audio data. Good luck!

1 solution

So this isn't a base of a program, but hopefully it'll get you started with DirectSound.

If you want to use DirectX in a Managed program, the supported method is using XNA. The current version of XNA can be downloaded here:

http://create.msdn.com/en-us/home/getting_started[^]

Don't worry that it talks about Windows Phone and the XBox 360, it works on PCs as well. This page will then help you get started with recording sound:

http://msdn.microsoft.com/en-us/library/ff827801.aspx[^]

You then need to work the processing magic on the data you get. Walt's recommendation of looking at DSP libraries is a good plan. I don't know much about this sort of thing, but you may want to look at Fast Fourier Transforms, which will let you extract frequency data from a signal. This may help you work out what pitch your singer is singing at. Naturally, this needs to be done as fast as possible to give your user timely feedback.

Hope this is of help. Good luck :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900