Phasor:
Filter:
Classes | UGens > Triggers | UGens > Buffer

Phasor : UGen : AbstractFunction : Object

A resettable linear ramp between two levels.
Source: Trig.sc

Description

Phasor is a linear ramp between start and end values. When its trigger input crosses from non-positive to positive, Phasor's output will jump to its reset position. Upon reaching the end of its ramp Phasor will wrap back to its start.

NOTE: N.B. Since end is defined as the wrap point, its value is never actually output.
NOTE: If one wants Phasor to output a signal with frequency freq oscillating between start and end, then the rate should be (end - start) * freq / sr where sr is the sampling rate.

Phasor is commonly used as an index control with BufRd and BufWr.

Class Methods

Phasor.ar(trig: 0.0, rate: 1.0, start: 0.0, end: 1.0, resetPos: 0.0)

Phasor.kr(trig: 0.0, rate: 1.0, start: 0.0, end: 1.0, resetPos: 0.0)

Arguments:

trig

When triggered, jump to resetPos (default: 0, equivalent to start).

rate

The amount of change per sample, i.e at a rate of 1 the value of each sample will be 1 greater than the preceding sample.

start

Start point of the ramp.

end

End point of the ramp.

resetPos

The value to jump to upon receiving a trigger.

Inherited class methods

Instance Methods

Inherited instance methods

Examples