Explicitly include a boost "windows" folder even on linux
[supercollider.git] / HelpSource / Classes / CoinGate.schelp
bloba16df91db1fa5be29469f1e84d07706f3c2ace5f
1 class:: CoinGate
2 summary:: Statistical gate.
3 categories::  UGens>Generators>Stochastic
6 Description::
8 When CoinGate receives a trigger, it tosses a coin
9 and either passes the trigger or doesn't.
12 classmethods::
14 method::ar, kr
16 argument::prob
18 Value between 0.0 and 1.0 determines probability of either possibilities.
21 argument::in
22 The trigger input.
24 Examples::
26 code::
29 a = SynthDef("help-TCoin", { arg out=0, prob=0.5;
30         var trig;
31         trig = CoinGate.kr(prob, Impulse.kr(10));
32         Out.ar(out,
33                 SinOsc.ar(
34                         TRand.kr(300.0, 400.0, trig),0,0.2
35                 )
36         )
37 }).play;
40 a.set(\prob, 1.0);
41 a.set(\prob, 0.0);
42 a.set(\prob, 0.1);
46 a = SynthDef("help-TCoin", { arg out=0, prob=0.5;
47         var trig;
48         trig = Impulse.ar(20, 0, SinOsc.kr(0.5,0,1,1));
49         Out.ar(out,
50                 Mix.fill(3, {Ringz.ar(CoinGate.ar(prob, trig*0.5), #[1,1.5]*Rand(1000, 9000), 0.01)})
51         )
52 }).play;
55 a.set(\prob, 1.0);
56 a.set(\prob, 0.0);
57 a.set(\prob, 0.1);