Classes | UGens > Triggers | UGens > Random

TChoose : Object

Randomly select one of several inputs
Source: Osc.sc

Description

An output is selected randomly on receiving a trigger from an array of inputs.

TChoose returns a combination of Select and TIRand.

Class Methods

TChoose.ar(trig, array)

TChoose.kr(trig, array)

Arguments:

trig
array

Inherited class methods

Instance Methods

Inherited instance methods

Examples

(
{
    var a;
    a = [
            SinOsc.ar,
            Saw.ar,
            Pulse.ar
        ];
    TChoose.ar(Dust.ar(MouseX.kr(1, 1000, 1)), a) * 0.2

}.play;
)
NOTE: all the ugens are continuously running. This may not be the most efficient way if each input is cpu-expensive.