SuperCollider CLASSES (extension)

TBetaRand
ExtensionExtension

triggered beta random distribution
Inherits from: UGen : AbstractFunction : Object

Description

Generates a random float value in beta distribution from lo to hi each time the trigger signal changes from nonpositive to positive values.

Class Methods

*ar (lo: 0, hi: 1, prob1, prob2, trig: 0, mul: 1, add: 0)

*kr (lo: 0, hi: 1, prob1, prob2, trig: 0, mul: 1, add: 0)

Arguments:

lo

minimum value

hi

maximum value

prob1, prob2

if prob1 & prob2 are less than 1, values tend towards lo & hi. if they are equal to 1, there is a linear random distribution. higher than 1, the distribution tends towards gaussian, with the possibility of a mean skewed towards the prob of the lowest value.

trig

trigger signal

Inherited class methods

Instance Methods

Inherited instance methods

Examples

(
{
    var trig = Dust.kr(10);
    SinOsc.ar(
        TBetaRand.kr(300, 3000, 0.1, 0.1, trig)
    ) * 0.1
}.play;
)

(
{
    var trig, prob1, prob2;
    trig = Dust.kr(10);
    prob1 = MouseX.kr(1, 5);
    prob2 = MouseY.kr(1, 5);
    SinOsc.ar(
        TBetaRand.kr(300, 3000, prob1, prob2, trig)
    ) * 0.1
}.play;
)