PyoTableObject(self)
Base class for all pyo table objects.
A table object is a buffer memory to store precomputed samples.
The user should never instantiate an object of this class.
Methods:
getSize() : Return table size in samples. view() : Opens a window showing the contents of the table. dump() : Print current status of the object's attributes. save(path, format) : Writes the content of the table in an audio file. write(path) : Writes the content of the table in a text file. read(path) : Sets the content of the table from a text file. normalize() : Normalize table samples between -1 and 1. put(value, pos) : Puts a value at specified position in the table. get(pos) : Returns the value at specified position in the table.
Notes:
Operations allowed on all table objects : len(obj) : Return the number of table streams in an object. obj[x] : Return table stream `x` of the object. `x` is a number from 0 to len(obj) - 1.
Methods details:
PyoTableObject.getSize(self): Return table size in samples. PyoTableObject.view(title="Table waveform", wxnoserver=False): Opens a window showing the contents of the table. Parameters: title : string, optional Window title. Defaults to "Table waveform". wxnoserver : boolean, optional With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window and not to wait for it before showing the table window. Defaults to False. PyoTableObject.dump(self): Print the number of streams and the current status of the object's attributes. PyoTableObject.save(path, format=0): Writes the content of the table in an audio file. The sampling rate of the file is the sampling rate of the server and the number of channels is the number of table streams of the object. Parameters: path : string Full path (including extension) of the new file. format : int, optional Format type of the file. Possible formats are: 0 : AIFF 32 bits float (Default) 1 : WAV 32 bits float 2 : AIFF 16 bits int 3 : WAV 16 bits int 4 : AIFF 24 bits int 5 : WAV 24 bits int 6 : AIFF 32 bits int 7 : WAV 32 bits int PyoTableObject.write(path): Writes the content of the table in a text file. This function can be used to store the table data as a list of floats into a text file. PyoTableObject.read(path): Reads the content of a text file and replaces the table data with the values in the file. Format is a list of lists of floats. For example, A two tablestreams object must be given a content like this: [[0.0,1.0,0.5,...], [1.0,0.99,0.98,0.97,...]] Each object's tablestream will be resized according to the length of the lists. PyoTableObject.normalize(self): Normalize table samples between -1 and 1. PyoTableObject.put(value, pos=0): Puts a value at specified position in the table. If the object has more than 1 tablestream, the default is to record the value in each table. User can call obj[x].put() to record in a specific table. Parameters: value : float Value, as floating-point, to record in the table. pos : int, optional Position where to record value. Defaults to 0. PyoTableObject.get(pos): Returns the value, as float, at specified position in the table. If the object has more than 1 tablestream, the default is to return a list with the value of each tablestream. User can call obj[x].get() to get the value of a specific table. Parameters: pos : int, optional Position where to get value. Defaults to 0.