If you like this instructable, please vote in Hack it contest and DIY audio contest.
The block diagram is shown below (block diagram). The motor is rotating in constant speed. There are dark (non transparent) and transparent portions on the CD. When the dark portion of the CD is between the IR emitter/detector, the resistance of the detector will be high, and the voltage across the speaker will be low. When the transparent portion of the CD is between the IR emitter/detector, the detector receives the signal from emitter, and its resistance will be low, so the voltage across the speaker will be high. The voltage signal across the speaker is a square wave. By varying the speed of the motor and dark/transparent portions on CD, the frequency of square waves signal changes. You can hear the changes from the speaker.