I've spent quite a while searching online for a simple answer to this question, but no luck so far. I'm developing a #software #music #synthesiser, and I'd like to generate #pulseWaves of a given #dutyCycle, #frequency and #amplitude. What's the most #programmer friendly equation for this?

In case you're wondering, my synth is, of course, written in #Rust, using #PortAudio, and entirely for fun.