ExpTable

ExpTable(list=[(0, 0.0), (8192, 1.0)], exp=10, inverse=True, size=8192)

Construct a table from exponential interpolated segments.

Parent class : PyoTableObject

Parameters:

    list : list, optional
        List of tuples indicating location and value of each points 
        in the table. The default, [(0,0.), (8192, 1.)], creates a 
        exponential line from 0.0 at location 0 to 1.0 at the end of 
        the table. Location must be an integer.
    exp : float, optional
        Exponent factor. Used to control the slope of the curve.
        Defaults to 10.
    inverse : boolean, optional
        If True, downward slope will be inversed. Useful to create 
        biexponential curves. Defaults to True.
    size : int, optional
        Table size in samples. Defaults to 8192.

Methods:

    setSize(size) : Change the size of the table and rescale the envelope.
    setExp(x) : Replace the `exp` attribute.
    setInverse(x) : Replace the `inverse` attribute.
    replace(list) : Draw a new envelope according to the `list` parameter.

Notes:

    Locations in the list must be in increasing order. If the last value 
    is less than size, the rest of the table will be filled with zeros.

Attributes:

    list : list
        List of tuples [(location, value), ...].
    exp : float
        Exponent factor.    
    inverse : boolean
        Inversion of downward slope.
    size : int, optional
        Table size in samples.

Examples:

    >>> s = Server().boot()
    >>> s.start()
    >>> t = ExpTable([(0,0),(4096,1),(8192,0)], exp=5, inverse=True)
    >>> a = Osc(table=t, freq=2, mul=.5)
    >>> b = Sine(freq=500, mul=a).out()

Methods details:

    ExpTable.setSize(size):

        Change the size of the table and rescale the envelope.
        
        Parameters:
        
        size : int
            New table size in samples.

    ExpTable.setExp(x):

        Replace the `exp` attribute.
                
        Parameters:
        
        x : float
            New `exp` attribute.

    ExpTable.setInverse(x):

        Replace the `inverse` attribute.
                
        Parameters:
        
        x : boolean
            New `inverse` attribute.

    ExpTable.replace(list):

        Draw a new envelope according to the new `list` parameter.
        
        Parameters:
        
        list : list
            List of tuples indicating location and value of each points 
            in the table. Location must be integer.