Added harmonic squarewave function generator