linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / LinRand.schelp
blob383baff1593c1a559f5eb3f7803b7222cede6d79
1 class:: LinRand
2 summary:: Skewed random number generator.
3 related:: Classes/ExpRand, Classes/IRand, Classes/NRand, Classes/Rand, Classes/TExpRand, Classes/TIRand, Classes/TRand
4 categories:: UGens>Random
6 Description::
8 Generates a single random float value in linear distribution from
9 code::lo::  to  code::hi:: , skewed towards
10 code::lo::  if  code::minmax::  < 0, otherwise
11 skewed towards  code::hi:: .
14 classmethods::
16 method::new
18 argument::lo
19 Lower limit of the output range.
21 argument::hi
22 Upper limit of the output range.
24 argument::minmax
25 The output is skewed towards code::lo:: if code::minmax:: < 0, otherwise skewed towards code::hi::.
27 Examples::
29 code::
32 SynthDef("help-LinRand", { arg out=0, minmax=1;
33         Out.ar(out,
34                 FSinOsc.ar(
35                         LinRand(200.0, 10000.0, minmax),
36                         0, Line.kr(0.2, 0, 0.01, doneAction:2))
37         )
38 }).send(s);
41 //towards hi
43 Routine({
44         loop({
45                 Synth.new("help-LinRand"); 0.04.wait;
46         })
47 }).play;
50 //towards lo (doesn't work like that yet)
52 Routine({
53         loop({
54                 Synth.new("help-LinRand", [\minmax, -1]); 0.04.wait;
55         })
56 }).play;