Hi,
Using phasor~ going into <~ 0.5 gets a proper square wave. Values of 0-1, rather than 0.5, alter pulsewidth. The output will be between 0 and 1, as opposed to -1 and 1, so you might want to rescale it, or not.
Regards,
Peter
p.s. on a related point, how can I get impulses generated at a given frequency. I expected ==~ to do this, but it doesn't seem to work.