SampHold

SampHold(input, controlsig, value=0.00, mul=1, add=0)

Performs a sample-and-hold operation on its input.

SampHold performs a sample-and-hold operation on its input according to the value of `controlsig`. If `controlsig` equals `value`, the input is sampled and holded until next sampling.

Parent class : PyoObject

Parameters:

    input : PyoObject
        Input signal.
    controlsig : PyoObject
        Controls when to sample the signal.
    value : float or PyoObject, optional
        Sampling targeted value. Default to 0.0.

Methods:

    setInput(x, fadetime) : Replace the `input` attribute.
    setControlsig(x, fadetime) : Replace the `controlsig` attribute.
    setValue(x) : Replace the `value` attribute.

Attributes:

    input : PyoObject. Input signal.
    controlsig : PyoObject. Controls when to sample the signal.
    value : float or PyoObject. Targeted value.

Examples:

    >>> s = Server().boot()
    >>> s.start()
    >>> a = Noise(500,1000)
    >>> b = Sine(4)
    >>> c = SampHold(input=a, controlsig=b, value=0)
    >>> d = Sine(c, mul=.3).out()

Methods details:

    SampHold.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. Default to 0.05.

    SampHold.setControlsig(x, fadetime=0.05):

        Replace the `controlsig` attribute.
        
        Parameters:

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

    SampHold.setValue(x):

        Replace the `value` attribute.
        
        Parameters:

        x : float or PyoObject
            New `value` attribute.