LinTable

LinTable(list=[(0, 0.0), (8191, 1.0)], size=8192)

Construct a table from segments of straight lines in breakpoint fashion.

Parent class : PyoTableObject

Parameters:

    list : list, optional
        List of tuples indicating location and value of each points 
        in the table. The default, [(0,0.), (8191, 1.)], creates a 
        straight line from 0.0 at location 0 to 1.0 at the end of the 
        table (size - 1). Location must be an integer.
    size : int, optional
        Table size in samples. Defaults to 8192.

Methods:

    setSize(size) : Change the size of the table and rescale the envelope.
    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), ...].
    size : int, optional
        Table size in samples.

Examples:

    >>> s = Server().boot()
    >>> s.start()
    >>> # Sharp attack envelope
    >>> t = LinTable([(0,0), (100,1), (1000,.25), (8191,0)])
    >>> a = Osc(table=t, freq=2, mul=.5)
    >>> b = Sine(freq=500, mul=a).out()

Methods details:

    LinTable.setSize(size):

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

    LinTable.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.