TableRec(input, table, fadetime=0)
TableRec is for writing samples into a previously created NewTable.
See `NewTable` to create an empty table.
The play method is not called at the object creation time. It starts the recording into the table until the table is full. Calling the play method again restarts the recording and overwrites previously recorded samples.
Parent class : PyoObject
Parameters:
input : PyoObject Audio signal to write in the table. table : PyoTableObject The table where to write samples. fadetime : float, optional Fade time at the beginning and the end of the recording in seconds. Defaults to 0.
Methods:
setInput(x, fadetime) : Replace the `input` attribute. setTable(x) : Replace the `table` attribute. play() : Start the recording at the beginning of the table. stop() : Stop the recording. Otherwise, record through the end of the table.
Attributes:
input : PyoObject. Audio signal to write in the table. table : PyoTableObject. The table where to write samples.
Notes:
The out() method is bypassed. TableRec returns no signal. TableRec has no `mul` and `add` attributes. TableRec will sends a trigger signal at the end of the recording. User can retrieve the trigger streams by calling obj['trig']. In this example, the recorded table will be read automatically after a recording: >>> a = Input(0) >>> t = NewTable(length=1, chnls=1) >>> rec = TableRec(a, table=t, fadetime=0.01) >>> tr = TrigEnv(rec['trig'], table=t, dur=1).out()
See also : NewTable
Examples:
>>> s = Server(duplex=1).boot() >>> s.start() >>> t = NewTable(length=2, chnls=1) >>> a = Input(0) >>> b = TableRec(a, t, .01) >>> c = Osc(t, [t.getRate(), t.getRate()*.99]).out() >>> # to record in the empty table, call: >>> # b.play()