How to output waveform to servo

Agree with SouthPark...
It sounds like OP may eventually paint themselves into a corner.
Design the hardware mechanism that does everything you need now PLUS 20%
Then code for that.
Not the other way around.