2 summary:: Triggered windex.
3 categories:: UGens>Random, UGens>Triggers
8 When triggered, returns a random index value based on array as a list of
9 probabilities. By default the list of probabilities should sum to 1.0,
10 when the normalize flag is set to 1, the values get normalized
11 by the UGen (less efficient).
20 The trigger. Trigger can be any signal. A trigger happens when
21 the signal changes from non-positive to positive.
25 The list of probabilities.
28 Controls whether to normalize the probability values.
34 //assuming normalized values
37 a = SynthDef("help-TWindex",{ arg w1=0.0, w2=0.5, w3=0.5;
41 index = TWindex.kr(trig, [w1, w2, w3]);
45 Select.kr(index,[400, 500, 600]),
53 a.setn(0, [0,0,1].normalizeSum);
54 a.setn(0, [1,1,1].normalizeSum);
55 a.setn(0, [1,0,1].normalizeSum);
58 //modulating probability values
61 a = SynthDef("help-TWindex",{ arg w1=0.0, w2=0.5;
67 [w1, w2, SinOsc.kr(0.3, 0, 0.5, 0.5)],//modulate probability
73 Select.kr(index,[400, 500, 600]),