| 1 |
Internal objects |
| 2 |
=================================== |
| 3 |
|
| 4 |
.. currentmodule:: pyo |
| 5 |
|
| 6 |
These objects are mainly used by pyo itself, inside other objects. |
| 7 |
|
| 8 |
Objects in this category |
| 9 |
------------------------------ |
| 10 |
|
| 11 |
- :py:class:`Dummy` : Dummy object used to perform arithmetics on PyoObject. |
| 12 |
- :py:class:`InputFader` : Audio streams crossfader. |
| 13 |
- :py:class:`Mix` : Mix audio streams to arbitrary number of streams. |
| 14 |
- :py:class:`VarPort` : Convert numeric value to PyoObject signal with portamento. |
| 15 |
- :py:class:`Stream` : Audio stream objects. For internal use only. |
| 16 |
|
| 17 |
*Dummy* |
| 18 |
----------------------------------- |
| 19 |
|
| 20 |
.. autoclass:: Dummy |
| 21 |
:members: |
| 22 |
|
| 23 |
.. autoclasstoc:: |
| 24 |
|
| 25 |
*InputFader* |
| 26 |
----------------------------------- |
| 27 |
|
| 28 |
.. autoclass:: InputFader |
| 29 |
:members: |
| 30 |
|
| 31 |
.. autoclasstoc:: |
| 32 |
|
| 33 |
*Mix* |
| 34 |
----------------------------------- |
| 35 |
|
| 36 |
.. autoclass:: Mix |
| 37 |
:members: |
| 38 |
|
| 39 |
.. autoclasstoc:: |
| 40 |
|
| 41 |
*VarPort* |
| 42 |
----------------------------------- |
| 43 |
|
| 44 |
.. autoclass:: VarPort |
| 45 |
:members: |
| 46 |
|
| 47 |
.. autoclasstoc:: |
| 48 |
|
| 49 |
*Stream* |
| 50 |
----------------------------------- |
| 51 |
|
| 52 |
*class* **Stream** |
| 53 |
|
| 54 |
Audio stream objects. For internal use only. |
| 55 |
|
| 56 |
A Stream object must never be instantiated by the user. |
| 57 |
|
| 58 |
A Stream is a mono buffer of audio samples. It is used to pass audio between objects and the server. |
| 59 |
A PyoObject can manage many streams if, for example, a list is given to a parameter. |
| 60 |
|
| 61 |
A Sine object with only one stream: |
| 62 |
|
| 63 |
>>> a = Sine(freq=1000) |
| 64 |
>>> print(len(a)) |
| 65 |
1 |
| 66 |
|
| 67 |
A Sine object with four streams: |
| 68 |
|
| 69 |
>>> a = Sine(freq=[250,500,750,100]) |
| 70 |
>>> print(len(a)) |
| 71 |
4 |
| 72 |
|
| 73 |
The first stream of this object contains the samples from the 250Hz waveform. The second stream contains the samples from the 500Hz waveform, and so on. |
| 74 |
|
| 75 |
User can call a specific stream of an object by giving the position of the stream between brackets, beginning at 0. To retrieve only the third stream of our object: |
| 76 |
|
| 77 |
>>> a[2].out() |
| 78 |
|
| 79 |
The method getStreamObject() can be called on a Stream object to retrieve the XXX_base object associated with this Stream. |
| 80 |
This method can be used by developers who are debugging their programs! |
| 81 |
|