expand

Reference > square

Wave
Spectrum

    

square(frequency, phase) Returns a function whose input is a time (in seconds) and whose output is a point on a square wave. You can create a 440 Hz square wave by mapping a time wave to this square function, using time.map(square(440))

You can find the code for square in the synthesine library.