MatrixRec(input, matrix, fadetime=0)
MatrixRec is for writing samples into a previously created NewMatrix.
See `NewMatrix` to create an empty matrix.
The play method is not called at the object creation time. It starts the recording into the matrix, row after row, until the matrix 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 matrix. matrix : PyoMatrixObject The matrix 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. setMatrix(x) : Replace the `matrix` attribute. play() : Start the recording at the beginning of the matrix. stop() : Stop the recording. Otherwise, record through the end of the matrix.
Attributes:
input : PyoObject. Audio signal to write in the matrix. matrix : PyoMatrixObject. The matrix where to write samples.
Notes:
The out() method is bypassed. MatrixRec returns no signal. MatrixRec has no `mul` and `add` attributes. MatrixRec will sends a trigger signal at the end of the recording. User can retreive the trigger streams by calling obj['trig']. See `TableRec` documentation for an example.
See also : NewMatrix
Examples:
>>> s = Server().boot() >>> s.start() >>> SIZE = 256 >>> mm = NewMatrix(SIZE, SIZE) >>> fmind = Sine(.2, 0, 2, 2.5) >>> fmrat = Sine(.33, 0, .05, .5) >>> aa = FM(carrier=10, ratio=fmrat, index=fmind) >>> rec = MatrixRec(aa, mm, 0).play() >>> lfx = Sine(.1, 0, .24, .25) >>> lfy = Sine(.15, 0, .124, .25) >>> x = Sine(1000, 0, lfx, .5) >>> y = Sine(1.5, 0, lfy, .5) >>> c = MatrixPointer(mm, x, y, .5).out()