I read:
I guess it would still be nice to have a low cpu square wave, though, if the audio compare objects are costy - would they be more expensive than, for example, the version Frank Barknecht posted, despite looking simpler? cpu cycles are money, people ;-).
look here http://www.musicdsp.org/ for some algorythms for bandlimited or fast square wave formulas, and you can always use tables of course.
regards,
x