Reference > phasor
Wave
Spectrum
phasor(frequency, phase)
Returns a function whose input is a time (in seconds) and whose output is a point on a phasor wave. You can create a 440 Hz phasor wave by mapping a time wave to this phasor function, using time.map(phasor(440))
frequency
Frequency of the square wave in Hertz (Hz) or cycles per second.phase (optional)
Phase shifts the wave to the left or right. A phase of PI shifts the wave a half-cycle to the right.phase
can either be a number or it can be a wave, as used in Frequency Modulation.
You can find the code for phasor
in the synthesine library.