TrigRand

TrigRand(input, min=0.00, max=1.00, port=0.00, init=0.00, mul=1, add=0)

Pseudo-random number generator.

TrigRand generates a pseudo-random number between `min` and `max` values each time it receives a trigger in its `input` parameter. The value is kept until the next trigger.

Parent class : PyoObject

Parameters:

    input : PyoObject
        Audio signal sending triggers.
    min : float or PyoObject, optional
        Minimum value for the random generation. Defaults to 0.
    max : float or PyoObject, optional
        Maximum value for the random generation. Defaults to 1.
    port : float, optional
        Portamento. Time to reach a new value. Defaults to 0.
    init : float, optional
        Initial value. Available at initialization time only. 
        Defaults to 0.

Methods:

    setInput(x, fadetime) : Replace the `input` attribute.
    setMin(x) : Replace the `min` attribute.
    setMax(x) : Replace the `max` attribute.
    setPort(x) : Replace the `port` attribute.

Attributes:

    input : PyoObject. Audio trigger signal.
    min : float or PyoObject. Minimum value.
    max : float or PyoObject. Maximum value.
    port : float. Ramp time.

Examples:

    >>> s = Server().boot()
    >>> s.start()
    >>> m = Metro(.125).play()
    >>> tr = TrigRand(m, 400, 600)
    >>> a = Sine(tr, mul=.5).out()

Methods details:

    TrigRand.setInput(x, fadetime=0.05):

        Replace the `input` attribute.
        
        Parameters:

        x : PyoObject
            New signal to process.
        fadetime : float, optional
            Crossfade time between old and new input. Defaults to 0.05.

    TrigRand.setMin(x):

        Replace the `min` attribute.
        
        Parameters:

        x : float or PyoObject
            new `min` attribute.

    TrigRand.setMax(x):

        Replace the `max` attribute.
        
        Parameters:

        x : float or PyoObject
            new `max` attribute.

    TrigRand.setPort(x):

        Replace the `port` attribute.
        
        Parameters:

        x : float
            new `port` attribute.