~ubuntu-branches/ubuntu/wily/python-pyo/wily-proposed

« back to all changes in this revision

Viewing changes to pyolib/matrixprocess.py

  • Committer: Package Import Robot
  • Author(s): Tiago Bortoletto Vaz
  • Date: 2013-05-28 14:27:12 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20130528142712-5ycu7udwjc4udkud
Tags: 0.6.6+svn1108-1
New upstream commits adding 6 new filters and a couple of bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    """
35
35
    MatrixRec records samples into a previously created NewMatrix.
36
36
 
37
 
    See `NewMatrix` to create an empty matrix.
 
37
    See :py:class:`NewMatrix` to create an empty matrix.
38
38
 
39
39
    The play method is not called at the object creation time. It starts
40
40
    the recording into the matrix, row after row, until the matrix is full. 
41
41
    Calling the play method again restarts the recording and overwrites 
42
 
    previously recorded samples.
43
 
 
44
 
    Parentclass: PyoObject
45
 
 
46
 
    Parameters:
47
 
 
48
 
    input : PyoObject
49
 
        Audio signal to write in the matrix.
50
 
    matrix : PyoMatrixObject
51
 
        The matrix where to write samples.
52
 
    fadetime : float, optional
53
 
        Fade time at the beginning and the end of the recording 
54
 
        in seconds. Defaults to 0.
55
 
    delay : int, optional
56
 
        Delay time, in samples, before the recording begins. 
57
 
        Available at initialization time only. Defaults to 0.
58
 
 
59
 
    Methods:
60
 
 
61
 
    setInput(x, fadetime) : Replace the `input` attribute.
62
 
    setMatrix(x) : Replace the `matrix` attribute.
63
 
    play() : Start the recording at the beginning of the matrix.
64
 
    stop() : Stop the recording. Otherwise, record through the 
65
 
        end of the matrix.
66
 
 
67
 
    Attributes:
68
 
 
69
 
    input : PyoObject. Audio signal to write in the matrix.
70
 
    matrix : PyoMatrixObject. The matrix where to write samples.
71
 
 
72
 
    Notes:
73
 
 
74
 
    The out() method is bypassed. MatrixRec returns no signal.
75
 
 
76
 
    MatrixRec has no `mul` and `add` attributes.
77
 
 
78
 
    MatrixRec will sends a trigger signal at the end of the recording. 
79
 
    User can retreive the trigger streams by calling obj['trig']. See
80
 
    `TableRec` documentation for an example.
81
 
 
82
 
    See also: NewMatrix
83
 
 
84
 
    Examples:
 
42
    previously recorded samples. The stop method stops the recording. 
 
43
    Otherwise, the default behaviour is to record through the end of the matrix.
 
44
 
 
45
    :Parent: :py:class:`PyoObject`
 
46
 
 
47
    :Args:
 
48
 
 
49
        input : PyoObject
 
50
            Audio signal to write in the matrix.
 
51
        matrix : PyoMatrixObject
 
52
            The matrix where to write samples.
 
53
        fadetime : float, optional
 
54
            Fade time at the beginning and the end of the recording 
 
55
            in seconds. Defaults to 0.
 
56
        delay : int, optional
 
57
            Delay time, in samples, before the recording begins. 
 
58
            Available at initialization time only. Defaults to 0.
 
59
 
 
60
    .. note::
 
61
 
 
62
        The out() method is bypassed. MatrixRec returns no signal.
 
63
 
 
64
        MatrixRec has no `mul` and `add` attributes.
 
65
 
 
66
        MatrixRec will sends a trigger signal at the end of the recording. 
 
67
        User can retreive the trigger streams by calling obj['trig']. See
 
68
        `TableRec` documentation for an example.
 
69
 
 
70
    .. seealso:: 
 
71
        
 
72
        :py:class:`NewMatrix`
85
73
 
86
74
    >>> s = Server().boot()
87
75
    >>> s.start()
120
108
        """
121
109
        Replace the `input` attribute.
122
110
        
123
 
        Parameters:
 
111
        :Args:
124
112
 
125
 
        x : PyoObject
126
 
            New signal to process.
127
 
        fadetime : float, optional
128
 
            Crossfade time between old and new input. Defaults to 0.05.
 
113
            x : PyoObject
 
114
                New signal to process.
 
115
            fadetime : float, optional
 
116
                Crossfade time between old and new input. Defaults to 0.05.
129
117
 
130
118
        """
131
119
        self._input = x
135
123
        """
136
124
        Replace the `matrix` attribute.
137
125
        
138
 
        Parameters:
 
126
        :Args:
139
127
 
140
 
        x : NewMatrix
141
 
            new `matrix` attribute.
 
128
            x : NewMatrix
 
129
                new `matrix` attribute.
142
130
        
143
131
        """
144
132
        self._matrix = x
163
151
    """
164
152
    MatrixRecLoop records samples in loop into a previously created NewMatrix.
165
153
 
166
 
    See `NewMatrix` to create an empty matrix.
 
154
    See :py:class:`NewMatrix` to create an empty matrix.
167
155
 
168
156
    MatrixRecLoop records samples into the matrix, row after row, until 
169
157
    the matrix is full and then loop back to the beginning. 
170
158
 
171
 
    Parentclass: PyoObject
172
 
 
173
 
    Parameters:
174
 
 
175
 
    input : PyoObject
176
 
        Audio signal to write in the matrix.
177
 
    matrix : PyoMatrixObject
178
 
        The matrix where to write samples.
179
 
 
180
 
    Methods:
181
 
 
182
 
    setInput(x, fadetime) : Replace the `input` attribute.
183
 
    setMatrix(x) : Replace the `matrix` attribute.
184
 
 
185
 
    Attributes:
186
 
 
187
 
    input : PyoObject. Audio signal to write in the matrix.
188
 
    matrix : PyoMatrixObject. The matrix where to write samples.
189
 
 
190
 
    Notes:
191
 
 
192
 
    The out() method is bypassed. MatrixRecLoop returns no signal.
193
 
 
194
 
    MatrixRecLoop has no `mul` and `add` attributes.
195
 
 
196
 
    MatrixRecLoop will sends a trigger signal when reaching the end 
197
 
    of the matrix. User can retreive the trigger streams by calling 
198
 
    obj['trig']. See `TableRec` documentation for an example.
199
 
 
200
 
    See also: NewMatrix
201
 
 
202
 
    Examples:
 
159
    :Parent: :py:class:`PyoObject`
 
160
 
 
161
    :Args:
 
162
 
 
163
        input : PyoObject
 
164
            Audio signal to write in the matrix.
 
165
        matrix : PyoMatrixObject
 
166
            The matrix where to write samples.
 
167
 
 
168
    .. note::
 
169
 
 
170
        The out() method is bypassed. MatrixRecLoop returns no signal.
 
171
 
 
172
        MatrixRecLoop has no `mul` and `add` attributes.
 
173
 
 
174
        MatrixRecLoop will sends a trigger signal when reaching the end 
 
175
        of the matrix. User can retreive the trigger streams by calling 
 
176
        obj['trig']. See `TableRec` documentation for an example.
 
177
 
 
178
    .. seealso:: 
 
179
        
 
180
        :py:class:`NewMatrix`
203
181
 
204
182
    >>> s = Server().boot()
205
183
    >>> s.start()
237
215
        """
238
216
        Replace the `input` attribute.
239
217
 
240
 
        Parameters:
 
218
        :Args:
241
219
 
242
 
        x : PyoObject
243
 
            New signal to process.
244
 
        fadetime : float, optional
245
 
            Crossfade time between old and new input. Defaults to 0.05.
 
220
            x : PyoObject
 
221
                New signal to process.
 
222
            fadetime : float, optional
 
223
                Crossfade time between old and new input. Defaults to 0.05.
246
224
 
247
225
        """
248
226
        self._input = x
252
230
        """
253
231
        Replace the `matrix` attribute.
254
232
 
255
 
        Parameters:
 
233
        :Args:
256
234
 
257
 
        x : NewMatrix
258
 
            new `matrix` attribute.
 
235
            x : NewMatrix
 
236
                new `matrix` attribute.
259
237
 
260
238
        """
261
239
        self._matrix = x
280
258
    """
281
259
    Matrix reader with control on the 2D pointer position.
282
260
 
283
 
    Parentclass: PyoObject
284
 
 
285
 
    Parameters:
286
 
 
287
 
    matrix : PyoMatrixObject
288
 
        Matrix containing the waveform samples.
289
 
    x : PyoObject
290
 
        Normalized X position in the matrix between 0 and 1.
291
 
    y : PyoObject
292
 
        Normalized Y position in the matrix between 0 and 1.
293
 
 
294
 
    Methods:
295
 
 
296
 
    setMatrix(x) : Replace the `matrix` attribute.
297
 
    setX(x) : Replace the `x` attribute.
298
 
    setY(x) : Replace the `y` attribute
299
 
 
300
 
    Attributes:
301
 
 
302
 
    matrix : PyoMatrixObject. Matrix containing the waveform samples.
303
 
    x : PyoObject. X pointer position in the matrix.
304
 
    y : PyoObject. Y pointer position in the matrix.
305
 
 
306
 
    Examples:
 
261
    :Parent: :py:class:`PyoObject`
 
262
 
 
263
    :Args:
 
264
 
 
265
        matrix : PyoMatrixObject
 
266
            Matrix containing the waveform samples.
 
267
        x : PyoObject
 
268
            Normalized X position in the matrix between 0 and 1.
 
269
        y : PyoObject
 
270
            Normalized Y position in the matrix between 0 and 1.
307
271
 
308
272
    >>> s = Server().boot()
309
273
    >>> s.start()
332
296
        """
333
297
        Replace the `matrix` attribute.
334
298
        
335
 
        Parameters:
 
299
        :Args:
336
300
 
337
 
        x : PyoTableObject
338
 
            new `matrix` attribute.
 
301
            x : PyoTableObject
 
302
                new `matrix` attribute.
339
303
        
340
304
        """
341
305
        self._matrix = x
346
310
        """
347
311
        Replace the `x` attribute.
348
312
        
349
 
        Parameters:
 
313
        :Args:
350
314
 
351
 
        x : PyoObject
352
 
            new `x` attribute.
 
315
            x : PyoObject
 
316
                new `x` attribute.
353
317
        
354
318
        """
355
319
        self._x = x
360
324
        """
361
325
        Replace the `y` attribute.
362
326
        
363
 
        Parameters:
 
327
        :Args:
364
328
 
365
 
        y : PyoObject
366
 
            new `y` attribute.
 
329
            y : PyoObject
 
330
                new `y` attribute.
367
331
        
368
332
        """
369
333
        self._y = x
404
368
    `matrix` object at the beginning of each buffer size. The matrices in the 
405
369
    list and the resulting matrix must be equal in size.
406
370
 
407
 
    Parentclass: PyoObject
408
 
 
409
 
    Parameters:
410
 
 
411
 
    input : PyoObject
412
 
        Morphing index between 0 and 1. 0 is the first matrix in the list 
413
 
        and 1 is the last.
414
 
    matrix : NewMatrix
415
 
        The matrix where to write morphed function.
416
 
    sources : list of PyoMatrixObject
417
 
        List of matrices to interpolate from.
418
 
 
419
 
    Methods:
420
 
 
421
 
    setInput(x, fadetime) : Replace the `input` attribute.
422
 
    setMatrix(x) : Replace the `matrix` attribute.
423
 
    setSources(x) : Replace the `sources` attribute.
424
 
 
425
 
    Attributes:
426
 
 
427
 
    input : PyoObject. Morphing index between 0 and 1.
428
 
    matrix : NewMatrix. The matrix where to write samples.
429
 
    sources : list of PyoMatrixObject. List of matrices to interpolate from.
430
 
 
431
 
    Notes:
432
 
 
433
 
    The out() method is bypassed. MatrixMorph returns no signal.
434
 
 
435
 
    MatrixMorph has no `mul` and `add` attributes.
436
 
 
437
 
    Examples:
 
371
    :Parent: :py:class:`PyoObject`
 
372
 
 
373
    :Args:
 
374
 
 
375
        input : PyoObject
 
376
            Morphing index between 0 and 1. 0 is the first matrix in the list 
 
377
            and 1 is the last.
 
378
        matrix : NewMatrix
 
379
            The matrix where to write morphed function.
 
380
        sources : list of PyoMatrixObject
 
381
            List of matrices to interpolate from.
 
382
 
 
383
    .. note::
 
384
 
 
385
        The out() method is bypassed. MatrixMorph returns no signal.
 
386
 
 
387
        MatrixMorph has no `mul` and `add` attributes.
438
388
 
439
389
    >>> s = Server().boot()
440
390
    >>> s.start()
473
423
        """
474
424
        Replace the `input` attribute.
475
425
 
476
 
        Parameters:
 
426
        :Args:
477
427
 
478
 
        x : PyoObject
479
 
            New signal to process.
480
 
        fadetime : float, optional
481
 
            Crossfade time between old and new input. Defaults to 0.05.
 
428
            x : PyoObject
 
429
                New signal to process.
 
430
            fadetime : float, optional
 
431
                Crossfade time between old and new input. Defaults to 0.05.
482
432
 
483
433
        """
484
434
        self._input = x
488
438
        """
489
439
        Replace the `matrix` attribute.
490
440
 
491
 
        Parameters:
 
441
        :Args:
492
442
 
493
 
        x : NewMatrix
494
 
            new `matrix` attribute.
 
443
            x : NewMatrix
 
444
                new `matrix` attribute.
495
445
 
496
446
        """
497
447
        self._matrix = x
502
452
        """
503
453
         Replace the `sources` attribute.
504
454
 
505
 
        Parameters:
 
455
        :Args:
506
456
 
507
 
        x : list of PyoMatrixObject
508
 
            new `sources` attribute.
 
457
            x : list of PyoMatrixObject
 
458
                new `sources` attribute.
509
459
 
510
460
        """
511
461
        self._sources = x