A phasor UGen that takes new frequency values at the beginning of each cycle.
It can be used to implement the 'segmod' program of Döbereiner and Lorenz.
In contrast to LFSaw
which continuously reads frequency values, its
output values go from zero to one, and the phase argument is only used
internally (the output signal always starts at zero).
To turn this, for example, into a sine oscillator, you can use
(SegModPhasor(...) * 2 * math.Pi).sin
.
'''Warning:''' passing in zero frequencies will halt the process. XXX TODO
- Value parameters:
- freqN
normalized frequency (f/sr). One value per output cycle is read. Also note that the UGen terminates when the
freqN
signal ends. Thus, to use a constant frequency, wrap it in aDC
orDC(...).take
.- phase
phase offset in radians. The phase offset is only used internally to determine when to change the frequency. For example, with a phase of
0.25
, when the output phase reaches 0.25, the next frequency value is read. With the default phase of 0.0, a frequency value is read after one complete cycle (output reaches 1.0).
- Companion:
- object