Demand:
Filter:
Classes | UGens > Demand

Demand : MultiOutUGen : UGen : AbstractFunction : Object

Demand results from demand rate UGens.
Source: Demand.sc

Description

When there is a trigger at the trig input, a value is demanded each UGen in the list and output. The unit generators in the list should be 'demand' rate.

When there is a trigger at the reset input, the demand rate UGens in the list are reset.

Class Methods

Demand.ar(trig, reset, demandUGens)

Demand.kr(trig, reset, demandUGens)

Arguments:

trig

Trigger. Can be any signal. A trigger happens when the signal changes from non-positive to positive.

reset

Trigger. Resets the list of UGens when triggered.

demandUGens

List of demand-rate UGens to get values from. When the shortest stream ends, this ugen will set the 'done' flag.

Discussion:

By design, a reset trigger only resets the demand ugens; it does not reset the value at Demand's output. Demand continues to hold its value until the next value is demanded, at which point its output value will be the first expected item in the list. To jump to the start value upon receipt of a reset trigger, one can add (+) the two triggers together:

One demand ugen represents a single stream of values, so that embedding the same ugen twice calls this stream twice. To isolate a demand ugen, use a function:

Inherited class methods

Instance Methods

Inherited instance methods

Examples