How to use a IR sensor to control music please?

Hi. I'm working on this project in attempt to use a IR sensor(Sharp 2YOA21) to control music pitch/dynamic/tempo. I have got the sensor up and running, it shows the distance change in the serial monitor window, and I am using a LED as a visualizer, it blinks slowly when something is close and faster when something is moving away. But from here I have no idea how go about the music part. Can anybody lend me a hand please? Much appreciated.

Hi, If your looking to control prerecorded music, I can't help but others can, if your looking to control sythesised sound then check out the Audino. Its very simple to build check it our on your favorite video site for an idea of what it sounds like.

You could replace one or more of the potentiometers with whatever sensors you have.

If you do decide to build one, there is a small easily fixed bug in the download code I have posted about it and the fix in the Audio section.

Duane B