VarPort

VarPort(value, time=0.03, init=0.00, function=None, arg=None, mul=1, add=0)

Convert numeric value to PyoObject signal with portamento.

When `value` attribute is changed, a smoothed ramp is applied from the current value to the new value. If a callback is provided at `function`, it will be called at the end of the line.

Parent class : PyoObject

Parameters:

    value : float
        Numerical value to convert.
    time : float, optional
        Ramp time, in seconds, to reach the new value. Defaults to 0.025.
    init : float, optional
        Initial value of the internal memory. Defaults to 0.
    function : Python callable, optional
        If provided, it will be called at the end of the line. 
        Defaults to None.
    arg : any Python object, optional
        Optional argument sent to the function called at the end of the line.
        Defaults to None.

Methods:

    setValue(x) : Changes the value of the signal stream.
    setTime(x) : Changes the ramp time.

Attributes:

    value : float. Numerical value to convert.
    time : float. Ramp time.

Notes:

    The out() method is bypassed. VarPort's signal can not be sent to audio outs.

Examples:

    >>> s = Server().boot()
    >>> s.start()
    >>> def callback(arg):
    ...     print "end of line"
    ...     print arg
    .... 
    >>> fr = VarPort(value=800, time=2, init=400, function=callback, arg="YEP!")
    >>> a = Sine(freq=fr, mul=.5).out()

Methods details:

    VarPort.setValue(x):

        Changes the value of the signal stream.

        Parameters:

        x : float
            Numerical value to convert.

    VarPort.setTime(x):

        Changes the ramp time of the object.

        Parameters:

        x : float
            New ramp time.