NewTable(length, chnls=1, init=None)
Create an empty table ready for recording.
See `TableRec` to write samples in the table.
Parent class : PyoTableObject
Parameters:
length : float Length of the table in seconds. chnls : int, optional Number of channels that will be handled by the table. Defaults to 1. init : list of floats, optional Initial table. List of list can match the number of channels, otherwise, the list will be loaded in all tablestreams. Defaults to None.
Methods:
getSize() : Returns the length of the table in samples. getLength() : Returns the length of the table in seconds. getDur() : Returns the length of the table in seconds. getRate() : Returns the frequency (cycle per second) to give to an oscillator to read the sound at its original pitch. replace() : Replaces the actual table.
Examples:
>>> s = Server(duplex=1).boot() >>> s.start() >>> t = NewTable(length=2, chnls=1) >>> a = Input(0) >>> b = TableRec(a, t, .01) >>> c = Osc(table=t, freq=[t.getRate(), t.getRate()*.99]).out() >>> # to record in the empty table, call: >>> # b.play()
Methods details:
NewTable.getSize(self): Returns the length of the table in samples. NewTable.getLength(self): Returns the length of the table in seconds. NewTable.getDur(self): Returns the length of the table in seconds. NewTable.getRate(self): Returns the frequency (cycle per second) to give to an oscillator to read the sound at its original pitch. NewTable.replace(x): Replaces the actual table. Parameters: x : list of floats New table. Must be of the same size as the actual table. List of list can match the number of channels, otherwise, the list will be loaded in all tablestreams.