Why don't you first read the info provided, try to understand it, only then reply?It would be cool to do your analogue signals this way
What you desrcibe as "would be cool" is exactly what is described in the Wikipedia article I linked.
You will also find lots of more detailed information on the internet by searching for "PWM".